[FFmpeg-user] Parameters for "framerate" and "keyframe interval"?

Gyan gyandoshi at gmail.com
Fri Oct 26 13:15:47 EEST 2018


On Fri, Oct 26, 2018 at 3:22 PM Ben <bxstover-at-yahoo.co.uk at ffmpeg.org>
wrote:

> For video codec H.264 there are two parameters:
>
> Framerate (e.g. 25 or 30 or 29,97)
>
>   and
>
> keyframe interval (I guess measured in seconds after the last keyframe
> .e.g 50 or 200):
>
> What are the corresponding cmdline parameters for ffmpeg?
>
> How can I tell ffmpeg to use the same values as the input?
>

FFmpeg will use the same framerate as the input stream, unless the user
overrides it, using `-r` or `fps` or a few other filters

Usually there is no point in mimicking the source keyframe placement. The
encoder will place keyframes as is optimal. But if you insist, add
`-force_key_frames source`. You can also force a fixed keyframe interval
using `-g N` where N is measured in frames (not seconds).

Gyan


More information about the ffmpeg-user mailing list