Should XMP tags be used for videos?

Started by ww408, November 06, 2024, 03:54:18 PM

Previous topic - Next topic

ww408

ChatGPT says no:

QuoteMP4 files (and other video file formats) may contain metadata, but it typically follows different formats like ID3 (for audio) or QuickTime metadata (in the case of video). While MP4 files can technically store XMP metadata, it's not as common, and most video metadata editors (like ffmpeg or specialized MP4 metadata tools) interact with formats like ID3 or QuickTime instead.

Also, what video formats can ExifTool write to? I know that MOV, MP4, and MKV work, while AVI and WEBM are incompatible...



Phil Harvey

I would recommend XMP because it is the only reasonable metadata format to use across a wide range of file formats.

See here for a complete list of support for the various file types.

- 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 ($).

StarGeek

It does depend upon the end goal of adding the metadata. XMP is a much better standard and isn't the absolute mess that is Quicktime metadata. But ChatGPT is correct about Quicktime. A lot of video editors use ffmpeg at the core, and it doesn't deal with XMP data.

So for me, personal use gets XMP data. A video I'm putting in Plex or uploading to YouTube would get Quicktime data, as that will be read by those platforms.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

wywh

None of my Apple's apps can read XMP in movies (.mp4, .m4v, .mov). Currently Apple's apps and mobile devices prefer QuickTime Keys tags (and in a more limited manner overlapping similar UserData or ItemList tags) so I use the following tags and I check them with something like:

exiftool -a -G1 -s -n -api QuickTimeUTC=1 -CreateDate -Keys:All movie.mp4
[QuickTime]     CreateDate                      : 2001:01:01 12:00:00-05:00
[Keys]          CreationDate                    : 2001:01:01 12:00:00-05:00
[Keys]          GPSCoordinates                  : 40.74842 -73.98561 443.2
[Keys]          Title                           : Title
[Keys]          DisplayName                     : Headline
[Keys]          Author                          : Author
[Keys]          Keywords                        : Keyword 1,Keyword 2
[Keys]          Description                     : Description
[Keys]          Encoder                         : Final Cut Pro 10.8.1
[Keys]          UserRating                      : 3

I use XMP only if I want to preserve some tag that Keys does not support by copying it from the original iOS/iPadOS movie with '-XMP-exifEX:LensModel<CameraLensModel' '-XMP-exifEX:LensInfo<CameraFocalLength35mmEquivalent'.

ffmpeg v4-7 does not properly write Keys tags no matter what so I do not write them with ffmpeg at all and use exiftool to copy them from the original movie. Another option is to fix the metadata ffmpeg has tried to write with exiftool.

I usually use ffmpeg to convert .mkv, .webm, .avi, VP9, AV1, Opus, vorbis to Mac compatible H.265 AAC .mp4 movies although apps like IINA and VLC can play those non-Apple formats.

- Matti

ww408

#4
What do you think of other QuickTime tags like UserData and ItemList?

I just tried an ItemList tag and it showed up in mediaarea.net's MediaInfo, but a UserData tag didn't.

Is there any reason not to add more than one type of tag to a file, e.g. a keys:title and an xmp-dc:title?

StarGeek

Quote from: ww408 on November 07, 2024, 12:50:49 PMIs there any reason not to add more than one type of tag to a file, e.g. a keys:title and an xmp-dc:title?

If you write simply Title, then exiftool will write both Quicktime and XMP, though not in the Keys group.

C:\>exiftool -G1 -a -s -title Y:\!temp\Test4.mp4
[ItemList]      Title                           : title
[XMP-dc]        Title                           : title

You can change the default Quicktime groups in the .exiftool_config file. See the example.config file where it says
Change default location for writing QuickTime tags
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

wywh

Quote from: ww408 on November 07, 2024, 12:50:49 PMIs there any reason not to add more than one type of tag to a file, e.g. a keys:title and an xmp-dc:title?

Movie metadata is such a mess and a moving target that I prefer to use only those tags that my apps display. I try to avoid writing duplicate UserData, ItemList and XMP with -wm w so I don't have to sync them with Keys.

- Matti