Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream with captions causes internal error on Safari #5669

Closed
5 tasks done
pauarge opened this issue Jul 17, 2023 · 0 comments · Fixed by #5675
Closed
5 tasks done

Stream with captions causes internal error on Safari #5669

pauarge opened this issue Jul 17, 2023 · 0 comments · Fixed by #5675

Comments

@pauarge
Copy link

pauarge commented Jul 17, 2023

What version of Hls.js are you using?

1.4.9

What browser (including version) are you using?

Safari 16.5.2 (18615.2.9.11.10)

What OS (including version) are you using?

macOS Ventura 13.4.1 (c)

Test stream

No response

Configuration

{
  debug: true
}

Additional player setup steps

Setting debug to true makes the player not play at all after the error. Setting it to false makes it work fine.

Checklist

  • The issue observed is not already reported by searching on Github under https:/video-dev/hls.js/issues
  • The issue occurs in the stable client (latest release) on https://hlsjs.video-dev.org/demo and not just on my page
  • The issue occurs in the latest client (main branch) on https://hlsjs-dev.video-dev.org/demo and not just on my page
  • The stream has correct Access-Control-Allow-Origin headers (CORS)
  • There are no network errors such as 404s in the browser console when trying to play the stream

Steps to reproduce

  1. Load a video with captions.
  2. Start playing the video.

Expected behaviour

Video should play and display the video's captions.

What actually happened?

No captions were shown and errors were thrown in the console.

Console output

[Log] [log] >"Debug logs enabled for \"Hls instance\" in hls.js version 1.4.9" (hls__js.js, line 334)
[Log] [log] >"stopLoad" (hls__js.js, line 23019)
[Log] [log] >"loadSource:..."
[Log] [log] >"[stream-controller]:""Trigger BUFFER_RESET" (hls__js.js, line 13908)
[Log] [log] >"attachMedia" (hls__js.js, line 22969)
[Log] [log] >"[buffer-controller]: Media source opened" (hls__js.js, line 16730)
[Log] [log] >"[subtitle-stream-controller]:""STOPPED->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[level-controller]:""manifest loaded, 20 level(s) found, first bitrate: 2045520" (hls__js.js, line 5359)
[Log] [log] >"2 bufferCodec event(s) expected" (hls__js.js, line 16824)
[Log] [log] >"startLoad(-1)" (hls__js.js, line 23010)
[Log] [log] >"[level-controller]:""Switching to level 6 from level -1" (hls__js.js, line 5421)
[Log] [log] >"[audio-track-controller]:""Updating audio tracks, 1 track(s) found in group:audio-HE-stereo-64" (hls__js.js, line 15807)
[Log] [log] >"[audio-track-controller]:""Switching to audio-track 0 \"en\" lang:en group:audio-HE-stereo-64" (hls__js.js, line 15847)
[Log] [log] >"[audio-stream-controller]:""Reset loading state" (hls__js.js, line 8308)
[Log] [log] >"[audio-stream-controller]:""STOPPED->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""IDLE->WAITING_TRACK" (hls__js.js, line 8408)
[Log] [log] >"[level-controller]:""Loading level index 6 with URI 1/1 ..." (hls__js.js, line 5551)
[Log] [log] >"[stream-controller]:""STOPPED->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[audio-track-controller]:""loading audio-track playlist 0 \"en\" lang:en group:audio-HE-stereo-64" (hls__js.js, line 15903)
[Log] [log] >"[audio-stream-controller]:""WAITING_TRACK->STOPPED" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""STOPPED->WAITING_TRACK" (hls__js.js, line 8408)
[Log] [log] >"[subtitle-stream-controller]:""IDLE->STOPPED" (hls__js.js, line 8408)
[Log] [log] >"[subtitle-stream-controller]:""STOPPED->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[stream-controller]:""Level 6 loaded [0,11][part-11--1], cc [0, 0] duration:69.33593000000002" (hls__js.js, line 13962)
[Log] [log] >"[buffer-controller]: Updating Media Source duration to 69.336" (hls__js.js, line 17245)
[Log] [log] >"[stream-controller]:""Loading fragment initSegment cc: 0 of [0-11] level: 6, target: 0" (hls__js.js, line 7721)
[Log] [log] >"[stream-controller]:""IDLE->FRAG_LOADING" (hls__js.js, line 8408)
[Log] [log] >"[audio-track-controller]:""audio-track 0 \"en\" lang:en group:audio-HE-stereo-64 loaded [0-11]" (hls__js.js, line 15780)
[Log] [log] >"[audio-stream-controller]:""Track 0 loaded [0,11][part-11--1],duration:69.41790999999999" (hls__js.js, line 15389)
[Log] [log] >"[audio-stream-controller]:""WAITING_TRACK->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""Loading fragment initSegment cc: 0 of [0-11] track: 0, target: 0" (hls__js.js, line 7721)
[Log] [log] >"[audio-stream-controller]:""IDLE->FRAG_LOADING" (hls__js.js, line 8408)
[Log] [log] >"[stream-controller]:""FRAG_LOADING->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[stream-controller]:""Buffered main sn: initSegment of level 6 (frag:[NaN-NaN] > buffer:)" (hls__js.js, line 7622)
[Log] [log] >"[stream-controller]:""Loading fragment 0 cc: 0 of [0-11] level: 6, target: 0" (hls__js.js, line 7721)
[Log] [log] >"[stream-controller]:""IDLE->FRAG_LOADING" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""FRAG_LOADING->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""Buffered audio sn: initSegment of track 0 (frag:[NaN-NaN] > buffer:)" (hls__js.js, line 7622)
[Log] [log] >"[audio-stream-controller]:""Loading fragment 0 cc: 0 of [0-11] track: 0, target: 0" (hls__js.js, line 7721)
[Log] [log] >"[audio-stream-controller]:""IDLE->FRAG_LOADING" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""Unknown video PTS for cc 0, waiting for video PTS before demuxing audio frag 0 of [0 ,11],track 0" (hls__js.js, line 15458)
[Log] [log] >"[audio-stream-controller]:""FRAG_LOADING->WAITING_INIT_PTS" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""Loaded fragment 0 of level 0" (hls__js.js, line 7490)
[Log] [log] >"[transmuxer-interface, main]: Starting new transmux session for sn: 0 p: -1 level: 6 id: 1↵        discontinuity: true↵        trackSwitch…" (hls__js.js, line 13122)
"[transmuxer-interface, main]: Starting new transmux session for sn: 0 p: -1 level: 6 id: 1
        discontinuity: true
        trackSwitch: true
        contiguous: false
        accurateTimeOffset: true
        timeOffset: 0
        initSegmentChange: true"
[Log] [log] >"[stream-controller]:""FRAG_LOADING->PARSING" (hls__js.js, line 8408)
[Log] [log] >"[stream-controller]:""Init video buffer, container:video/mp4, codecs[level/parsed]=[avc1.4d401f/avc1.4d401f]" (hls__js.js, line 14442)
[Log] [log] >"[audio-stream-controller]:""InitPTS for cc: 0 found from main: 9.866533333333333" (hls__js.js, line 15106)
[Log] [log] >"[audio-stream-controller]:""WAITING_INIT_PTS->FRAG_LOADING" (hls__js.js, line 8408)
[Log] [log] >"[transmuxer-interface, audio]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1↵        discontinuity: true↵      …" (hls__js.js, line 13122)
"[transmuxer-interface, audio]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1
        discontinuity: true
        trackSwitch: true
        contiguous: false
        accurateTimeOffset: false
        timeOffset: 0
        initSegmentChange: true"
[Log] [log] >"[audio-stream-controller]:""FRAG_LOADING->PARSING" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""Init audio buffer, container:audio/mp4, codecs[parsed]=[mp4a.40.5]" (hls__js.js, line 15665)
[Log] [log] >"[buffer-controller]: creating sourceBuffer(video/mp4;codecs=avc1.4d401f)" (hls__js.js, line 17305)
[Log] [log] >"[buffer-controller]: creating sourceBuffer(audio/mp4;codecs=mp4a.40.5)" (hls__js.js, line 17305)
[Log] [log] >"[stream-controller]:""Alternate track found, use video.buffered to schedule main fragment loading" (hls__js.js, line 14095)
[Log] [log] >"[transmuxer.ts]: Flushed fragment 0 of level 0" (hls__js.js, line 12631)
[Log] [log] >"[audio-stream-controller]:""PARSING->PARSED" (hls__js.js, line 8408)
[Log] [log] >"[stream-controller]:""Loaded fragment 0 of level 6" (hls__js.js, line 7490)
[Log] [log] >"[transmuxer.ts]: Flushed fragment 0 of level 6" (hls__js.js, line 12631)
[Log] [log] >"[stream-controller]:""PARSING->PARSED" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""Buffered audio sn: 0 of track 0 (frag:[0.086-6.076] > buffer:[0.086-6.076])" (hls__js.js, line 7622)
[Log] [log] >"[audio-stream-controller]:""PARSED->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[stream-controller]:""Buffered main sn: 0 of level 6 (frag:[0.000-5.906] > buffer:[0.133-6.039])" (hls__js.js, line 7622)
[Log] [log] >"[stream-controller]:""PARSED->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[stream-controller]:""Adapting to level 18 from level 6" (hls__js.js, line 13708)
[Log] [log] >"[level-controller]:""Switching to level 18 from level 6" (hls__js.js, line 5421)
[Log] [log] >"[audio-track-controller]:""Updating audio tracks, 1 track(s) found in group:audio-stereo-160" (hls__js.js, line 15807)
[Log] [log] >"[audio-track-controller]:""Switching to audio-track 0 \"en\" lang:en group:audio-stereo-160" (hls__js.js, line 15847)
[Log] [log] >"[audio-stream-controller]:""Reset loading state" (hls__js.js, line 8308)
[Log] [log] >"[audio-stream-controller]:""IDLE->WAITING_TRACK" (hls__js.js, line 8408)
[Log] [log] >"[audio-track-controller]:""loading audio-track playlist 0 \"en\" lang:en group:audio-stereo-160" (hls__js.js, line 15903)
[Log] [log] >"[level-controller]:""Loading level index 18 with URI 1/1 ..." (hls__js.js, line 5551)
[Log] [log] >"[stream-controller]:""IDLE->WAITING_LEVEL" (hls__js.js, line 8408)
[Log] [log] >"[audio-track-controller]:""audio-track 0 \"en\" lang:en group:audio-stereo-160 loaded [0-11]" (hls__js.js, line 15780)
[Log] [log] >"[audio-stream-controller]:""Track 0 loaded [0,11][part-11--1],duration:69.41404" (hls__js.js, line 15389)
[Log] [log] >"[audio-stream-controller]:""WAITING_TRACK->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""Loading fragment initSegment cc: 0 of [0-11] track: 0, target: 0" (hls__js.js, line 7721)
[Log] [log] >"[audio-stream-controller]:""IDLE->FRAG_LOADING" (hls__js.js, line 8408)
[Log] [log] >"[stream-controller]:""Level 18 loaded [0,11][part-11--1], cc [0, 0] duration:69.33593" (hls__js.js, line 13962)
[Log] [log] >"[stream-controller]:""WAITING_LEVEL->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[stream-controller]:""Loading fragment initSegment cc: 0 of [0-11] level: 18, target: 0" (hls__js.js, line 7721)
[Log] [log] >"[stream-controller]:""IDLE->FRAG_LOADING" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""FRAG_LOADING->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""Buffered audio sn: initSegment of track 0 (frag:[NaN-NaN] > buffer:[0.086-6.076])" (hls__js.js, line 7622)
[Log] [log] >"[audio-stream-controller]:""Loading fragment 0 cc: 0 of [0-11] track: 0, target: 0" (hls__js.js, line 7721)
[Log] [log] >"[audio-stream-controller]:""IDLE->FRAG_LOADING" (hls__js.js, line 8408)
[Log] [log] >"[stream-controller]:""FRAG_LOADING->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[stream-controller]:""Buffered main sn: initSegment of level 18 (frag:[NaN-NaN] > buffer:[0.133-6.039])" (hls__js.js, line 7622)
[Log] [log] >"[stream-controller]:""Loading fragment 1 cc: 0 of [0-11] level: 18, target: 6.039" (hls__js.js, line 7721)
[Log] [log] >"[stream-controller]:""IDLE->FRAG_LOADING" (hls__js.js, line 8408)
[Log] [log] >"[transmuxer-interface, audio]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1↵        discontinuity: true↵      …" (hls__js.js, line 13122)
"[transmuxer-interface, audio]: Starting new transmux session for sn: 0 p: -1 level: 0 id: 1
        discontinuity: true
        trackSwitch: true
        contiguous: false
        accurateTimeOffset: false
        timeOffset: 0
        initSegmentChange: true"
[Log] [log] >"[audio-stream-controller]:""FRAG_LOADING->PARSING" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""Init audio buffer, container:audio/mp4, codecs[parsed]=[mp4a.40.2]" (hls__js.js, line 15665)
[Log] [log] >"[buffer-controller]: changing audio sourceBuffer type to audio/mp4;codecs=mp4a.40.2" (hls__js.js, line 16944)
[Log] [log] >"[buffer-controller]: switching codec mp4a.40.5 to mp4a.40.2" (hls__js.js, line 16913)
[Log] [log] >"[audio-stream-controller]:""Loaded fragment 0 of level 0" (hls__js.js, line 7490)
[Log] [log] >"[transmuxer.ts]: Flushed fragment 0 of level 0" (hls__js.js, line 12631)
[Log] [log] >"[audio-stream-controller]:""PARSING->PARSED" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""Buffered audio sn: 0 of track 0 (frag:[0.089-6.084] > buffer:[0.086-6.084])" (hls__js.js, line 7622)
[Log] [log] >"[audio-stream-controller]:""PARSED->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""Loading fragment 1 cc: 0 of [0-11] track: 0, target: 6.084" (hls__js.js, line 7721)
[Log] [log] >"[audio-stream-controller]:""IDLE->FRAG_LOADING" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""FRAG_LOADING->PARSING" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""Loaded fragment 1 of level 0" (hls__js.js, line 7490)
[Log] [log] >"[transmuxer.ts]: Flushed fragment 1 of level 0" (hls__js.js, line 12631)
[Log] [log] >"[audio-stream-controller]:""PARSING->PARSED" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""Buffered audio sn: 1 of track 0 (frag:[6.084-12.079] > buffer:[0.086-12.079])" (hls__js.js, line 7622)
[Log] [log] >"[audio-stream-controller]:""PARSED->IDLE" (hls__js.js, line 8408)
[Log] [log] >"[transmuxer-interface, main]: Starting new transmux session for sn: 1 p: -1 level: 18 id: 1↵        discontinuity: false↵      …" (hls__js.js, line 13122)
"[transmuxer-interface, main]: Starting new transmux session for sn: 1 p: -1 level: 18 id: 1
        discontinuity: false
        trackSwitch: true
        contiguous: false
        accurateTimeOffset: true
        timeOffset: 5.95595
        initSegmentChange: true"
[Log] [log] >"[stream-controller]:""FRAG_LOADING->PARSING" (hls__js.js, line 8408)
[Log] [log] >"[stream-controller]:""Init video buffer, container:video/mp4, codecs[level/parsed]=[avc1.4d402a/avc1.4d402a]" (hls__js.js, line 14442)
[Debug] [debug] >"[texttrack-utils]: Error: addCue is failed for: [object VTTCue]" (hls__js.js, line 3466)
[Log] [log] >"[stream-controller]:""PARSING->ERROR" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""IDLE->ERROR" (hls__js.js, line 8408)
[Log] [log] >"stopLoad" (hls__js.js, line 23019)
[Log] [log] >"[stream-controller]:""ERROR->STOPPED" (hls__js.js, line 8408)
[Log] [log] >"[audio-stream-controller]:""ERROR->STOPPED" (hls__js.js, line 8408)
[Log] [log] >"[subtitle-stream-controller]:""IDLE->STOPPED" (hls__js.js, line 8408)
[Log] [log] >"destroy" (hls__js.js, line 22951)
[Log] [log] >"detachMedia" (hls__js.js, line 22979)
[Log] [log] >"[buffer-controller]: media source detaching" (hls__js.js, line 16845)
[Warning] [warn] >"[buffer-controller]: onMediaDetaching: The object is in an invalid state. while calling endOfStream" (hls__js.js, line 16850)

Chrome media internals output

No response

@pauarge pauarge added Bug Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Jul 17, 2023
@robwalch robwalch added Confirmed and removed Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Jul 17, 2023
@robwalch robwalch added this to the 1.4.10 milestone Jul 17, 2023
robwalch added a commit that referenced this issue Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants