[FFmpeg-devel] [PATCH] avformat/hlsenc: check the segment duration valid

Steven Liu lingjiujianke at gmail.com
Mon Aug 17 12:17:50 EEST 2020


zhilizhao <quinkblack at foxmail.com> 于2020年8月17日周一 下午5:06写道:
>
>
>
> > On Aug 17, 2020, at 4:05 PM, Nicolas George <george at nsup.org> wrote:
> >
> > Steven Liu (12020-08-17):
> >> Output a warning message if the target duration of the segment is negative.
> >> Suggest user increase the hls_time value,
> >> and modify the target duration to one packet duration,
> >> because there maybe have bframe and then split not by keyframe,
> >> and the segment is very very small.
> >
> > Fiddling randomly with durations seem wrong. It will probably result in
> > invalid seeking. Have you found the exact cause of the issue?
> >
>
> The split_by_time flag which enabled split segments at any position (non-key
> frame) is the root cause of the issue. The specification (RFC8216, 6.2.1)
> says explicitly:
>
> The server SHOULD attempt to divide the source media at points that
>    support effective decode of individual Media Segments, e.g., on
>    packet and key frame boundaries.
When hls muxer have beed support split_by_time flag add, the 8216 have
not beed release,
and there have some guys order this feature, for example me.
And I saw lots of people are using this flag, so this maybe cannot be
removed now.
So I think give a warning message and modify it to one packet duration is ok.

>
> > Preventing duration from being negative in the first place would be a
> > much better fix than adjusting it arbitrarily.
> >
> > Regards,
> >
> > --
> >  Nicolas George
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list