Channel assembly uses the HTTP Live Streaming (HLS) protocol to deliver content through M3U8 playlist files.
HLS
HLS is a streaming protocol that delivers audio and video content over HTTP or HTTPS. It divides the content into small segments and creates playlist files in M3U8 format.
To retrieve the segments, the client requests the M3U8 playlist files.
Sample HLS request
http://myresource.aliyundoc.com/video1.m3u8
There are two types of M3U8 playlist files: master playlist and media playlist.
-
Media playlist: contains URLs to the media segments.
-
Master playlist: contains URLs to multiple media playlists, each representing a different variant of the stream. These variants can differ in bitrate, codec, or resolution.
Sample master playlist
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=100000,CODECS="mp4a.40.2,avc1.64001e",RESOLUTION=640x302
video/player-ld.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=200000,CODECS="mp4a.40.2,avc1.64001f",RESOLUTION=848x402
video/player-sd.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=300000,CODECS="mp4a.40.2,avc1.640020",RESOLUTION=1280x606
video/player-hd.m3u8
Sample media playlist
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXT-X-TARGETDURATION:17
#EXTINF:15.500,
1723518810_120.ts
#EXT-X-DISCONTINUITY
#EXTINF:16.666,
1723518884_121.ts
#EXTINF:2.533,
1723518886_122.ts
#EXT-X-ENDLIST
Both master and media playlists can be played by any player that supports HLS. However, to use the channel assembly feature, you must provide the master playlists for media sources.