-
Notifications
You must be signed in to change notification settings - Fork 78
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
Extend support for ISO/IEC base media format #330
Conversation
MP4 files are often encoded using this format, the first 4 bytes are a box length and should not be part of the file identity magic.
Codecov Report
@@ Coverage Diff @@
## master #330 +/- ##
==========================================
+ Coverage 88.01% 88.11% +0.09%
==========================================
Files 10 10
Lines 626 631 +5
==========================================
+ Hits 551 556 +5
Misses 75 75
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No objections but would be better to have @IanButterworth double-check it.
Detect ISO/IEC 14496-12 ISO/IEC base media format files. These files start with | ||
a 32-bit big-endian length, and then the string 'ftyp' which is followed by | ||
details of the container and codec. Finding 'ftyp' is enough to know to dispatch | ||
to VideoIO. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finding 'ftyp' is enough to know to dispatch to VIdeoIO
I'm not an expert on video formats. Are there any references for this that can help me/others to clarify this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not an expert either, I used these three references to come to this conclusion:
Wikipedia has a readable introduction: https://en.wikipedia.org/wiki/ISO/IEC_base_media_file_format#File_type_box
There is a publicly available version of the spec here: https://standards.iso.org/ittf/PubliclyAvailableStandards/c068960_ISO_IEC_14496-12_2015.zip
Section 4.3.1 is the relevant part I think.
As a check, I compared to the C++ code here: https://github.com/DigiDNA/ISOBMFF
MP4 files are often encoded using this format, the first 4 bytes are a
box length and should not be part of the file identity magic.