-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Large TFDT Base Media Decode Time values fail with JS_INTEGER_OVERFLOW #3784
Comments
Hi @stevemayhew. Did you end up implementing the approach you proposed ? We are facing the exact same problem, i'm curious to know what was your outcome. |
Can you check again against the main branch? Thanks! |
Hi @avelad . Are you asking because there is a specific commit which improved things, or just wondering if the issue is repro'able ? Also seeing the "component: HLS" label, just noting it does not matter which streaming protocol is used (DASH or HLS) |
We would like to know if it can still be repro'd with the latest code in main, because there were some recent changes to remove the restriction in cases where a slightly-inaccurate value is acceptable, such as when dividing by the timescale to compute a time in seconds. Those changes are not in a release version yet, so we would like you to check a build from (When we need an exact integer, such as when filling in a value for Thanks! |
Hi Joey. When parsing the Unfortunately that code is still there in the main branch. |
Ahh I see, in #5329, Would it be a good idea to use the inaccurate version in |
Yes, I think so. The only place I can think of where an exact media timestamp is required in timescale units is in DASH SegmentTemplate's @alexgerv, if you are motivated to contribute, I would be happy to review a PR that uses parseTFDTInaccurate in more places. New test cases for that would also be appreciated. Thanks! |
Thanks everyone! I have a test stream on an s3 bucket, I can make a zip of
it and share publicly but I don’t want to host it publicly
For A/V the code in the browser does the sync correct? And the video tag
gets time in seconds as a double float, so as long as the error is
consistent (that is matches any error with media source `timestampOffset` seems
it should work fine
Not familiar with processing of subtitles so can’t speak to that
…On Tue, Jul 11, 2023 at 4:10 PM Joey Parrish ***@***.***> wrote:
Yes, I think so. The only place I can think of where an exact media
timestamp is required in timescale units is in DASH SegmentTemplate's
$Time$ replacement. Everywhere else, we process media times in seconds,
where rounding of a 64-bit int with a large timescale shouldn't matter.
@alexgerv <https://github.com/alexgerv>, if you are motivated to
contribute, I would be happy to review a PR that uses parseTFDTInaccurate
in more places. New test cases for that would also be appreciated. Thanks!
—
Reply to this email directly, view it on GitHub
<#3784 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADBF6DOMQIH255GL2KVQH3XPXMPLANCNFSM5JDHN2NA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including |
@avelad @joeyparrish thank you very much for that change, it does fix the CEA-608 closed-captions issue we had with large |
Have you read the FAQ and checked for duplicate open issues?
Yes, it looks like #1610 might be the only possible related issue, but the chance it is seems remote. With this issue you get a
JS_INTEGER_OVERFLOW
error, no chance for playback.What version of Shaka Player are you using?
Multiple, all have this same issue
Can you reproduce the issue with our latest release version?
Yes
Can you reproduce the issue with the latest code from
master
?Yes
Are you using the demo app or your own custom app?
The off the rack demo app reproduces it. I'll attach a sample MP4 segment, I will look for a test case that parses a segment which should reproduce it easily.
If custom app, can you reproduce the issue using our demo app?
Yes
What browser and OS are you using?
Chrome Version 96.0.4664.55 (Official Build) (x86_64) on Mac OS X BigSur
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
N/A
What are the manifest and license server URIs?
I can create an HLS playlist, I have a simple single video segment that reproduces it.
What configuration are you using? What is the output of
player.getConfiguration()
?N/A
What did you do?
Play the indicated playlist.
What did you expect to happen?
I should play normally
What actually happened?
It fails immediately with
JS_INTEGER_OVERFLOW
The reason is the TRUN box Base Media Decode time is represented as 1/10 microsecond since the epoch, this is indicated in the init segment:
In the first sample, the base media decode time is:
So you can see:
Perfectly valid timestamp. Of course I understand Javascript cannot natively represent the this in an IEEE double.
If all the stakeholders agree on the approach I will take the bug and create a pull request with a solution. I'm already a contributor to ExoPlayer, Hls.js and other players.
My plan is to scale the value before it is converted to a JavaScript Number (53 bit mantissa double). Once it is seconds in a
shaka.media.SegmentReference
the changes end (as 2**53 seconds is a ridiculous time in the future)What I would do is use the BigInt poly fill (https://github.com/peterolson/BigInteger.js) and scale the value first with the timescale before using it. I would scale it with a solution similar to what ExoPlayer use in
Util.scaleLargeTimestamp()
to only use the scaled value.The change would:
DataViewReader. readBigInt64()
Util.scaleLargeTimestamp()
(It's the same CLA right?)_parseEMSG
andparseSIDX_
Other 64 bit integers in BMFF (length of boxes, etc) are extremely unlikely to exceed 2**53 so retrofitting this existing code would be rather pointless.
This is certainly not simple, so I would not start on it until (other then this design) until it is agreed this is a reasonable design.
FWIW this is a major Origin Server vendor and transcoder that produces the CMAF segments, and they are completely to spec processed by ExoPlayer with out any issues. Solution for us will deploy on desktop browsers and at some point in later on Tizen and WebOS based TVs.
The text was updated successfully, but these errors were encountered: