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.
help!
thanks...
+ 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
Similar Threads
-
FFmpeg error trying to convert audio in mp4
By Thunderhead2772 in forum Video ConversionReplies: 4Last Post: 30th Jan 2015, 10:24 -
Convert MKV with .ass subs to mp4 with ffmpeg
By bearnado in forum Video ConversionReplies: 2Last Post: 1st Mar 2012, 03:21 -
Problem converting combined motion jpeg and mp4 audio file into other forma
By Anonymous3 in forum Video ConversionReplies: 49Last Post: 31st Aug 2011, 17:14 -
ffmpeg & jwplayer .mp4 problem
By mehmedean in forum Video ConversionReplies: 2Last Post: 30th Jan 2011, 12:02 -
Audio out of sync problem with FFMPEG encoding MP4 (h.264,AAC)
By jenak1980 in forum Video ConversionReplies: 7Last Post: 5th May 2010, 02:03