Construction of the HTTP Live Streaming master playlist file
To construct an HTTP Live Streaming master playlist file for a media presentation with
multiple audio codecs (such as Dolby Digital
Plus and AAC), use the
#EXT-X
parameters.
- For each audio track (in each codec), create an entry of
#EXT-X-MEDIA
:- Set the
TYPE
attribute toAUDIO
. - Assign a user-defined value or name for the
GROUP-ID
attribute. A set of one or moreEXT-X-MEDIA
parameters with the sameGROUP-ID
value and the sameTYPE
value defines a group of renditions. - Set the
CHANNELS
attribute to a proper value to indicate the number of audio channels in the media content. For example, useCHANNELS="2"
for stereo Dolby Digital Plus or stereo AAC, and useCHANNELS="6"
for 5.1-channel Dolby Digital Plus or 5.1-channel Dolby Digital. - Specify the language code (for example,
"en"
,"fr"
) for theLANGUAGE
attribute. - Specify a name for each audio group with the
NAME
attribute.Whenever several audio tracks are encoded from the same source content (for example, the same language dub), the
NAME
attribute in theEXT-X-MEDIA
parameter must be the same for all of them. The native Apple HTTP Live Streaming player automatically switches to the appropriate track from the available codec variants. - Set the
DEFAULT
attribute toYES
if you want this rendition of the content to play back at the client side by default; otherwise, set it toNO
. - Include other attributes as needed, such as
AUTOSELECT
andURI
.
- Set the
- For each content variant, create an entry of
EXT-X-STREAM-INF
:- Set the
CODEC
attribute to a comma-separated two-part value to indicate both the audio and video codec for playback. - Set the
AUDIO
attribute to a specific value that must match the value of theGROUP-ID
attribute. This value indicates the set of audio renditions that should be used when playing back the media presentation. - Include other attributes as needed, such as
RESOLUTION
,FRAME-RATE
, and so on, to describe other characteristics of the variant.
- Set the
The ordering of the EXT-X-STREAM-INF
entries in the master playlist determines
implicit preference if the player considers two variant streams encoded with different codecs to
be equally suitable for playback. A variant stream that appears earlier takes precedence in
playback.
In order to enable playback of stereo Dolby Digital
Plus on an iPhone or iPad with
iOS 10, or on a Mac with macOS Sierra, you must list the stereo Dolby Digital
Plus
EXT-X-STREAM-INF
entries first in the master playlist, and stereo AAC second.
This ensures that Dolby Digital
Plus plays back wherever it is supported, and
automatically falls back to AAC on other devices.