News:

2023-03-15 Major improvements to the new Geolocation feature

Main Menu

Insert metadata tags into DASH formatted video segment .mp4

Started by salgarji, June 09, 2020, 12:58:29 PM

Previous topic - Next topic

salgarji

I've been trying to add some extra Metadata information to some mp4 segments using:

FFmpeg: ffmpeg -i /path/to/video0-0-N_mod.mp4 -movflags use_metadata_tags -metadata customtag=whatever /path/to/video0-0-N_mod2.mp4
where .mp4 input file is the result of: cat init-video0-0.mp4 video0-0-1.mp4 > video0-0-N_mod.mp4 (in order to have independent video format, be playable and readable by ffmpeg)
See how it transform the output: https://i.stack.imgur.com/6RU3x.jpg

Bento4: inserting custom atom/boxes into mp4 container. I've selected not-in-use atom names, of course. DASH players won't play it, maybe because the extra atoms alter the size, and therefore, some atom describing size becomes wrong. Maybe players try to read the custom atoms and they can't. I don't know, just guessing. (more info: https://github.com/google/shaka-player/issues/2631 -> other open thread of mine)

I've finally found ExifTool, and I really want to try to add some metadata to my video segments, keeping them understandable by Shaka Player in a web browser, but I can't find a topic to follow.
Do you know how can I do this? Is there any guide on how to insert custom metadata tags on video files? I've seen far more information about inserting this kind of information on images.

Thank you in advance and I apologize if is repeated!

Phil Harvey

You create custom user-defined tags via the ExifTool config file.  There isn't an example for how to add QuickTime tags in the sample config file, but you can take a look at the ExifTool source code for lots examples.  But first you will have to decide if you want the tags in the UserData, Keys or ItemList section.  Once you decide, you will add tags to the Image::ExifTool::QuickTime::UserData, Image::ExifTool::QuickTime::Keys or Image::ExifTool::QuickTime::ItemList table.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).