Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#1 | Link |
|
Registered User
Join Date: Jun 2006
Posts: 111
|
How to tell if a mp4 file has metadata at the begining or not?
As I'm working with files for the web, I sometimes need to know if the mp4 files I recieve have their metadata at the begining. Mediainfo does not seems to provide such informations.
What tool can I use to check that? (Linux or OSX) Thank you. |
|
|
|
|
|
#3 | Link |
|
Software Developer
![]() Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,275
|
Parsing MP4 files is not that complicated. You always have "boxes" (aka "atoms"), each of which starts with an 8 Byte header (4 Byte size field + 4 Byte name in ASCII).
Boxes may also contain other boxes, but you don't need to care here. Just do the following in a loop: Read the 8 Byte header, then check the name and finally skip over exactly size-8 Bytes to the next box. Either you will encounter the "moov" box before the "mdat" box - or the other way around. All the meta-data and all the fancy tables are stored within the "moov" box.
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 5th September 2013 at 18:45. |
|
|
|
|
|
#4 | Link |
|
Registered User
Join Date: Aug 2010
Location: Paris
Posts: 52
|
MP4Box from the gpac package can do that.
Code:
MP4Box -info -v file.mp4 |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|