I am new to ffmpeg, although it is working for the most part.
I have a video, I output it to a jpeg picture array using the following command:
ffmpeg -i M4H08111.MP4 -b 2000 -qscale 1 -qcomp 0 -qblur 0 foo-%03d.jpeg
this seems to provide equal quality to the original video.
then when I recompile the jpegs back into video no matter what I set the frame rate at, the video length is 4 minutes instead of 2 minutes and 30 seconds like the original. I use the following command:
ffmpeg -i foo-%03d.jpeg -r 29.97 -b 8973kb -minrate 8973kb -maxrate 8973kb -bufsize 10000kb foo2.mp4
Does it create additional frames from the source frames to accommodate the fps? Is there a way I can specify how long the video should be? Also I should note that when I play the compiled video in MPlayer it always shows the fps as the value I set in the command line parameter, however the video length is always the same value.
+ Reply to Thread
Results 1 to 3 of 3
Last edited by SaskVideoMaker; 4th Feb 2011 at 00:08.
looks like I solved my own problem... I used the following command:
ffmpeg -r 30 -i foo-%03d.jpeg -r 30 -b 8973kb -minrate 8973kb -maxrate 8973kb -bufsize 10000kb foo2.mp4
I tried one similar to this using a -r value of 29.97... but it turned out having a video length of almost 2 hours. I don't think that it divides single images properly... so I thought I would just bump it to 30 fps and see what happens... and it worked.
There's no reason your command shouldn't also work with -r 29.97.
In fact, the second -r is unnecessary - the important thing is to set the input frame rate (otherwise it defaults to 25), which will also become (by default) the output rate. So this should work:
ffmpeg -r 29.97 -i foo-%03d.jpeg -b 8973kb -minrate 8973kb -maxrate 8973kb -bufsize 10000kb foo2.mp4