I want to create a custom tag called "Host" and "Show" for .mp4 which shows who host this concert and what is this concert's name.
I create a config file below
%Image::ExifTool::UserDefined = (
'Image::ExifTool::QuickTime::UserData' => {
Host => {
Name => 'Host',
Writable => 'string',
},
Show => {
Name => 'Show',
Writable => 'string',
},
},
);
1;
and when I use the below command to check the file it shows Unknown_Host = "value I typed"
exiftool -a -G1 -v
and if I use the below command, it just not show the tag
exiftool file.mp4
Is there any way to make the first command's result show Host = "value I typed" instead of Unknown_Host = "value I typed"?
and the second one's shows Host = "value I typed" instead of no showing?
I know if I use -config in the two commands all things could be solved, but is there any way without using -config could do the samething?
I also tried ffmpeg command -movflags use_metadata_tags, it could actually do the result which is what I want, but it also make some other changes to my metadata. I did not figure out what it changed actually as so far. So, I think I'll just stick with finding a solution using ExifTool for now.
See this example (https://exiftool.org/forum/index.php?msg=80852)
Try
%Image::ExifTool::UserDefined = (
'Image::ExifTool::QuickTime::UserData' => {
'content.host' => { },
'content.show' => { },
},
);
1;
I haven't tested it, so I don't know if it works, but that would be more along the lines of the example in Phil's post. Defining it as a string isn't necessary, as string is the default.
Looking at the QuickTime.pm file in the source code would be a good place to see more examples of Quicktime tag definitions.
What you have done is correct, but you need to use the config file when reading if you want to see "Host" instead of "Unknown_Host". The tag IDs stored in the file are 4-character codes ("Host" in your case), and ExifTool won't know what tag name to use without the config file.
The longer tag ID's that StarGeek mentioned are for Keys tags, not UserData tags.
- Phil
Quote from: Phil Harvey on September 14, 2024, 10:39:43 AMWhat you have done is correct, but you need to use the config file when reading if you want to see "Host" instead of "Unknown_Host". The tag IDs stored in the file are 4-character codes ("Host" in your case), and ExifTool won't know what tag name to use without the config file.
The longer tag ID's that StarGeek mentioned are for Keys tags, not UserData tags.
- Phil
Thanks for reply. So may I infer that ffmpeg command -movflags use_metadata_tags somehow write the tag IDs into file and make it readable without any third party plugin and it is currently exiftool can not do?
I believe that ExifTool can write any metadata that ffmpeg can write.
- Phil
Quote from: ss702 on September 14, 2024, 11:07:50 AMSo may I infer that ffmpeg command -movflags use_metadata_tags somehow write the tag IDs into file and make it readable without any third party plugin and it is currently exiftool can not do?
Can you share a file that does this or at least the
ffmpeg you used?