Skip to content

Parse meta box and related boxes in in QTFF format #459

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

stefwalter
Copy link

@stefwalter stefwalter commented May 27, 2025

In the QTFF format (ie: Quicktime .MOV files) the 'meta' atom
has is a container box instead of a full box. We add a flag
on the stream to indicate this difference in behavior once we
know we are parsing a QTFF format file.

This includes these atoms/boxes:
 * 'keys' which are the named keys in a QTFF 'meta' box
 * 'ilst' which typically follows the 'keys' atom within 'meta'
 * 'data' usually the the contents of an ilst atom

The 'data' box has many data types. Each type is described by the
enumeration dataBox.Types. Only support for those that have a test
file have been implemented so far:

 * UTF8
 * BE_UNSIGNED_INT
 * BE_SIGNED_INT
 * BE_FLOAT32

Tasks to complete before merging:

closes #309

@stefwalter
Copy link
Author

@ DenizUgur The first commit in this pull request is a bug fix to the existing code in the next branch. Would you like a separate pull request for that?

@DenizUgur
Copy link
Member

Yes, please. I tend to squash PRs so if it's not strictly relevant to other commits we should make it seperate.

@stefwalter
Copy link
Author

Moved the first commit into a separate pull request: #461

@stefwalter stefwalter force-pushed the qtff-meta-next branch 3 times, most recently from 1123394 to 5ff1071 Compare May 27, 2025 19:03
@stefwalter stefwalter marked this pull request as ready for review May 27, 2025 19:06
@stefwalter stefwalter changed the title WIP: Parse meta box and related boxes in in QTFF format Parse meta box and related boxes in in QTFF format May 27, 2025
@DenizUgur
Copy link
Member

Do you have a link to the relevant specification?

In the QTFF format (ie: Quicktime .MOV files) the 'meta' atom
has is a container box instead of a full box. We add a flag
on the stream to indicate this difference in behavior once we
know we are parsing a QTFF format file.

Fixes gpac#309
This includes these atoms/boxes:
 * 'keys' which are the named keys in a QTFF 'meta' box
 * 'ilst' which typically follows the 'keys' atom within 'meta'
 * 'data' usually the the contents of an ilst atom

The 'data' box has many data types. Each type is described by the
enumeration dataBox.Types. Only support for those that have a test
file have been implemented so far:

 * UTF8
 * BE_UNSIGNED_INT
 * BE_SIGNED_INT
 * BE_FLOAT32
@stefwalter
Copy link
Author

Do you have a link to the relevant specification?

Sure, here you go: https://developer.apple.com/documentation/quicktime-file-format/

In addition, various portions of the spec are linked in comments from the various box implementations.

I've rebased onto the latest next, and done a quick manual check to see if parsing worked. It does.

When you have an automated test framework, I'd be happy to add tests.

@DenizUgur
Copy link
Member

We have tests against File Format Conformance but I'm not sure if there were any QuickTime format files there.

I haven't considered how we'd go on and add tests for other files yet.

@DenizUgur DenizUgur changed the base branch from next to main June 19, 2025 15:08
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.

Incorrect parsing of "meta" box for screen recording file with Quicktime
2 participants