[FFmpeg-trac] #6915(avformat:open): DASH audio segments duration doesn't match exactly with video segments duration.
FFmpeg
trac at avcodec.org
Thu Dec 21 19:28:29 EET 2017
#6915: DASH audio segments duration doesn't match exactly with video segments
duration.
------------------------------------+-------------------------------------
Reporter: beloko | Owner: stevenliu
Type: defect | Status: open
Priority: normal | Component: avformat
Version: git-master | Resolution:
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
------------------------------------+-------------------------------------
Comment (by j_karthic):
Replying to [comment:32 beloko]:
>
> {{{
> Each Media Playlist in each Variant Stream MUST have the same
> target duration. The only exceptions are SUBTITLES Renditions and
> Media Playlists containing an EXT-X-I-FRAMES-ONLY tag, which MAY
> have different target durations if they have an EXT-X-PLAYLIST-
> TYPE of VOD.
> }}}
>
> Alternate audio tracks are define as #EXT-X-MEDIA:TYPE=AUDIO in the
master playlist. So in theory audio segments "MUST" be exactly 4 seconds
long. But as you say in practice an audio stream can't be cut at exactly 4
seconds long.
>
> That's why I think rounding the #EXTINF value could be the best outcome
to fix this issue and produce HLS streams with alternate audio tracks
validated by the Apple mediastreamvalidator tool. And compliant with the
RFC 8216.
>
> When the segmenter generate the .m3u8 playlist it knows the expected
segment duration via the -min_seg_duration 4000000 parameter. And it knows
the real segment duration since it can currently write the exact value in
the playlist.
>
> IF( INT($expected_duration - $real_duration) <= $tolerated_milliseconds
)
The issue is to identify the right $tolerated_milliseconds. As I said this
could be as high as 128 milliseconds for 8khz aac stream.
> THEN $real_duration = ROUND($real_duration);
> ...
> WRITE "#EXTINF:" + $real_duration;
>
> But if this fix can create compatibility issues with some alternative
HLS players; I can also accept the Steven's process : forcing the
#EXT-X-TARGETDURATION in all alternate audio playlists to the same value
as the #EXT-X-TARGETDURATION setted in the main video playlist.
>
> In any case the fix isn't hurry. This issue could be delayed the time
required to consider others ways.
I agree with you. We should consider other ways as well.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6915#comment:35>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list