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

parse edts box implemented #375

Merged
merged 9 commits into from
Mar 5, 2021
Merged

parse edts box implemented #375

merged 9 commits into from
Mar 5, 2021

Conversation

nklhtv
Copy link
Contributor

@nklhtv nklhtv commented Feb 18, 2021

Hi,
Ive implemented parsing for edts atom by following this spec

@nklhtv
Copy link
Contributor Author

nklhtv commented Mar 3, 2021

Hi @gkatsev @gesinger @joeyparrish
Any chances for a review any time soon? I need this in my project.

Copy link
Contributor

@gesinger gesinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR @nklhrstv !

Looks good judging by the layout I see in https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html#//apple_ref/doc/uid/TP40000939-CH204-32975

One minor comment.

test/utils/mp4-helpers.js Outdated Show resolved Hide resolved
Copy link
Contributor

@gesinger gesinger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

i;
for (i = 8; entryCount; i += 12, entryCount--) {
result.edits.push({
segmentDuration: view.getUint32(i),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at the mp4 spec it seems like we need to look at result.version and if result.version is 0 then segmentDuration and mediaTime will 32 bit and if result.version is 1 then segmentDurationandmediaTime` will be 64 bit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for an example of grabbing 64 bit values (i know js doesn't actually support that many bits for numbers, but we can still get them up to 52 bits) see https://github.com/videojs/mux.js/blob/main/lib/tools/parse-sidx.js#L20-L21

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about BigInt? Ive used .getBigUint64.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the minimum supported node version for this library?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IE11 😂 (sorry)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check it now

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ive added 64 bit test case.
should be all good now

@nklhtv nklhtv marked this pull request as draft March 4, 2021 21:07
@nklhtv nklhtv marked this pull request as ready for review March 4, 2021 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants