How can I embed metadata into a custom XMP field w

2019-03-31 19:34发布

问题:

Can someone please explain how to embed metadata into a custom metadata field in an MP4 file with exiftool? I've searched all the docs and it seems to be related to the config file that needs to be created. Here is what I'm working with. (I know this isnt even close, as its not doing XMP fields, but I havent found a single working example with XMP fields yet.

 %Image::ExifTool::UserDefined = (
'Image::ExifTool::Exif::Main' => {
    0xd001 => {
        Name => 'Show',
        Writable => 'string',
        WriteGroup => 'IFD0',    
},
);
1; #end

The command I'm trying to run is:

 exiftool -config exifToolConfig -show="Lightning" /reachengine/media/mezzanines/2015/02/13/13/CanyonFlight.mp4

Running this in a linux environment.

What is the properly way to set XMP metadata on custom metadata fields via ExifTool in linux on MP4 files?

回答1:

The sample exiftool config file contains a number of working examples of custom XMP tags.

Basically, it is done like this:

%Image::ExifTool::UserDefined = (
    'Image::ExifTool::XMP::Main' => {
        xxx => {
            SubDirectory => {
                TagTable => 'Image::ExifTool::UserDefined::xxx',
            },
        },
    },
);
%Image::ExifTool::UserDefined::xxx = (
    GROUPS => { 0 => 'XMP', 1 => 'XMP-xxx', 2 => 'Other' },
    NAMESPACE => { 'xxx' => 'http://ns.myname.com/xxx/1.0/' },
    WRITABLE => 'string',
    MyNewXMPTag => { },
);

Then the command is

exiftool -config myconfig -mynewxmptag="some value" myfile.mp4