Concatenate multiple HLS master playlists

2019-06-09 17:39发布

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条回答
看我几分像从前
2楼-- · 2019-06-09 18:22

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.

查看更多
登录 后发表回答