Alfred E. Heggestad <alfred.hegges...@gmail.com> 于2019年10月29日周二 下午6:08写道: > > On 29/10/2019 10:34, Steven Liu wrote: > > > > > >> 在 2019年10月29日,17:25,Alfred E. Heggestad <alfred.hegges...@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.
Yes i get your point, but the comment of the gop_size is: /** * the number of pictures in a group of pictures, or 0 for intra_only * - encoding: Set by user. * - decoding: unused */ int gop_size; Maybe user should read the document or the API's comments before they use it, not only copy & paste. > > For example 5 seconds: > > > c->gop_size = 5 * FPS; > > > > > /alfred > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".