-
Notifications
You must be signed in to change notification settings - Fork 33
Verified way of saving custom metadata in mp4 files
Mradul Dubey edited this page Sep 26, 2022
·
4 revisions
The header of a mp4 file (moov
) box has movie header(mvhd
) and track headers (trak/tkhd
) boxes to store metadata. But the format of these boxes is pretty much fixed.
Any other metadata given by user can be saved in the user data box (udata
) box.
- Inside the
moov/udata
there is ameta
box. - Each meta box has a given structure:
hdlr
andilst
. Theilst
box is a item list box similar to - box in html or map in programming.
- Each element in
ilst
has a key box which has thedata
box. - The value is stored in
data.Value
Important: For the metadata stored in moov/udta/ilst/
the length of the keys has to be 4.
Side Note: there is also a moov/meta box which stores all metadata key value pairs with key format starting with com.*.*
but I havent been able to get it to work.