[FFmpeg-devel] [PATCH] examples: set GOP size to 10 seconds
Alfred E. Heggestad
alfred.heggestad at gmail.com
Tue Oct 29 12:08:10 EET 2019
On 29/10/2019 10:34, Steven Liu wrote:
>
>
>> 在 2019年10月29日,17:25,Alfred E. Heggestad <alfred.heggestad at gmail.com> 写道:
>>
>> using a gop_size of 10 in the example code is very misleading.
>> in practice this means around 2 keyframes per second.
>>
>> a normal video encoder should not send keyframes so frequent,
>> a better interval is 10 seconds.
>
> 10 seconds is too long. i think 10 frames maybe ok for a sample.
> but usually set to 2s one GOP here, for publish stream to rtmp server.
> This is just a sample, so i think 10 second is too long.
Hi Steven,
I think we should make it clear in the code that the GOP size
depends on the framerate. Keep in mind that many people just copy
the example code to use in their applications, and does not
necessarily try to understand all the small details.
I am sure we can agree on a nice value for the keyframe interval,
but my point is that the value should be in seconds and not frames.
For example 5 seconds:
c->gop_size = 5 * FPS;
/alfred
More information about the ffmpeg-devel
mailing list