user2967: 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?

user3154: To force a keyframe at the 00:00:00.000 time code, you should try using the following flag:
-force_key_frames 00:00:00.000


2967: <p>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).</p>

<p>I ran the following ffmpeg command:</p>

<pre><code>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
</code></pre>

<p>FFmpeg then drops a lot of frames until it inserts the first keyframe. Sometimes image appears only after 16 or 20 seconds.</p>

<p>I gather ffmpeg doesn't insert a keyframe at very beginning.</p>

<p>Does anyone know how could I take the first frame of vid.avi and use it as the key frame for vid.mp4?</p>
 3154: <p>To force a keyframe at the 00:00:00.000 time code, you should try using the following flag:</p>

<pre><code>-force_key_frames 00:00:00.000
</code></pre>
