[FFmpeg-user] Set keyframe interval raw video

Carl Eugen Hoyos ceffmpeg at gmail.com
Thu Oct 20 12:13:14 EEST 2016


2016-10-20 10:38 GMT+02:00 Gabor Alsecz <alseczg at gmail.com>:
> Dear All,
>
> Would like to know what is the best way/parameter to force key frame
> interval. I would need 2*FPS
> I'm feeding FFmpeg's stdout with raw images at fps 25.

> So far i have the following command:

> ffmpeg -y -loglevel info  -f lavfi -i aevalsrc=0  -f rawvideo  -pix_fmt
> rgb24 -video_size 1280x720 -framerate=25 -i "-"  -f flv -acodec aac -vcodec

I don't think this is supposed to work.

> h264_nvenc  -profile:v high -vf "fps=25,format=yuv420p" -minrate 3000k

Careful with the fps filter: If input fps == output fps, don't use it to be
on the safe side.

> -maxrate 3000k -bufsize 6000k output.mp4

-g should set the keyframe interval.

Carl Eugen


More information about the ffmpeg-user mailing list