2

I can create slideshow with below command

ffmpeg -y -f image2 -r 1/15 -i image%d.jpeg -y -r 45 video.mp4 

Video is created successfully ,, but its ignoring the 1st image..

for example in current folder i have

image1.jpeg image2.jpeg image3.jpeg 

but slide show is created with image2.jpeg and image3.jpeg only..(i.e 30 second video with 2 image is created..but i expected 45 second video with 3 images displaying 15 sec per image)

2
  • same issue for me ... can some one help this ? Commented Nov 24, 2013 at 8:49
  • @AnishaVirat See the answer below if you haven't already. Commented Nov 24, 2013 at 18:50

1 Answer 1

4

What's wrong with your command is the -r 45 as an output option. You're telling ffmpeg to produce a video with 45 fps output rate. You probably don't want that.

Use the fps filter to set the framerate:

ffmpeg -r 1/15 -i img%d.jpeg -vf fps=25 output.mp4 

If you use

ffmpeg -r 1/15 -i img%d.jpeg output.mp4 

you will get a video with ~0.07 fps, and three frames, meaning a roughly 45 second long video (3 / 0.07). This gives the expected result, but it might not be playable in all players.

Note:

  • -y is not needed twice. Only supply it once before -i.
  • -f image2 is not needed.

Using -r as an output option to force another frame rate skips the first frame immediately in some players. I consider this a bug, which is now reported in this ticket .

Sign up to request clarification or add additional context in comments.

7 Comments

woow just saw your ticket...and ffmpeg support looks impressive :o
you are pretty active aswel :) +1 for your solution..will try and report you
and actually i thought 45 as the video length :/
Well, the length will be calculated automatically. If you have 3 frames and each one's shown for 15 seconds, ffmpeg will stop encoding after the third frame. To cut after a specific length, use the -t option.
hey .. i used the command ffmpeg -r 1/15 -y -i image/image%d.jpeg -vf fps=25 video.mp4 ..but still i get the 30 second video...1st image just goes away immediately
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.