[FFmpeg-devel] [PATCH 1/1] avformat/hlsenc: Fix target duration computation when 'round_durations' is enabled

Jeyapal, Karthick kjeyapal at akamai.com
Fri Sep 1 13:54:09 EEST 2017


>2017-09-01 18:32 GMT+08:00 Steven Liu <lingjiujianke at gmail.com<mailto:lingjiujianke at gmail.com>>:
>Sorry, my mistake.
>
>the target_duration must large or equal to the en->duration, can not
>small than en->duration from HLS version 3.

When “round_durations” is enabled “en->duration” also gets rounded(lrint). So in the playlist, the target duration will never be lesser than any of the segment durations. It will still be in compliance to the HLS spec.
Otherwise we see an output where all segment durations are ‘n’ seconds, and the target duration is ‘n+1’ seconds when round_durations is enabled. This behavior causes some players to misbehave and add more latency unnecessarily.

Thanks,
Karthick



More information about the ffmpeg-devel mailing list