Concatenate multiple HLS master playlists

安稳与你 提交于 2019-12-08 12:11:35

问题


The DASH Manifest provides the notion of “Periods” to concatenate multiple clips - each with its own track information - in a single manifest.

Is there a similar functionality which allows to concatenate multiple master playlist files in a kind of “master master”-playlist file?


回答1:


Short answer: No, not on a Master Playlist level.

I guess the closest thing to Periods of MPEG-DASH in HLS are Discontinuity Sequences. You would have to concatenate the variant playlists and add an EXT-X-DISCONTINUITY.

Example:

First clip's variant:

#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3

#EXTINF:10,
clip-1/1.ts
#EXTINF:10,
clip-1/2.ts
#EXTINF:10,
clip-1/3.ts
#EXT-X-ENDLIST

Second clip's variant:

#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3

#EXTINF:10,
clip-2/1.ts
#EXTINF:10,
clip-2/2.ts
#EXTINF:10,
clip-2/3.ts
#EXT-X-ENDLIST

The concatenated clips' variant would be:

#EXTM3U
#EXT-X-TARGETDURATION:10
#EXT-X-VERSION:3

#EXTINF:10,
clip-1/1.ts
#EXTINF:10,
clip-1/2.ts
#EXTINF:10,
clip-1/3.ts
#EXT-X-DISCONTINUITY
#EXTINF:10,
clip-2/1.ts
#EXTINF:10,
clip-2/2.ts
#EXTINF:10,
clip-2/3.ts
#EXT-X-ENDLIST

The EXT-X-DISCONTINUITYtag is needed to mark a discontinuity in timestamps and/or encoding parameters. You would have to do this for each variant playlist (i.e. each quality level).

If the clips do not have the same bitrate ladder (i.e. quality profiles) it's not really feasible to concatenate them.



来源:https://stackoverflow.com/questions/50859334/concatenate-multiple-hls-master-playlists

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!