1

I am using C# and ffmpeg.

In this scenario I have 279 individual jpegs and i have used ffmpeg to create a AVI file from these images on my client.

CMD Line:

 -f image2 -r 10 -i "C:\000EC902F17F\img%05d.jpg"  -s 352x288  -y "C:\1\test.avi"

I then upload to my server.

CMD Line:

-i c:\1\1.avi c:\1\img-%05d.jpg

I then extract jpegs from the AVI file. I get 265 jpegs back.

Obviously ffmpeg is dropping these frames (most probable) when the avi is 1st created. Is there a way to 'force' to encode using ALL the images I have?

Thanks.

PS I did not specify any command line option other than the size of the video output. As far as I am aware if none are specified then ffmpeg automatically chooses the best ones?

6
  • 1
    I found the answer. There is a FPS input and output. As you can see I have -r 10 (which is 10 frames per second). All I needed to do was add -r 10 after the -y to force it to encode frame for frame Oct 28, 2013 at 9:13
  • To clarify, by default if an input -r is not declared then ffmpeg will use -r 25 for the input (and therefore output). If you only declare an output -r, then ffmpeg will have drop or duplicate frames to go from 25 to match your output -r.
    – llogan
    Oct 28, 2013 at 17:37
  • @LordNeckbeard HI, thanks for extra info. Appreciated.. Oct 28, 2013 at 18:22
  • out of interest would setting it to 1 fps make it slower or faster than if i set it to say 10 fps? Or not make any difference. I am referring to the time it takes to encode all the images rather than the playback tempo.. Oct 28, 2013 at 18:24
  • If you only set an input frame rate of -r 1 then the output will also be -r 1. I guess -r 10 would encoder faster than -r 1, but the difference may not be significant.
    – llogan
    Oct 28, 2013 at 19:17

0

You must log in to answer this question.

Browse other questions tagged .