#6533: Invalid EXT-X-TARGETDURATION in HLS -------------------------------------+------------------------------------ Reporter: tonn81 | Owner: Type: defect | Status: reopened Priority: normal | Component: avformat Version: unspecified | Resolution: Keywords: hls | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------
Comment (by tonn81): Replying to [comment:7 stevenliu]: > > I cannot tell here. I just see that chunk duration is longer than requested. > It's is longer but it is the segment logic need. > yes , if you want to fix it, and you need me to fix it, i can sent a patch to you , but i cannot applied it into ffmpeg hlsenc now, because it maybe will make some new bugs, one of the bugs is the describe above. We could keep it as-is if we fix second part of it. > > > The EXT-X-TARGETDURATION tag specifies the maximum Media Segment > > > duration. The EXTINF duration of each Media Segment in the Playlist > > > file, when rounded to the nearest integer, MUST be less than or equal > > > to the target duration; longer segments can trigger playback stalls > > > or other errors. > > > > In other words, we take maximum chunk duration (`4.02`), round to nearest integer (`4`). Then `EXT-X-TARGETDURATION` should be greater or equal to this `4`. > > > > Technically, `5` also matches the specification in this case (`4 <= 5`) but `4` is more precise AND more logical having in mind `-hls_time 4` given. > > > > So my proposal matches the specification -- we should round maximum chunk duration to nearest integer, not ceil it. > > The specification said, the target duration should greater than segment duration, (The EXTINF duration of each Media Segment in the Playlist file, when rounded to the nearest integer, MUST be less than or equal to the target duration;) it said *MUST*. Yeah, MUST not should. But not greater but **greater or equal to rounded value**. I.e. `round(max{chunk_duration}) <= target_duration` I have provided an example of logic that follows the specification. -- Ticket URL: <https://trac.ffmpeg.org/ticket/6533#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker _______________________________________________ FFmpeg-trac mailing list FFmpeg-trac@avcodec.org http://ffmpeg.org/mailman/listinfo/ffmpeg-trac