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

Support old QuickTime atoms #7

Open
7 of 12 tasks
sunfish-shogi opened this issue Jul 17, 2020 · 2 comments
Open
7 of 12 tasks

Support old QuickTime atoms #7

sunfish-shogi opened this issue Jul 17, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@sunfish-shogi
Copy link
Contributor

sunfish-shogi commented Jul 17, 2020

hdlr atom

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

  • no version , no flags

Android detects by path.
https://android.googlesource.com/platform/frameworks/av/+/master/media/extractors/mp4/MPEG4Extractor.cpp#2382

udta atom

  • terminate code 0x00000000

Android: https://android.googlesource.com/platform/frameworks/av/+/master/media/extractors/mp4/MPEG4Extractor.cpp#989

alac sample entry

  • 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

  • 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

  • ilst atom
  • data atom
  • mean atom
  • name atom

Android: https://android.googlesource.com/platform/frameworks/av/+/master/media/extractors/mp4/MPEG4Extractor.cpp#2879

AudioSampleEntry

wave atom

  • 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

@sunfish-shogi sunfish-shogi self-assigned this Jul 17, 2020
@sunfish-shogi sunfish-shogi changed the title Support old QuickTime atom Support old QuickTime atoms Jul 17, 2020
@sunfish-shogi sunfish-shogi added the enhancement New feature or request label Jul 18, 2020
This was referenced Jul 23, 2020
@sunfish-shogi
Copy link
Contributor Author

sunfish-shogi commented Jul 24, 2020

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.

Screen Shot 2020-07-25 at 2 57 02

Screen Shot 2020-07-25 at 3 06 09

Screen Shot 2020-07-25 at 3 01 01

Screen Shot 2020-07-25 at 3 08 13

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.

@sunfish-shogi
Copy link
Contributor Author

Related: #132

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant