Open sunfish-shogi opened 4 years ago
Sometimes, name
field of hdlr box has 0x00 twice.
Following images are mp4tool-dump and hexdump of the music mp4 file written by Sony's product.
In this file, only hdlr box which is under moov->udta->meta has 34 bytes.
And this box has handler type mdir
and has appl
at next 4 bytes.
https://github.com/abema/go-mp4/pull/4/files#diff-e6c932c76afb2ffea73af8d48df3dd27R19
Further, also in this PR, empty string is written by []byte{0x00, 0x00}
.
However, I never find reference to this rule in any documents. (ex. ISO/IEC, Apple, Wikileaks, ...) So, I never understand whether this format is a special case of Pascal style string or any other rule.
hdlr atom
name
(PR: https://github.com/abema/go-mp4/pull/4)Bento4 detects pstring by length. https://github.com/axiomatic-systems/Bento4/blob/v1.6.0-637/Source/C++/Core/Ap4HdlrAtom.cpp#L95
Libquicktime detects by component_type field. https://sourceforge.net/p/libquicktime/git/ci/master/tree/src/hdlr.c#l208
Android detects by path. https://android.googlesource.com/platform/frameworks/av/+/master/media/extractors/mp4/MPEG4Extractor.cpp#2570
meta atom
version
, noflags
Android detects by path. https://android.googlesource.com/platform/frameworks/av/+/master/media/extractors/mp4/MPEG4Extractor.cpp#2382
udta atom
Android: https://android.googlesource.com/platform/frameworks/av/+/master/media/extractors/mp4/MPEG4Extractor.cpp#989
alac sample entry
Android: https://android.googlesource.com/platform/frameworks/av/+/master/media/extractors/mp4/MPEG4Extractor.cpp#1650, https://android.googlesource.com/platform/frameworks/av/+/master/media/extractors/mp4/MPEG4Extractor.cpp#1204
keys atom
https://developer.apple.com/documentation/quicktime-file-format/metadata_item_keys_atom
Android: https://android.googlesource.com/platform/frameworks/av/+/master/media/extractors/mp4/MPEG4Extractor.cpp#2598
ilst atom
Android: https://android.googlesource.com/platform/frameworks/av/+/master/media/extractors/mp4/MPEG4Extractor.cpp#2879
AudioSampleEntry
wave atom
Bento4: https://github.com/axiomatic-systems/Bento4/blob/v1.6.0-637/Source/C%2B%2B/Core/Ap4AtomFactory.cpp#L794 Android: https://android.googlesource.com/platform/frameworks/av/+/master/media/extractors/mp4/MPEG4Extractor.cpp#919
ctts atom
(investigation required)
Bento4: https://github.com/axiomatic-systems/Bento4/blob/v1.6.0-637/Source/C%2B%2B/Core/Ap4CttsAtom.cpp#L98
wide atom
http://xhelmboyx.tripod.com/formats/mp4-layout.txt
fiel atom
http://xhelmboyx.tripod.com/formats/mp4-layout.txt https://developer.apple.com/library/archive/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html