Search code examples
iosavplayerhttp-live-streamingm3u8

m3u8 playlists using HLS adaptive bitrates and media options


I have a media player app on iOS which uses HTTP Live Streaming to stream video. We use a master playlist file which references three different streams via another m3u8 file, and use the media options to select which stream to play.

This works fine currently, but we now want to use adaptive bitrate streaming, as well as the media options. I've attempted to do this with three levels of m3u8 files:

  • Top level: master m3u8 which references three different m3u8 files, one for each stream
  • Stream level m3u8 master: references four different m3u8 files, one for each resolution (i.e. this is the adaptive bitrate level)
  • Stream and resolution level m3u8: this contains the references to the actual chunks

However this doesn't work with the iOS AVPlayer media options API, which is what we're currently using to select the different streams. It seems to always want to select and use the primary stream, and ignores the other options.

Is there anyway to combine the media options and adaptive bitrate streaming into one m3u8 file?


Solution

  • So it appears this simply isn't possible with the m3u8 format. You can't use adaptive bitrates and media options at the same time.