Entries Tagged 'video' ↓

Manually Setting Keyframes in FFMPEG

If you want to manually set keyframe intervals in FFMPEG, for, say, transcoding to FLV for your online video site, the correct parameter you want is -g <int>.  Like most of the ffmpeg documentation unless you’re a video code guru it’s 100% non-obvious, but there it is.  I got nice, very dense keyframing for doing things like seeking to anywhere in the video.

Ex:

ffmpeg -i myvideo.mpg -g 1 myvideo.flv

Beware though, the resulting size of the video will vary widely based on a variety of factors, including original codec, length of the original video, frame rate, etc.