Skip to content

Playback freezes when switching videos with same configuration #9016

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

Open
daveisfera opened this issue Mar 21, 2025 · 3 comments
Open

Playback freezes when switching videos with same configuration #9016

daveisfera opened this issue Mar 21, 2025 · 3 comments
Labels
needs: triage This issue needs to be reviewed

Comments

@daveisfera
Copy link

daveisfera commented Mar 21, 2025

Description

These videos are recorded on separate devices but have the same configuration and playback doesn't work with either

Reduced test case

https://raw.githubusercontent.com/daveisfera/hls_switch_same_init/9ee116765e3296abc01cd3e530623321336d7755/first.m3u8

The other video is here:
https://raw.githubusercontent.com/daveisfera/hls_switch_same_init/9ee116765e3296abc01cd3e530623321336d7755/second.m3u8

And then playing them back to back is here:
https://raw.githubusercontent.com/daveisfera/hls_switch_same_init/9ee116765e3296abc01cd3e530623321336d7755/video.m3u8

Steps to reproduce

  1. Open above link in demo player
  2. Observe that it won't play

Errors

VIDEOJS: ERROR: (CODE:3 MEDIA_ERR_DECODE) Playback cannot continue. No available working or supported playlists

What version of Video.js are you using?

3.17.0

Video.js plugins used.

No response

What browser(s) including version(s) does this occur with?

Chrome 134.0.6998.118 (Official Build) (x86_64)

What OS(es) and version(s) does this occur with?

macOS 15.3.2

@daveisfera daveisfera added the needs: triage This issue needs to be reviewed label Mar 21, 2025
@mister-ben
Copy link
Contributor

If you use a main (multivariate, master) playlist that specifies the codecs it should work.

#EXT-X-STREAM-INF:…,CODECS="hvc1.1.6.L150.B0"

As you're just loading a media playlist, the codec is being derived from the video data. However, we're only getting hvc1 here, which Chrome's canPlayType() will say it can't play. It needs a full string such as hvc1.1.6.L150.B0. We'd need to either determine the full codec string, or just test against a hard coded codec string from HEVC.

@daveisfera
Copy link
Author

Interesting. For a point of reference, Safari, HLS.js and VLC don't require that info and the spec says that it's recommended but not required.

But anyways, I added a manifest with the CODECS info and the separate videos now play, but the one that switches runs into a problem and pauses:
https://raw.githubusercontent.com/daveisfera/hls_switch_same_init/8fd2b315a9bd55b244a84a2c05a4f43f885f7570/video_codecs.m3u8

@daveisfera
Copy link
Author

A co-worker was able to reproduce this issue using the previously linked example and Big Buck Bunny with the output set to H.265.

Here's links to those manifests to demonstrate the issue:

Works because it starts from the beginning:
https://raw.githubusercontent.com/daveisfera/repeat_big_buck_bunny/cad5ff1ab79529fd46bb75140446e1298d1e7cd5/repeat.m3u8

Fails when using any segment other than the first (but doing the same with output from ffmpeg works without issue):
https://raw.githubusercontent.com/daveisfera/repeat_big_buck_bunny/cad5ff1ab79529fd46bb75140446e1298d1e7cd5/repeat2.m3u8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: triage This issue needs to be reviewed
Projects
None yet
Development

No branches or pull requests

2 participants