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

MEDIA.BUFFER_READ_OUT_OF_BOUNDS in cea_decoder parsing captions from h.265 content #3659

Closed
TheJohnBowers opened this issue Sep 23, 2021 · 4 comments · Fixed by #4683
Closed
Assignees
Labels
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

@TheJohnBowers
Copy link
Contributor

Have you read the FAQ and checked for duplicate open issues?
It is possibly related to #3634, but I am not sure. I can send some sample content which the others cannot provide.
Not sure if the problem is with the content, or shaka. A couple of interesting things to note though
1 - There are no actual captions in the content until about 1 minute in, but the cea_parser error occurs at about 20 seconds into the content
2 - Exoplayer does not have any issues with the content.

What link can we use to reproduce this?
I will send the content to your private address

What version of Shaka Player are you using?
v3.2.0-uncompiled

What browser and OS are you using?
Windows 10 - Edge - With HEVC decoder plugin

What did you do?
Playback content

What did you expect to happen?
Uninterrupted playback

What actually happened?

Attempting to buffer the 6th segment, this error occurs

Error: Shaka Error MEDIA.BUFFER_READ_OUT_OF_BOUNDS ()
    at new shaka.util.Error (https://shaka-player-demo.appspot.com/lib/util/error.js:94:17)
    at shaka.util.DataViewReader.outOfBounds_ (https://shaka-player-demo.appspot.com/lib/util/data_view_reader.js:267:12)
    at shaka.util.DataViewReader.readUint8 (https://shaka-player-demo.appspot.com/lib/util/data_view_reader.js:83:18)
    at shaka.cea.CeaDecoder.extract (https://shaka-player-demo.appspot.com/lib/cea/cea_decoder.js:120:16)
    at shaka.media.ClosedCaptionParser.parseFrom (https://shaka-player-demo.appspot.com/lib/media/closed_caption_parser.js:89:24)
    at shaka.media.MediaSourceEngine.appendBuffer (https://shaka-player-demo.appspot.com/lib/media/media_source_engine.js:547:52)
    at shaka.media.StreamingEngine.append_ (https://shaka-player-demo.appspot.com/lib/media/streaming_engine.js:1571:51)
    at async shaka.media.StreamingEngine.fetchAndAppend_ (https://shaka-player-demo.appspot.com/lib/media/streaming_engine.js:1261:9)

@ashish157
Copy link

ashish157 commented Sep 30, 2021

Im also facing the same issue. Here is the error log:

Error: Shaka Error MEDIA.BUFFER_READ_OUT_OF_BOUNDS ()
    at new shaka.util.Error (http://localhost/shaka-player/lib/util/error.js:94:17)
    at shaka.util.DataViewReader.outOfBounds_ (http://localhost/shaka-player/lib/util/data_view_reader.js:267:12)
    at shaka.util.DataViewReader.skip (http://localhost/shaka-player/lib/util/data_view_reader.js:204:18)
    at shaka.cea.Mp4CeaParser.parseMdat_ (http://localhost/shaka-player/lib/cea/mp4_cea_parser.js:239:16)
    at http://localhost/shaka-player/lib/cea/mp4_cea_parser.js:186:16
    at shaka.util.Mp4Parser.parseNext (http://localhost/shaka-player/lib/util/mp4_parser.js:187:7)
    at shaka.util.Mp4Parser.parse (http://localhost/shaka-player/lib/util/mp4_parser.js:93:12)
    at shaka.cea.Mp4CeaParser.parse (http://localhost/shaka-player/lib/cea/mp4_cea_parser.js:190:10)
    at shaka.media.ClosedCaptionParser.parseFrom (http://localhost/shaka-player/lib/media/closed_caption_parser.js:83:44)
    at shaka.media.MediaSourceEngine.appendBuffer (http://localhost/shaka-player/lib/media/media_source_engine.js:547:52)

I checked the previous versions and it seems the last version with which it worked is 3.0.13. From version 3.1.0 and later "BUFFER_READ_OUT_OF_BOUNDS" occurs. The problem occurs on both firefox and chrome (on Ubuntu 18.04.5 LTS). Also playback works fine with latest dash.js.

Edit: Just noticed this bug was reported for h.265. I'm seeing this error for h.264 as well.

@avelad
Copy link
Member

avelad commented Sep 30, 2021

Could it be a duplicate of #3608?
Have you tried the master branch to see if it happens?

Note: there are two commits possibly related to this: 97ba4df and 6a775e2

@ashish157
Copy link

I just checked-out master, recompiled and can confirm it is happening with latest master.

@joeyparrish joeyparrish added the type: bug Something isn't working correctly label Oct 1, 2021
@shaka-bot shaka-bot added this to the v3.3 milestone Oct 1, 2021
@TheJohnBowers
Copy link
Contributor Author

Yes I just ran it against the nightly build from your appspot demo. I assume that is built from latest master. It is still happening there.

@joeyparrish joeyparrish added the priority: P1 Big impact or workaround impractical; resolve before feature release label Oct 4, 2021
@michellezhuogg michellezhuogg self-assigned this Oct 19, 2021
@michellezhuogg michellezhuogg removed their assignment Mar 15, 2022
@avelad avelad modified the milestones: v3.3, v4.1 May 4, 2022
@avelad avelad modified the milestones: v4.1, v4.2 Jun 3, 2022
@avelad avelad modified the milestones: v4.2, v4.3 Aug 17, 2022
@avelad avelad self-assigned this Nov 10, 2022
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jan 9, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 9, 2023
gkatsev pushed a commit to sky-hugolima/shaka-player-contrib that referenced this issue Dec 6, 2023
…t#306)

* [PATCH] fix(dash): fix race condition in segment template (shaka-project#5842)

Fixes shaka-project#5760

* fix(cea): Fix not rendering CEA-608 Closed Captions (shaka-project#4683)

Also added H265 support and a framework for future TS CEA parser support.

Fixes shaka-project#4605
Fixes shaka-project#3659

Co-authored-by: Joey Parrish <[email protected]>

* fix(cea): Fix not rendering CEA-608 on encrypted mp4 segments (shaka-project#4756)

Fixes shaka-project#4605

Co-authored-by: Joey Parrish <[email protected]>

* fix: CEA 608 captions not work with H.265 video streams (shaka-project#5252)

Fix parsing of CEA 608 captions in H.265 video streams by handling 2
byte nal unit header.

Fixes shaka-project#5251

* fix: seeking in segment timeline returns incorrect index (shaka-project#5716)

Resolves shaka-project#5664

---------

Co-authored-by: Albin Larsson <[email protected]>
Co-authored-by: Álvaro Velad Galván <[email protected]>
Co-authored-by: Joey Parrish <[email protected]>
Co-authored-by: Aidan Ridley <[email protected]>
Co-authored-by: Casey Occhialini <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
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.

6 participants