Hello,
I am trying to extract a label that is called Video Coding Scheme ID and copy it to an XMP, if I execute the command:
Exiftool -u -Videocodingschemeid atom.mxf
I get:
Video Coding Scheme ID: 060E2B34-0401-010A-0401-020271080000
To create the XMP I use:
Exiftool -a -u -g1 -tagSfromfile atom.mxf -Videocodingschemeid atom.xmp
I get the following errors:
Warning: Tag 'videocodingschemeid' is not defined - atom.mxf
Warning: No Writable Tags Set from Atom.mxf
0 image Files Updated
1 image files unhanged
Any ideas?
An XMP sidecar file can only hold XMP data. That tag appears to be an MXF tag that doesn't have an equivalent tag in XMP.
You can copy it into any existing XMP tag (https://exiftool.org/TagNames/XMP.html) you would like. Either appending it to something like the Description, for example, "-Description<$Description Video Coding Scheme ID=$VideoCodingSchemeID" would add a note about the ID to the end of the Description, or you could repurpose a less common tag, for example, the CellTowerID used by some Sony Ericsson phones.
The former has the advantage that it would be visible in any program that reads metadata. The latter is too specialized to do so.
Thank you very much, I got it to work
I have another doubt, is it possible in any way "format" this information before copying it?
For example, if it detects that the text on the source tag is"0004" that copy the text "ProRes" on the destination tag.
Quote from: javiavid on March 25, 2021, 11:54:05 AM
For example, if it detects that the text on the source tag is"0004" that copy the text "ProRes" on the destination tag.
Like this?:
"-DSTTAG<${SRCTAG;$_ = 'ProRes' if /0004/}"- Phil
This works well, thanks Phil
Hi,
I'm trying to follow this post https://exiftool.org/forum/index.php/topic,4682.msg22369.html#msg22369 because the example is very similar, but I do not get it.
The value at atom.mxf is VideoCodingSchemeID:
060E2B34-0401-010A-0401-020271080000.
The command that I use is as follows:
Exiftool -Config Example.config -a -u -g1 -tagsfromfile atom.mxf "-Headline <VideoCodingSchemeID" atom.xmp
And the example.config file contains this:
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
Headline => {
Require => 'VideoCodingSchemeID',
ValueConv => q{
return test1 if $val eq '060e2b34-0401-010a-0401-020271080000';
return test2 if $val eq '060e2b34-0401-010a-0401-020271080001';
# ...
return undef;
},
},
},
);
1; # end
The result I get is that I always copy the original value (060e2b34-0401-010a-0401-020271080000) but not test1.
I would really like to do this process to a folder with subfolders and many MXF. I tell you so as not to bother you again in another post .. ;D
Thanks
If you are returning a string, you need to put quotes around it.
return 'test1' if $val eq '060e2b34-0401-010a-0401-020271080000';
I get the same message as before
1 image files updated
And the same thing happens.
I've tried with double quotes (I'm not sure if windows uses double quotes...) but the same thing happens.
This is the content of the XMP.
<?xpacket begin='' id='W5M0MpCehiHzreSzNTczkc9d'?>
<x:xmpmeta xmlns:x='adobe:ns:meta/' x:xmptk='Image::ExifTool 12.22'>
<rdf:RDF xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<rdf:Description rdf:about=''
xmlns:photoshop='http://ns.adobe.com/photoshop/1.0/'>
<photoshop:Headline>060e2b34-0401-010a-0401-020271080000</photoshop:Headline>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<?xpacket end='w'?>
Ah, I see the problem. In your command you're copying from the original VideoCodingSchemeID tag, so it's always going to pass the value of that tag. In order to copy from the user defined tag, you have to use the name of that new tag. Unfortunately, you given it the same name as Headline, so that will probably cause some unexpected results.
Rename the new tag and copy from that tag
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Composite' => {
MyCodingScheme=> {
Require => 'VideoCodingSchemeID',
ValueConv => q{
return 'test1' if $val eq '060e2b34-0401-010a-0401-020271080000';
return 'test2 if $val eq '060e2b34-0401-010a-0401-020271080001';
# ...
return undef;
},
},
},
);
1; # end
Exiftool -Config Example.config -a -u -g1 -tagsfromfile atom.mxf "-Headline<MyCodingScheme" atom.xmp
Thank you, although the problem continues ..
Warning: No writable tags set from atom.mxf
0 image files updated
1 image files unchanged
If you need it, I can send you the MXF file.