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

zhilizhao quinkblack at foxmail.com
Mon Aug 17 00:06:20 EEST 2020



> 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.

> 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".



More information about the ffmpeg-devel mailing list