fix(mp4): tkhd track flags and duration for QuickTime and ISO compliance#4
Open
x46085 wants to merge 1 commit intoMichael-A-Kuykendall:mainfrom
Open
fix(mp4): tkhd track flags and duration for QuickTime and ISO compliance#4x46085 wants to merge 1 commit intoMichael-A-Kuykendall:mainfrom
x46085 wants to merge 1 commit intoMichael-A-Kuykendall:mainfrom
Conversation
- Set tkhd flags to 0x000003 (track_enabled | track_in_movie) so QuickTime and other strict players show the track. - Fix tkhd box layout: use three u32 (duration, reserved, reserved) instead of two u64 for version 0, and write actual track duration in movie timescale. - Thread duration from sample tables through build_tkhd_box and build_audio_tkhd_box.
Author
Owner
|
I'll look; this project is open source not open contribution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Discovered and made in support of this feature: elodin-sys/elodin#467
Description
flags == 0, so the track is not marked enabled or in-movie.u32fields (duration, reserved, reserved). The current code writes twou64s, making the box 4 bytes too long and misaligning following fields (e.g. on some Linux players).Solution
0x000003(track_enabled | track_in_movie).u64writes with threeu32writes (duration, reserved, reserved) and add aduration: u32parameter tobuild_tkhd_box_with_id.build_tkhd_boxandbuild_audio_tkhd_boxfor both video and audio tracks.Testing
cargo testpasses.Type of Change
Testing
Checklist
Related Issues
Fixes #