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

4030 - HLS_COULD_NOT_PARSE_SEGMENT_START_TIME with live content #2268

Closed
alexandercerutti opened this issue Dec 2, 2019 · 11 comments
Closed
Assignees
Labels
component: HLS The issue involves Apple's HLS manifest format status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@alexandercerutti
Copy link
Contributor

alexandercerutti commented Dec 2, 2019

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 tried.

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

Both

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

https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8

What browser and OS are you using?

Chrome on macOS 10.15.1

What are the manifest and license server URIs?

(explained below the form)

What did you do?

  • (explained below the form)

What did you expect to happen?

HLS Content to being reproduced correctly.

What actually happened?

Error messages

===

So, I'm testing for some live HLS streams. I tried with some from our content server and we received this error, along with error 4030 (HLS_COULD_NOT_PARSE_SEGMENT_START_TIME)

error

So we told ourselves, "okay, so our content server seems to not support like "range" requests (I suppose?), so fallbacks but CORS fail. We have to tell the ones who handle requests. Well, okay...

So we tried to play a sample HLS (VOD) from Apple in your Demo:

https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8

It works perfectly in Safari on its own, but both on Demo and our implemented Player, it fails with the above error 4030.

https://shaka-player-demo.appspot.com/demo/#audiolang=it-IT;textlang=it-IT;asset=https://devstreaming-cdn.apple.com/videos/streaming/examples/img_bipbop_adv_example_ts/master.m3u8;panel=CUSTOM%20CONTENT;build=uncompiled;nativecontrols

We also tried to install mux.js (but we are using webpack, I don't know if, in the final bundle, it got imported before or after Shaka).

We think there might be some kind of problem with Shaka (or it could be something in common with Apple and our stream?).

Thank you.

@alexandercerutti alexandercerutti changed the title 4030 4030 - HLS_COULD_NOT_PARSE_SEGMENT_START_TIME with both live and vods Dec 2, 2019
@alexandercerutti
Copy link
Contributor Author

So, through the URL above, I went in debug step-by-step in Shaka and discovered that it has an audio track with mimeType audio/aac (which seems to be unsupported yet - see #1083 (comment)).


For what concerns our LIVE contents, we found that our streams seems to fail on this line: https://github.com/google/shaka-player/blob/64896d70b0b916e379070b1e99f76efc9b118d71/lib/hls/hls_parser.js#L1793

Any clues on how could this be possible in the streams from our content providers? Do they have to add, edit or do something specific, in your knowledge?


Anyway, I looked better at our webpack output bundle and found that mux.js wasn't being imported in it. So, I have fixed that through issue #1927, and I've tested with a known-to-be-working TS stream, that wasn't working without mux.js.

@alexandercerutti alexandercerutti changed the title 4030 - HLS_COULD_NOT_PARSE_SEGMENT_START_TIME with both live and vods 4030 - HLS_COULD_NOT_PARSE_SEGMENT_START_TIME with live content Dec 3, 2019
@joeyparrish
Copy link
Member

Is it possible that the mime type audio/aac means it's not in a TS container? If that's the case, that would explain why the TS parser fails.

@alexandercerutti
Copy link
Contributor Author

alexandercerutti commented Jan 4, 2020

I actually don't know. I'm not that into these topics 😅. Do you mean TS parser in mux.js?

@joeyparrish
Copy link
Member

No, the failure point you linked to in hls_parser.js is in Shaka Player. It's a minimal TS parser that just extracts timestamps from TS segments. That is what seems to be failing.

@TheModMaker
Copy link
Contributor

What's happening is we don't support raw AAC. We can't parse it, so you get a COULD_NOT_PARSE_SEGMENT_START_TIME error. You didn't provide the stream that produces the second error, so I can't be sure; but my guess is the stream has a .ts extension so we assume it is TS, but it may be AAC or another format. If you provided the stream that produced that error, we could diagnose more.

@alexandercerutti
Copy link
Contributor Author

I'll try to provide you something via email, but I'm not sure I'll be able to provide you something valid since our content (as you can see from the screenshot), passes through akamai and has an expiration time. Meanwhile, thank you.

@alexandercerutti
Copy link
Contributor Author

@TheModMaker @joeyparrish Okay, I'm going to send you an email a live stream that fails due to PESPacket missing.

Thank you very much!

@joeyparrish
Copy link
Member

I was unable to access the stream just now. I got an HTTP 403 error. We can work this out via email, and then resume here. Thanks!

@joeyparrish joeyparrish added type: bug Something isn't working correctly and removed needs triage labels Jan 7, 2020
@joeyparrish
Copy link
Member

I am able to access your content using an Italian VPN to work around the geo-restriction. I was able to fetch the TS files that we failed to parse, and I can confirm that they look valid in an independent parser.

So this seems to be a bug in the HLS parser's timestamp extraction code for TS segments.

@shaka-bot shaka-bot added this to the v2.6 milestone Jan 7, 2020
@joeyparrish
Copy link
Member

It's not a regression, at least. This content fails in Shaka Player all the way back to v2.3.0, the first HLS-enabled release. There must be something about the structure of the TS segment that our parser has never been able to handle.

@joeyparrish joeyparrish added the component: HLS The issue involves Apple's HLS manifest format label Jan 11, 2020
@joeyparrish
Copy link
Member

This is working now in the nightly build. It was fixed by 1ee3284, which will be cherry-picked to v2.5.9.

@shaka-project shaka-project locked and limited conversation to collaborators Mar 24, 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
component: HLS The issue involves Apple's HLS manifest format status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

4 participants