Reputation: 21
I'd like to know if anyone can advise me regarding adding my own objects into the MP4 container structure.
For example I've found a typical file like the ones we use has the following 'atoms' / 'boxes' :
I'd like to add my own small custom object between the ftyp object and the moov object.
So the objects will appear as :
This will be a small object containing just a unique hash.
The question here is - will all the players out there ignore this new object that I'm adding - it has nothing to do with playback but is used to track our files internally.
I'd like to add a separate object as this will be done on the fly (cgi/php) as files are served so it is very easy to simply insert a new object near to the start of the file prior to serving the rest of it via http.
I did something similar using WMV files and all players that I can find ignore objects which they don't recognize. I'm wondering if it's the same situation with the MP4 files. Do players ignore objects that they don't expect, I guess this should be the default behavior of a player as it is an extensible container format?
Upvotes: 1
Views: 2018
Reputation: 319
"Note that in some specifications boxes were known as atoms. Note that the introduction of new atom types is discouraged; in general other extensibility features of the file format should be used if possible" -- Text form ISO/IEC 14496-12:2005
Upvotes: 2
Reputation: 2266
According to the mpeg standard documentation, all unknown atom types should be ignored by a given application. So you can in fact add your tracking atom safely. However, your atom should not have, in it's name, any lower-case letters, as they are reserved by the standard. For example, you can't have 'sams' as your atom name, but you can have 'SAMS'
Upvotes: 2