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

MP4 CEA parser does not know that there could be multiple TRUN boxes #5328

Closed
avelad opened this issue Jun 19, 2023 · 4 comments · Fixed by #5422
Closed

MP4 CEA parser does not know that there could be multiple TRUN boxes #5328

avelad opened this issue Jun 19, 2023 · 4 comments · Fixed by #5422
Assignees
Labels
component: captions/subtitles The issue involves captions or subtitles priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@avelad
Copy link
Collaborator

avelad commented Jun 19, 2023

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

What version of Shaka Player are you using? Main branch

Can you reproduce the issue with our latest release version? Yes

Can you reproduce the issue with the latest code from main? Yes

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

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

What browser and OS are you using?
Chrome, macOS

For embedded devices (smart TVs, etc.), what model and firmware version are you using?

What are the manifest and license server URIs?

https://d2zihajmogu5jn.cloudfront.net/advanced-fmp4/master.m3u8

What configuration are you using? What is the output of player.getConfiguration()?

Default

What did you do?

Load the previous stream and enable the CC

What did you expect to happen?
CC are shown correctly

What actually happened?

Only bop! is shown. bip! is not displayed.

The problem is that the analyzer assumes that there is only one box trun, and that is not true, in this case there are 2 TRUN boxes, See: https://github.com/shaka-project/shaka-player/blob/main/lib/cea/mp4_cea_parser.js#L180

@avelad avelad added type: bug Something isn't working correctly component: captions/subtitles The issue involves captions or subtitles priority: P1 Big impact or workaround impractical; resolve before feature release labels Jun 19, 2023
@avelad avelad added this to the v4.4 milestone Jun 19, 2023
@avelad
Copy link
Collaborator Author

avelad commented Jun 20, 2023

Info from https://thumb.co.il/
Captura de pantalla 2023-06-20 a las 17 19 43

@joeyparrish
Copy link
Member

Ah, I see. So if there are multiple truns, that means multiple mdats, too, correct?

That shouldn't be too difficult to fix.

@joeyparrish joeyparrish self-assigned this Jun 20, 2023
@joeyparrish
Copy link
Member

I was wrong. One segment I'm analyzing has, for example:

  • moof
    • traf
      • trun
      • trun
  • mdat
  • moof
    • traf
      • trun
      • trun
  • mdat
  • moof
    • traf
      • trun
      • trun
  • mdat

So per moof, there are two trun boxes and one mdat. So parsing needs to reset on every moof, and I need to understand how to interpret the extra trun box. It looks like the samples need to be combined.

@joeyparrish
Copy link
Member

This suggests that the samples from both trun boxes need to be processed: https://bugzilla.mozilla.org/show_bug.cgi?id=1143491

joeyparrish added a commit to joeyparrish/shaka-player that referenced this issue Jul 19, 2023
joeyparrish added a commit that referenced this issue Jul 20, 2023
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Sep 18, 2023
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Sep 18, 2023
Robloche pushed a commit to Robloche/shaka-player that referenced this issue Nov 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: captions/subtitles The issue involves captions or subtitles priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants