[FFmpeg-user] Raspberry Pi to YouTube Live

Mark Himsley mark.himsley at gmail.com
Mon Apr 7 17:14:55 CEST 2014


Hi,

On 6 April 2014 21:33, kathodus <pfribeiro at gmail.com> wrote:
> (Note that I could not find the
> unit for the -g parameter anywhere, not even for ffmpeg itself. So this is
> guessing really.)

-g is one of the parameters associated with individual video encoders.
If you have a look at this section of the docs you'll see that many
video CODECs describe the 'g' option as "the size of a GOP", or
similar wording:

https://www.ffmpeg.org/ffmpeg-all.html#Video-Encoders

> -g 50' there is a minimum requirement for the keyframe interval of less
> than or equal to 2 seconds. I have been able to work out that this
> corresponds to less than or equal to 2*fps

The -g option to (some) video encoders, sets - in frames - the maximum
size for a GOP. In the example you've given, 50 frames at 25 FPS will
give you a keyframe at least every 2 seconds.

Hope that helps.

-- 
Mark Himsley


More information about the ffmpeg-user mailing list