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.66k stars 2.56k forks source link

Vimeo HLS stream intermittently stops on Safari macOS/iOS/iPadOS (with crossed-out play button) #5709

Closed karlhorky closed 1 year ago

karlhorky commented 1 year ago

What version of Hls.js are you using?

1.4.10

What browser (including version) are you using?

Safari 16.6 (18615.3.12.11.2)

What OS (including version) are you using?

macOS Ventura 13.5 (22G74) - also iOS and iPadOS

Test stream

This is a Vimeo HLS stream URL, we do not control the stream creation:

https://hlsjs.video-dev.org/demo/?src=https%3A%2F%2F109vod-adaptive.akamaized.net%2Fexp%3D1690633098~acl%3D%252F0c9e8776-3b06-44e0-b209-9d1b354e6adc%252F%252A~hmac%3D1a10d7830fa3d1f2cf68dcc4f5b4042c3a9acbc7f1e064f567cfecb3bca9d3cb%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2Fsep%2Fvideo%2F15117771%2C2512a163%2C625b30fc%2C81be9a97%2Faudio%2F0b1d6f8f%2Fsubtitles%2F101319728-English%2520%2528auto-generated%2529-en-x-autogen-cc%2Fmaster.m3u8%3Fabsolute%3D1%26external-subs%3D1%26query_string_ranges%3D1%26subcache%3D1%26subtoken%3Dec8793c0ed0ec59fb0a6559113ee52e50f043152b0162867e9d8530d8ab3f982&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsInN0b3BPblN0YWxsIjpmYWxzZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xfQ==

Configuration

The demo player configuration:

{
  "debug": true,
  "enableWorker": true,
  "lowLatencyMode": true,
  "backBufferLength": 90
}

Additional player setup steps

No additional setup steps - using the HLS.js demo player

Checklist

Steps to reproduce

  1. Visit the demo link above using Safari 16.6 on macOS / iOS / iPadOS
  2. Observe the player attempt to load the video (this is intermittent - sometimes it loads the first time, and then all subsequent attempts fail)
  3. The video load fails, with the play button crossed out πŸ’₯ (as shown in the screenshot and screen capture below)

Screenshot 2023-07-29 at 10 23 38

https://github.com/video-dev/hls.js/assets/1935696/7cf5652c-2f5d-4ed1-b82d-a634755bed8b

Status:

0.02 | Loading https://109vod-adaptive.akamaized.net/exp=1690633098~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=1a10d7830fa3d1f2cf68dcc4f5b4042c3a9acbc7f1e064f567cfecb3bca9d3cb/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/15117771,2512a163,625b30fc,81be9a97/audio/0b1d6f8f/subtitles/101319728-English%20%28auto-generated%29-en-x-autogen-cc/master.m3u8?absolute=1&external-subs=1&query_string_ranges=1&subcache=1&subtoken=ec8793c0ed0ec59fb0a6559113ee52e50f043152b0162867e9d8530d8ab3f982
0.023 | Loading manifest and attaching video element...
0.041 | 4 quality levels found
0.042 | Manifest successfully loaded
0.043 | No of audio tracks found: 1
0.045 | Audio track switching...
0.057 | Media element attached
0.195 | Audio track switched, trying to recover media error.
0.336 | Media element detached
0.337 | The video playback was aborted due to a corruption problem or because the video used features your browser did not support - Media failed to decode
0.34 | Media element attached, trying to swap audio codec and recover media error.
0.73 | Media element detached
0.731 | The video playback was aborted due to a corruption problem or because the video used features your browser did not support - Media failed to decode
0.734 | Media element attached, cannot recover. Last media error recovery failed.
1.104 | The video playback was aborted due to a corruption problem or because the video used features your browser did not support - Media failed to decode, cannot recover. Last media error recovery failed.

Error:

1.111 | Buffer append error
1.117 | Buffer append error
1.131 | Buffer append error
1.139 | Buffer append error
1.139 | A media error occurred: bufferAppendError

Expected behaviour

The video should load and play as it does when using <video src="https://.../<video>.m3u8" /> (the Safari native HLS support) - see working screen capture below

https://github.com/video-dev/hls.js/assets/1935696/f8802bae-18ba-493c-bac2-3502ae94cc77

What actually happened?

The video cannot load after HLS.js tries multiple ways to recover

Related resources

It seems there have been some various problems with streams not playing on Safari before, but they have been mostly all resolved or categorized as an error with an invalid stream:

Console output

[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 9871)
[Log] [log] > – "[buffer-controller]: Media source ended" (hls.js, line 18865)
[Log] [log] > – "[buffer-controller]: Media source closed" (hls.js, line 18862)
[Error] The video playback was aborted due to a corruption problem or because the video used features your browser did not support - Media failed to decode
    handleVideoEvent (hls-demo.js:24998)
[Log] [log] > – "[stream-controller]:" – "Swapping audio codec" (hls.js, line 16124)
[Log] [log] > – "[transmuxer-interface, main]: Starting new transmux session for sn: 0 p: -1 level: 3 id: 1↡        discontinuity: false↡      …" (hls.js, line 14923)
"[transmuxer-interface, main]: Starting new transmux session for sn: 0 p: -1 level: 3 id: 1
        discontinuity: false
        trackSwitch: false
        contiguous: false
        accurateTimeOffset: true
        timeOffset: 0
        initSegmentChange: false"
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 0 of level 3" (hls.js, line 8872)
[Log] [log] > – "[mp4-remuxer]: reset next timestamp" (hls.js, line 15031)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js, line 9871)
[Warning] [warn] > – "[buffer-operation-queue]: Unhandled exception executing the current operation" (hls.js, line 18783)
[Error] [error] > – "[buffer-controller]: Error encountered while trying to append to the video SourceBuffer" – InvalidStateError: The object is in an invalid state.
InvalidStateError: The object is in an invalid state.
    error
    onError (hls.js:19171)
    executeNext (hls.js:18784)
    append (hls.js:18749)
    onBufferAppending (hls.js:19201)
    emit (hls.js:14449)
    bufferFragmentData (hls.js:9269)
    _handleTransmuxComplete (hls.js:16251)
    _handleTransmuxComplete
    handleTransmuxComplete (hls.js:15057)
    onWorkerMessage (hls.js:15019)
[Warning] Error event: – Object (hls-demo.js, line 24772)
Object
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 0 of level 3" (hls.js, line 15031)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js, line 9871)
[Log] [log] > – "failed to get media.buffered" – InvalidStateError: The object is in an invalid state. (hls.js, line 7967)
InvalidStateError: The object is in an invalid state.
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 0 of level 3 (frag:[0.000-6.067] > buffer:)" (hls.js, line 9010)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js, line 9871)
[Log] [log] > – "failed to get media.buffered" – InvalidStateError: The object is in an invalid state. (hls.js, line 7967)
InvalidStateError: The object is in an invalid state.
[Log] [log] > – "failed to get media.buffered" – InvalidStateError: The object is in an invalid state. (hls.js, line 7967)
InvalidStateError: The object is in an invalid state.
[Log] [log] > – "failed to get media.buffered" – InvalidStateError: The object is in an invalid state. (hls.js, line 7967)
InvalidStateError: The object is in an invalid state.
[Log] [log] > – "[stream-controller]:" – "Loading fragment 1 cc: 0 of [0-29] level: 3, target: 6.067" (hls.js, line 9117)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 9871)
[Log] [log] > – "[stream-controller]:" – "Swapping audio codec" (hls.js, line 16124)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 1 of level 3" (hls.js, line 8872)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js, line 9871)
[Warning] [warn] > – "[buffer-operation-queue]: Unhandled exception executing the current operation" (hls.js, line 18783)
[Error] [error] > – "[buffer-controller]: Error encountered while trying to append to the video SourceBuffer" – InvalidStateError: The object is in an invalid state.
InvalidStateError: The object is in an invalid state.
    error
    onError (hls.js:19171)
    executeNext (hls.js:18784)
    append (hls.js:18749)
    onBufferAppending (hls.js:19201)
    emit (hls.js:14449)
    bufferFragmentData (hls.js:9269)
    _handleTransmuxComplete (hls.js:16251)
    _handleTransmuxComplete
    handleTransmuxComplete (hls.js:15057)
    onWorkerMessage (hls.js:15019)
[Warning] Error event: – Object (hls-demo.js, line 24772)
Object
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 1 of level 3" (hls.js, line 15031)
[Log] [log] > – "[stream-controller]:" – "PARSING->PARSED" (hls.js, line 9871)
[Log] [log] > – "failed to get media.buffered" – InvalidStateError: The object is in an invalid state. (hls.js, line 7967)
InvalidStateError: The object is in an invalid state.
[Log] [log] > – "[stream-controller]:" – "Buffered main sn: 1 of level 3 (frag:[6.067-12.133] > buffer:)" (hls.js, line 9010)
[Log] [log] > – "[stream-controller]:" – "PARSED->IDLE" (hls.js, line 9871)
[Log] [log] > – "failed to get media.buffered" – InvalidStateError: The object is in an invalid state. (hls.js, line 7967)
InvalidStateError: The object is in an invalid state.
[Log] [log] > – "failed to get media.buffered" – InvalidStateError: The object is in an invalid state. (hls.js, line 7967)
InvalidStateError: The object is in an invalid state.
[Log] [log] > – "failed to get media.buffered" – InvalidStateError: The object is in an invalid state. (hls.js, line 7967)
InvalidStateError: The object is in an invalid state.
[Log] [log] > – "[stream-controller]:" – "Loading fragment 2 cc: 0 of [0-29] level: 3, target: 12.133" (hls.js, line 9117)
[Log] [log] > – "[stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 9871)
[Log] [log] > – "[stream-controller]:" – "Swapping audio codec" (hls.js, line 16124)
[Log] [log] > – "[stream-controller]:" – "Loaded fragment 2 of level 3" (hls.js, line 8872)
[Log] [log] > – "failed to get media.buffered" – InvalidStateError: The object is in an invalid state. (hls.js, line 7967)
InvalidStateError: The object is in an invalid state.
[Log] [log] > – "failed to get media.buffered" – InvalidStateError: The object is in an invalid state. (hls.js, line 7967)
InvalidStateError: The object is in an invalid state.
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 0 cc: 0 of [0-29] track: 0, target: 0" (hls.js, line 9117)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 9871)
[Log] [log] > – "[transmuxer-interface, audio]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1↡        discontinuity: false↡      …" (hls.js, line 14923)
"[transmuxer-interface, audio]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1
        discontinuity: false
        trackSwitch: false
        contiguous: false
        accurateTimeOffset: false
        timeOffset: 0
        initSegmentChange: false"
[Log] [log] > – "[audio-stream-controller]:" – "Loaded fragment 0 of level 0" (hls.js, line 8872)
[Log] [log] > – "[mp4-remuxer]: reset next timestamp" (hls.js, line 15031)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js, line 9871)
[Warning] [warn] > – "[buffer-operation-queue]: Unhandled exception executing the current operation" (hls.js, line 18783)
[Error] [error] > – "[buffer-controller]: Error encountered while trying to append to the audio SourceBuffer" – InvalidStateError: The object is in an invalid state.
InvalidStateError: The object is in an invalid state.
    error
    onError (hls.js:19171)
    executeNext (hls.js:18784)
    append (hls.js:18749)
    onBufferAppending (hls.js:19201)
    emit (hls.js:14449)
    bufferFragmentData (hls.js:9269)
    _handleTransmuxComplete (hls.js:17660)
    _handleTransmuxComplete
    handleTransmuxComplete (hls.js:15057)
    onWorkerMessage (hls.js:15019)
[Warning] Error event: – Object (hls-demo.js, line 24772)
Object
[Log] [log] > – "[transmuxer.ts]: Flushed fragment 0 of level 0" (hls.js, line 15031)
[Log] [log] > – "[audio-stream-controller]:" – "PARSING->PARSED" (hls.js, line 9871)
[Log] [log] > – "failed to get media.buffered" – InvalidStateError: The object is in an invalid state. (hls.js, line 7967)
InvalidStateError: The object is in an invalid state.
[Log] [log] > – "[audio-stream-controller]:" – "Buffered audio sn: 0 of track 0 (frag:[0.000-5.952] > buffer:)" (hls.js, line 9010)
[Log] [log] > – "[audio-stream-controller]:" – "PARSED->IDLE" (hls.js, line 9871)
[Log] [log] > – "failed to get media.buffered" – InvalidStateError: The object is in an invalid state. (hls.js, line 7967)
InvalidStateError: The object is in an invalid state.
[Log] [log] > – "failed to get media.buffered" – InvalidStateError: The object is in an invalid state. (hls.js, line 7967)
InvalidStateError: The object is in an invalid state.
[Log] [log] > – "[audio-stream-controller]:" – "Loading fragment 1 cc: 0 of [0-29] track: 0, target: 5.952" (hls.js, line 9117)
[Log] [log] > – "[audio-stream-controller]:" – "IDLE->FRAG_LOADING" (hls.js, line 9871)
[Log] [log] > – "[stream-controller]:" – "FRAG_LOADING->PARSING" (hls.js, line 9871)
[Warning] [warn] > – "[buffer-operation-queue]: Unhandled exception executing the current operation" (hls.js, line 18783)
[Error] [error] > – "[buffer-controller]: Error encountered while trying to append to the video SourceBuffer" – InvalidStateError: The object is in an invalid state.
InvalidStateError: The object is in an invalid state.
    error
    onError (hls.js:19171)
    executeNext (hls.js:18784)
    append (hls.js:18749)
    onBufferAppending (hls.js:19201)
    emit (hls.js:14449)
    bufferFragmentData (hls.js:9269)
    _handleTransmuxComplete (hls.js:16251)
    _handleTransmuxComplete
    handleTransmuxComplete (hls.js:15057)
    onWorkerMessage (hls.js:15019)
[Error] [error] > – "[buffer-controller]: Failed 3 times to append segment in sourceBuffer"
    error
    onError (hls.js:19194)
    executeNext (hls.js:18784)
    append (hls.js:18749)
    onBufferAppending (hls.js:19201)
    emit (hls.js:14449)
    bufferFragmentData (hls.js:9269)
    _handleTransmuxComplete (hls.js:16251)
    _handleTransmuxComplete
    handleTransmuxComplete (hls.js:15057)
    onWorkerMessage (hls.js:15019)
[Log] [log] > – "[stream-controller]:" – "PARSING->ERROR" (hls.js, line 9871)
[Log] [log] > – "[audio-stream-controller]:" – "FRAG_LOADING->ERROR" (hls.js, line 9871)
[Log] [log] > – "stopLoad" (hls.js, line 25807)
[Log] [log] > – "[stream-controller]:" – "ERROR->STOPPED" (hls.js, line 9871)
[Log] [log] > – "[audio-stream-controller]:" – "ERROR->STOPPED" (hls.js, line 9871)
[Log] [log] > – "[subtitle-stream-controller]:" – "IDLE->STOPPED" (hls.js, line 9871)
[Warning] Error event: – Object (hls-demo.js, line 24772)
Object
[Error] Fatal error : bufferAppendError
    (anonymous function) (hls-demo.js:24847)
    emit (hls.js:14449)
    onError (hls.js:19198)
    executeNext (hls.js:18784)
    append (hls.js:18749)
    onBufferAppending (hls.js:19201)
    emit (hls.js:14449)
    bufferFragmentData (hls.js:9269)
    _handleTransmuxComplete (hls.js:16251)
    _handleTransmuxComplete
    handleTransmuxComplete (hls.js:15057)
    onWorkerMessage (hls.js:15019)

Chrome media internals output

No response

karlhorky commented 1 year ago

Output of mediastreamvalidator for the Vimeo HLS stream (we don't control what Vimeo delivers - we just upload videos):

$ mediastreamvalidator https://109vod-adaptive.akamaized.net/exp\=1690633098\~acl\=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A\~hmac\=1a10d7830fa3d1f2cf68dcc4f5b4042c3a9acbc7f1e064f567cfecb3bca9d3cb/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/15117771,2512a163,625b30fc,81be9a97/audio/0b1d6f8f/subtitles/101319728-English%20%28auto-generated%29-en-x-autogen-cc/master.m3u8\?absolute\=1\&external-subs\=1\&query_string_ranges\=1\&subcache\=1\&subtoken\=ec8793c0ed0ec59fb0a6559113ee52e50f043152b0162867e9d8530d8ab3f982
32m0c9e8776-3b06-44e0-b209-9d1b354e6adc~hmac=1a10d7830fa3d1f2cf68dcc4f5b4042c3a9acbc7f1e064f567cfecb3bca9d3cb/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/15117771,2512a163,625b30fc,81be9a97/audio/0b1d6f8f/subtitles/101319728-English%28auto-generateden-x-autogen-cc/master.m3u8?absolute=1&external-subs=1&query_string_ranges=1&subcache=1&subtoken=ec8793c0ed0ec59fb0a6559113ee52e50f043152b0162867e9d8530d8ab3f982 πŸš€mediastreamvalidator: mediastreamvalidator: Version 1.20.7 (618.19-230505)

Validate https://109vod-adaptive.akamaized.net/exp=1690633098~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=1a10d7830fa3d1f2cf68dcc4f5b4042c3a9acbc7f1e064f567cfecb3bca9d3cb/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/15117771,2512a163,625b30fc,81be9a97/audio/0b1d6f8f/subtitles/101319728-English%20%28auto-generated%29-en-x-autogen-cc/master.m3u8?absolute=1&external-subs=1&query_string_ranges=1&subcache=1&subtoken=ec8793c0ed0ec59fb0a6559113ee52e50f043152b0162867e9d8530d8ab3f982, fetch http
[/exp=1690633098~acl=/0c9e8776-3b06-44e0-b209-9d1b354e6adc/*~hmac=1a10d7830fa3d1f2cf68dcc4f5b4042c3a9acbc7f1e064f567cfecb3bca9d3cb/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/15117771,2512a163,625b30fc,81be9a97/audio/0b1d6f8f/subtitles/101319728-English (auto-generated)-en-x-autogen-cc/master.m3u8] Started root playlist download
[/exp=1690662000~acl=/0c9e8776-3b06-44e0-b209-9d1b354e6adc/*~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/625b30fc/playlist.m3u8] Started media playlist download
[/exp=1690662000~acl=/0c9e8776-3b06-44e0-b209-9d1b354e6adc/*~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/81be9a97/playlist.m3u8] Started media playlist download
[/exp=1690662000~acl=/0c9e8776-3b06-44e0-b209-9d1b354e6adc/*~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/15117771/playlist.m3u8] Started media playlist download
[/exp=1690662000~acl=/0c9e8776-3b06-44e0-b209-9d1b354e6adc/*~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/audio/0b1d6f8f/playlist.m3u8] Started media playlist download
[/exp=1690662000~acl=/0c9e8776-3b06-44e0-b209-9d1b354e6adc/*~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/subtitles/101319728/playlist.m3u8] Started media playlist download
[/exp=1690662000~acl=/0c9e8776-3b06-44e0-b209-9d1b354e6adc/*~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/2512a163/playlist.m3u8] Started media playlist download
[/exp=1690662000~acl=/0c9e8776-3b06-44e0-b209-9d1b354e6adc/*~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/subtitles/101319728/playlist.m3u8] All media files delivered and have end tag, stopping
[/exp=1690662000~acl=/0c9e8776-3b06-44e0-b209-9d1b354e6adc/*~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/audio/0b1d6f8f/playlist.m3u8] All media files delivered and have end tag, stopping
[/exp=1690662000~acl=/0c9e8776-3b06-44e0-b209-9d1b354e6adc/*~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/81be9a97/playlist.m3u8] All media files delivered and have end tag, stopping
[/exp=1690662000~acl=/0c9e8776-3b06-44e0-b209-9d1b354e6adc/*~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/15117771/playlist.m3u8] All media files delivered and have end tag, stopping
[/exp=1690662000~acl=/0c9e8776-3b06-44e0-b209-9d1b354e6adc/*~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/625b30fc/playlist.m3u8] All media files delivered and have end tag, stopping
[/exp=1690662000~acl=/0c9e8776-3b06-44e0-b209-9d1b354e6adc/*~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/2512a163/playlist.m3u8] All media files delivered and have end tag, stopping

--------------------------------------------------------------------------------
https://109vod-adaptive.akamaized.net/exp=1690633098~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=1a10d7830fa3d1f2cf68dcc4f5b4042c3a9acbc7f1e064f567cfecb3bca9d3cb/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/15117771,2512a163,625b30fc,81be9a97/audio/0b1d6f8f/subtitles/101319728-English%20%28auto-generated%29-en-x-autogen-cc/master.m3u8?absolute=1&external-subs=1&query_string_ranges=1&subcache=1&subtoken=ec8793c0ed0ec59fb0a6559113ee52e50f043152b0162867e9d8530d8ab3f982
--------------------------------------------------------------------------------
HTTP Content-Type: application/x-mpegURL

--------------------------------------------------------------------------------
https://109vod-adaptive.akamaized.net/exp=1690662000~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/625b30fc/playlist.m3u8?query_string_ranges=1
--------------------------------------------------------------------------------
HTTP Content-Type: application/x-mpegURL

Processed 30 out of 30 segments
Average segment duration: 5.947778
Total segment bitrates (all discontinuities): average: 262.45 kb/s, max: 486.16 kb/s
Playlist max bitrate: 642.474000 kb/s
Audio Group ID: audio-high

Discontinuity: sequence: 0, parsed segment count: 30 of 30, duration: 178.433 sec, average: 262.45 kb/s, max: 486.16 kb/s
Track ID: 1
Video Codec: avc1
Video profile: High
Video level: 3
Video resolution: 640x360
Video average IDR interval: 2.970556, Standard deviation: 0.299264
Video frame rate: 30.000

--------------------------------------------------------------------------------
https://109vod-adaptive.akamaized.net/exp=1690662000~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/81be9a97/playlist.m3u8?query_string_ranges=1
--------------------------------------------------------------------------------
HTTP Content-Type: application/x-mpegURL

Processed 30 out of 30 segments
Average segment duration: 5.947778
Total segment bitrates (all discontinuities): average: 827.30 kb/s, max: 1956.52 kb/s
Playlist max bitrate: 2082.929000 kb/s
Audio Group ID: audio-high

Discontinuity: sequence: 0, parsed segment count: 30 of 30, duration: 178.433 sec, average: 827.30 kb/s, max: 1956.52 kb/s
Track ID: 1
Video Codec: avc1
Video profile: High
Video level: 3.2
Video resolution: 1280x720
Video average IDR interval: 2.970556, Standard deviation: 0.299264
Video frame rate: 30.000

--------------------------------------------------------------------------------
https://109vod-adaptive.akamaized.net/exp=1690662000~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/15117771/playlist.m3u8?query_string_ranges=1
--------------------------------------------------------------------------------
HTTP Content-Type: application/x-mpegURL

Processed 30 out of 30 segments
Average segment duration: 5.947778
Total segment bitrates (all discontinuities): average: 532.32 kb/s, max: 1186.01 kb/s
Playlist max bitrate: 1327.700000 kb/s
Audio Group ID: audio-high

Discontinuity: sequence: 0, parsed segment count: 30 of 30, duration: 178.433 sec, average: 532.32 kb/s, max: 1186.01 kb/s
Track ID: 1
Video Codec: avc1
Video profile: High
Video level: 3.1
Video resolution: 960x540
Video average IDR interval: 2.970556, Standard deviation: 0.299264
Video frame rate: 30.000

--------------------------------------------------------------------------------
https://109vod-adaptive.akamaized.net/exp=1690662000~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/audio/0b1d6f8f/playlist.m3u8?query_string_ranges=1
--------------------------------------------------------------------------------
HTTP Content-Type: application/x-mpegURL

Processed 30 out of 30 segments
Average segment duration: 5.949867
Total segment bitrates (all discontinuities): average: 199.59 kb/s, max: 200.21 kb/s
Rendition group ID: audio-high

Discontinuity: sequence: 0, parsed segment count: 30 of 30, duration: 178.496 sec, average: 199.59 kb/s, max: 200.21 kb/s
Track ID: 1
Audio Codec: AAC-LC
Audio sample rate: 48000 Hz
Audio channels: 2
Audio channel layout: Stereo (L R)

--------------------------------------------------------------------------------
https://109vod-adaptive.akamaized.net/exp=1690662000~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/subtitles/101319728/playlist.m3u8?d=178.433333&subtoken=3a5a5c82b36cd70d53387ddbfcdd9b2ffb8ad0a7531e128c94d749686301d780
--------------------------------------------------------------------------------
HTTP Content-Type: application/x-mpegURL

Processed 1 out of 1 segments
Average segment duration: 178.433333
Total segment bitrates (all discontinuities): average: 0.17 kb/s, max: 0.17 kb/s
Rendition group ID: subs

Discontinuity: sequence: 0, parsed segment count: 1 of 1, duration: 178.433 sec
Track ID: 200
Track Codec: sbtl/wvtt

--------------------------------------------------------------------------------
https://109vod-adaptive.akamaized.net/exp=1690662000~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/2512a163/playlist.m3u8?query_string_ranges=1
--------------------------------------------------------------------------------
HTTP Content-Type: application/x-mpegURL

Processed 30 out of 30 segments
Average segment duration: 5.947778
Total segment bitrates (all discontinuities): average: 143.84 kb/s, max: 247.46 kb/s
Playlist max bitrate: 407.266000 kb/s
Audio Group ID: audio-high

Discontinuity: sequence: 0, parsed segment count: 30 of 30, duration: 178.433 sec, average: 143.84 kb/s, max: 247.46 kb/s
Track ID: 1
Video Codec: avc1
Video profile: High
Video level: 2.1
Video resolution: 426x240
Video average IDR interval: 2.970556, Standard deviation: 0.299264
Video frame rate: 30.000

--------------------------------------------------------------------------------
MUST fix issues
--------------------------------------------------------------------------------

Error: Illegal MIME type
--> Detail:  MIME type: application/x-mpegURL
--> Source:  https://109vod-adaptive.akamaized.net/exp=1690633098~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=1a10d7830fa3d1f2cf68dcc4f5b4042c3a9acbc7f1e064f567cfecb3bca9d3cb/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/15117771,2512a163,625b30fc,81be9a97/audio/0b1d6f8f/subtitles/101319728-English%20%28auto-generated%29-en-x-autogen-cc/master.m3u8?absolute=1&external-subs=1&query_string_ranges=1&subcache=1&subtoken=ec8793c0ed0ec59fb0a6559113ee52e50f043152b0162867e9d8530d8ab3f982

--> Detail:  MIME type: application/x-mpegURL
--> Source:  https://109vod-adaptive.akamaized.net/exp=1690662000~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/625b30fc/playlist.m3u8?query_string_ranges=1

--> Detail:  MIME type: application/x-mpegURL
--> Source:  https://109vod-adaptive.akamaized.net/exp=1690662000~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/81be9a97/playlist.m3u8?query_string_ranges=1

--> Detail:  MIME type: application/x-mpegURL
--> Source:  https://109vod-adaptive.akamaized.net/exp=1690662000~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/15117771/playlist.m3u8?query_string_ranges=1

--> Detail:  MIME type: application/x-mpegURL
--> Source:  https://109vod-adaptive.akamaized.net/exp=1690662000~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/audio/0b1d6f8f/playlist.m3u8?query_string_ranges=1

--> Detail:  MIME type: application/x-mpegURL
--> Source:  https://109vod-adaptive.akamaized.net/exp=1690662000~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/subtitles/101319728/playlist.m3u8?d=178.433333&subtoken=3a5a5c82b36cd70d53387ddbfcdd9b2ffb8ad0a7531e128c94d749686301d780

--> Detail:  MIME type: application/x-mpegURL
--> Source:  https://109vod-adaptive.akamaized.net/exp=1690662000~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/2512a163/playlist.m3u8?query_string_ranges=1

Error: Measured average bitrate compared to multivariant playlist declared value exceeds error tolerance
--> Detail:  Measured: 343.43 kb/s, Multivariant playlist: 305.00 kb/s, Error: 12.60%, Combined rendition name: audio
--> Source:  https://109vod-adaptive.akamaized.net/exp=1690633098~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=1a10d7830fa3d1f2cf68dcc4f5b4042c3a9acbc7f1e064f567cfecb3bca9d3cb/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/15117771,2512a163,625b30fc,81be9a97/audio/0b1d6f8f/subtitles/101319728-English%20%28auto-generated%29-en-x-autogen-cc/master.m3u8?absolute=1&external-subs=1&query_string_ranges=1&subcache=1&subtoken=ec8793c0ed0ec59fb0a6559113ee52e50f043152b0162867e9d8530d8ab3f982
--> Compare: https://109vod-adaptive.akamaized.net/exp=1690662000~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/2512a163/playlist.m3u8?query_string_ranges=1

--------------------------------------------------------------------------------
SHOULD fix issues
--------------------------------------------------------------------------------

Warning: #EXT-X-ALLOW-CACHE has been deprecated
--> Detail:  Line: #EXT-X-ALLOW-CACHE:YES
--> Source:  https://109vod-adaptive.akamaized.net/exp=1690662000~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0b1485dd14d11fc79ff53373d101ff56aaa7c4f65b14329d1e985b07304ffe2e/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/subtitles/101319728/playlist.m3u8?d=178.433333&subtoken=3a5a5c82b36cd70d53387ddbfcdd9b2ffb8ad0a7531e128c94d749686301d780

--------------------------------------------------------------------------------
CAUTION
--------------------------------------------------------------------------------
MediaStreamValidator only checks for violations of the HLS specification. For a more
comprehensive check against the HLS Authoring Specification, please run hlsreport
on the JSON output.
robwalch commented 1 year ago

https://109vod-adaptive.akamaized.net/exp=1690633098~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=1a10d7830fa3d1f2cf68dcc4f5b4042c3a9acbc7f1e064f567cfecb3bca9d3cb/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/15117771,2512a163,625b30fc,81be9a97/audio/0b1d6f8f/subtitles/101319728-English%20%28auto-generated%29-en-x-autogen-cc/master.m3u8?absolute=1&external-subs=1&query_string_ranges=1&subcache=1&subtoken=ec8793c0ed0ec59fb0a6559113ee52e50f043152b0162867e9d8530d8ab3f982

It seems the sample provided has already expired. Getting status 410.

Please include console logs from before the decode error.

If you can isolate the segments causing the error in Safari specifically (and they are valid mp4 segments that play in other browsers) perhaps by capturing them with Charles and making a new Playlist that would help us troubleshoot the issue.

karlhorky commented 1 year ago

Ok, I'l generate a new one - I think they expire within 4 hours, so I'll wait a few hours until at least 9AM in your location in Santa Clara Valley.

karlhorky commented 1 year ago

@robwalch here's another link (expires in 4 hours):

https://109vod-adaptive.akamaized.net/exp=1690849488~acl=%2F0c9e8776-3b06-44e0-b209-9d1b354e6adc%2F%2A~hmac=0bc69109bf25a33112f2f60c6adf4434eafcf9979252dfcf447269a41de30c1f/0c9e8776-3b06-44e0-b209-9d1b354e6adc/sep/video/15117771,2512a163,625b30fc,81be9a97/audio/0b1d6f8f/subtitles/101319728-English%20%28auto-generated%29-en-x-autogen-cc/master.m3u8?absolute=1&external-subs=1&query_string_ranges=1&subcache=1&subtoken=ec8793c0ed0ec59fb0a6559113ee52e50f043152b0162867e9d8530d8ab3f982
robwalch commented 1 year ago

There are no decode errors handling the lowest 240p variant only. All of the other variants (360, 540, 720) produce a decode error the moment their first segment is appended and attempted to be decoded.

I see the first segment of the lowest level appended and decoded successfully, but then the first segment of other variants loaded and appended over it which produces the decode error.

If the first segment of these variants is skipped, the appended media decodes correctly.

Safari with media logging enabled shows

[Error] SourceBuffer::sourceBufferPrivateDidReceiveRenderingError(53DE145703DC0001) 0
[Log] MediaSource::streamEndedWithError(53DE145703DCB821) decode
robwalch commented 1 year ago

In mp4-remuxer, remuxVideo aligns the video samples with the start of the media timeline using a PTS value of 63000. HSL.js is attempting to align on PTS to ensure video tracks start as close to 0 as possible regardless of composition time. The problem is, the first three sample have DTS below 63000, and putting these all at 0 is likely what results in the decoding error.

robwalch commented 1 year ago

Related to #5526

karlhorky commented 1 year ago

Thanks for the fix @robwalch ! Looking forward to trying this out πŸ‘

I'm assuming from the milestone that this will be out in hls.js@1.5.0 - which will probably be out in a few weeks?