I have a mpeg4 video at 25fps. This video contains just one static frame. I'm trying to downsample the frame rate to 1fps and convert the video to x246 (mp4).
I ran the following ffmpeg command:
ffmpeg -i vid.avi -acodec aac -ar 32000 -ab 64k -ac 2 \
-vcodec libx264 -strict -2 -y -r 1 -force_key_frames 0 vid.mp4
FFmpeg then drops a lot of frames until it inserts the first keyframe. Sometimes image appears only after 16 or 20 seconds.
I gather ffmpeg doesn't insert a keyframe at very beginning.
Does anyone know how could I take the first frame of vid.avi and use it as the key frame for vid.mp4?
-force_key_frames 0
? Also might want to try changing the 0 to a 1 to have it start on the first frame instead-force_key_frames 1
– Travis Crum Oct 3 '12 at 14:36-force_key_frames "expr:eq(n,0)"
– robd Jul 28 '13 at 21:08