video-dev / hls.js

HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
https://hlsjs.video-dev.org/demo
Other
14.83k stars 2.57k forks source link

Frag parsing error when Audio Only Master Playlist includes media playlist twice #6783

Open Benny739 opened 1 week ago

Benny739 commented 1 week ago

What version of Hls.js are you using?

1.5.17

What browser (including version) are you using?

Chrome

What OS (including version) are you using?

MacOs

Test stream

https://vod-qa-hdd-01.b-cdn.net/3InDYWsdUyklwEfMCl9j/90516808-a56e-4bae-8b55-f56b0e069abc/hls.m3u8

Configuration

{}

Additional player setup steps

No response

Checklist

Steps to reproduce

  1. Play the master playlist file
  2. Audio playlist gets loaded twice
  3. Frag parsing error happens which leads to bufferStalled error in some cases

The problem seems to be that the audio playlist ist included twice. According to the hls spec this should be a valid configuration and not lead to the above problems.

For more info see #6742

Reproduction: https://hlsjs.video-dev.org/demo/?src=https%3A%2F%2Fvod-qa-hdd-01.b-cdn.net%2F3InDYWsdUyklwEfMCl9j%2F90516808-a56e-4bae-8b55-f56b0e069abc%2Fhls.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOmZhbHNlLCJzdG9wT25TdGFsbCI6ZmFsc2UsImR1bXBmTVA0IjpmYWxzZSwibGV2ZWxDYXBwaW5nIjotMSwibGltaXRNZXRyaWNzIjotMX0=

Expected behaviour

  1. No frag parsing error

What actually happened?

Frag parsing error

Console output

Parsing error:Found no media in msn 0 of level "https://vod-qa-hdd-01.b-cdn.net/3InDYWsdUyklwEfMCl9j/90516808-a56e-4bae-8b55-f56b0e069abc/audio-de-mp4a.40.2.m3u8"

Chrome media internals output

No response

robwalch commented 5 days ago

I'm not seeing a frag parse error in dev, but I do see both audio and stream controllers loading the same playlist and requesting the same segments because HLS.js does not expect to need to deduplicate URIs for variants and media options in the multivariant playlist.