Skip to content

fragParsingError with aes128 encrypted Low-Latency HLS #5212

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

Closed
5 tasks done
liyuanliu1991 opened this issue Feb 7, 2023 · 2 comments
Closed
5 tasks done

fragParsingError with aes128 encrypted Low-Latency HLS #5212

liyuanliu1991 opened this issue Feb 7, 2023 · 2 comments
Labels
Bug Confirmed Bug report confirmed or reproduced.
Milestone

Comments

@liyuanliu1991
Copy link

liyuanliu1991 commented Feb 7, 2023

What version of Hls.js are you using?

v1.3.2

What browser (including version) are you using?

Safari Version 16.3 (18614.4.6.1.5)

What OS (including version) are you using?

Ventura 13.2

Test stream

https://liujerry.egress.babelfish-us-west-2.com/out/v1/fe77f06698f846f58e83011d9bcbef6c/index.m3u8

Configuration

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

Additional player setup steps

No response

Checklist

Steps to reproduce

  1. Type https://liujerry.egress.babelfish-us-west-2.com/out/v1/fe77f06698f846f58e83011d9bcbef6c/index.m3u8 this url in the hls.js ( https://hls-js.netlify.app/demo ) and click play
  2. You will see this video stopped after a few seconds.
  3. This video is played normally in most of the other players like safari.
  4. If we didn't encrypt the segments, it can be played normally in hls.js.
  5. We manually download the segments from the output and use openssl to decrypt them, we can get playable decrypted segments from all output segments.
    The systemId is 3ea8778f-7742-4bf9-b18b-e834b2acbd47 , key provider url is https://um0ikww15m.execute-api.us-west-2.amazonaws.com/EkeStage/copyProtection, encryption method is aes 128. The key server provides us the secretKey, we generate our own iv in our code.

Expected behaviour

This url should be playable normally in hls.js.

What actually happened?

Hls.js stopped playing it after a few seconds.

Console output

Status output:
6.254 | Media element detached
6.257 | Loading https://liujerry.egress.babelfish-us-west-2.com/out/v1/fe77f06698f846f58e83011d9bcbef6c/index.m3u8
6.26 | Loading manifest and attaching video element...
6.267 | 1 quality levels found
6.268 | Manifest successfully loaded
6.338 | Media element attached, trying to recover media error.
17.333 | Media element detached
17.397 | Media element attached, trying to swap audio codec and recover media error.
17.949 | Media element detached
17.982 | Media element attached, cannot recover. Last media error recovery failed.

Error output:
17.33 | Parsing error:Found 3642 TS packet/s that do not start with 0x47
17.331 | A media error occurred: fragParsingError
17.945 | Parsing error:Found 3642 TS packet/s that do not start with 0x47
17.947 | A media error occurred: fragParsingError
18.449 | Parsing error:Found 3642 TS packet/s that do not start with 0x47
18.451 | A media error occurred: fragParsingError

Chrome media internals output

Not using chrome.
@liyuanliu1991 liyuanliu1991 added Bug Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Feb 7, 2023
@robwalch
Copy link
Collaborator

robwalch commented Feb 7, 2023

@robwalch robwalch changed the title fragParsingError and TS packet/s that do not start with 0x47 when the stream is encrypted with aes128 fragParsingError with aes128 encrypted Low-Latency HLS Feb 7, 2023
@robwalch robwalch added Confirmed Bug report confirmed or reproduced. and removed Needs Triage If there is a suspected stream issue, apply this label to triage if it is something we should fix. labels Feb 7, 2023
@robwalch robwalch added this to the 1.3.3 milestone Feb 7, 2023
@liyuanliu1991
Copy link
Author

Thank you so much!

@robwalch robwalch added the Verify Fixed An unreleased bug fix has been merged and should be verified before closing. label Feb 7, 2023
@robwalch robwalch closed this as completed Feb 7, 2023
@robwalch robwalch removed the Verify Fixed An unreleased bug fix has been merged and should be verified before closing. label Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Confirmed Bug report confirmed or reproduced.
Projects
None yet
Development

No branches or pull requests

2 participants