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

HLS 4023: Bandwidth is required but on Safari works correctly without it #2270

Closed
alexandercerutti opened this issue Dec 3, 2019 · 5 comments
Assignees
Labels
status: archived Archived and locked; will not be updated status: working as intended The behavior is intended; this is not a bug

Comments

@alexandercerutti
Copy link
Contributor

Have you read the FAQ and checked for duplicate open issues?

Yes

What version of Shaka Player are you using?

2.5.6

Can you reproduce the issue with our latest release version?

Yes

Can you reproduce the issue with the latest code from master?

Didn't tested.

Are you using the demo app or your own custom app?

Custom App

If custom app, can you reproduce the issue using our demo app?

Yes (see more below for details)

What browser and OS are you using?

Chrome and Safari, macOS 10.15

What are the manifest and license server URIs?

What did you do?

See the description for more details.

What did you expect to happen?

Bandwidth HLS attribute not to be required

What actually happened?

Error on Bandwidth HLS attribute.


So, I was testing for VOD HLS contents and discovered this: our content provider serves us HLSs without BANDWIDTH attribute.

So this is the specific steps that I made to discover this:

  1. I took a VOD HLS url and used custom app to reproduce it on Safari. It went fine.
  2. I tried with the same URL, on Chrome: it failed with error 4023 (HLS_REQUIRED_ATTRIBUTE_MISSING) and data reporting attribute BANDWIDTH is missing.
  3. I tried again on Safari with configuration streaming.useNativeHlsOnSafari => false and got the same error.
  4. Tried all again on the demo app and got the same results.

Also, this is the same result I got when I tested for #2267 and is linked (because part of the same investigation) to #2268 - just to have more context.

So, what seems to be the problem, is that Safari doesn't require BANDWIDTH attribute while Shaka does. Is there a specific reason for this or is it just a mistake in the code?

I'm going to send you via email one of the URLs with some instructions, so you can test by yourself.

Thank you!

@alexandercerutti
Copy link
Contributor Author

The URL I've sent you might have been fixed with BANDWIDTH value, so it might not be working anymore. You have to try with a manifest without the BANDWIDTH attribute.

@alexandercerutti alexandercerutti changed the title HLS 4023: Bandwidth is required but on Safari works correctly HLS 4023: Bandwidth is required but on Safari works correctly without it Dec 18, 2019
@TheModMaker
Copy link
Contributor

We require it because it is the backbone of how ABR works. Without it we have no way of guessing which streams to pick. This may work with only a single stream, but with multiple streams, it becomes difficult to impossible to determine what streams we have enough bandwidth to play.

Also, according to the HLS spec, this is a required attribute:

4.3.4.2.  EXT-X-STREAM-INF

...
Every EXT-X-STREAM-INF tag MUST include the BANDWIDTH attribute.

@TheModMaker TheModMaker added the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jan 6, 2020
@alexandercerutti
Copy link
Contributor Author

@TheModMaker Okay, that's good to know. Thank you.
So, you mean that probably Safari internal implementation allows playing without the BANDWIDTH attribute because it may know when it has enough bandwidth?

@shaka-bot shaka-bot removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Jan 6, 2020
@TheModMaker
Copy link
Contributor

Yes. It may parse the init segment or fetch the first segments from the streams to guess the bandwidth. There are other ways of guessing how much bandwidth is needed to play a stream, but the best way is explicitly with the BANDWIDTH attribute.

@alexandercerutti
Copy link
Contributor Author

alexandercerutti commented Jan 6, 2020

Okay, thank you for the explanations! 😄

@TheModMaker TheModMaker self-assigned this Feb 27, 2020
@TheModMaker TheModMaker added the status: working as intended The behavior is intended; this is not a bug label Feb 27, 2020
@shaka-project shaka-project locked and limited conversation to collaborators Mar 6, 2020
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated status: working as intended The behavior is intended; this is not a bug
Projects
None yet
Development

No branches or pull requests

3 participants