hello,
thank you all for your contributions !
I want to add 2 XMP tags to a photo which don't have any.
- XMP Toolkit with a generic value "Adobe XMP Core 5.1.0-jc003"
- XMP Meta with with a specific xml"
XMP tags valuesAdobe XMP Core 5.1.0-jc003
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><subimage offset="12669" length="12669" paddingx="76" paddingy="56" width="428" height="56" rotation="180" /><timewatermark offset="22533" length="9864" width="426" height="53" paddingx="78" paddingy="58" isLTR="true" />
I try to follow this topic: Extract all xmp binary data if the data is spread over multiple sections (https://exiftool.org/forum/index.php?topic=15561.0) by doing this
- exiftool -xmp -b photo1.jpg ==> photo1 contains the XMP tags
- save the output in a file photo1.xmp
- exiftool -tagsfromfile photo1.xmp -xmp:all photo2.jpg ==> photo2 don't have XMP tags before the injection
XMP output<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.1.0-jc003">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:MiCamera="http://ns.xiaomi.com/photos/1.0/camera/"
MiCamera:XMPMeta="<?xml version='1.0' encoding='UTF-8' standalone='yes' ?><subimage offset="12669" length="12669" paddingx="76" paddingy="56" width="428" height="56" rotation="180" /><timewatermark offset="22533" length="9864" width="426" height="53" paddingx="78" paddingy="58" isLTR="true" />"/>
</rdf:RDF>
</x:xmpmeta>
I have the following message
Warning: No writable tags set photo1.xmp
0 image files updated
1 image files unchanged
What am I doing wrong?
Thanks for your help
ExifTool must have definitions for tags to be able to write them individually, but the MiCamera namespace is currently not defined (see here (https://exiftool.org/TagNames/XMP.html) for a list of pre-defined XMP tags).
But you can write the XMP as a block. This will write the unknown tags, but the only difference here is that existing XMP in the target file will be overwritten:
exiftool "-xmp<=photo1.xmp" photo2.jpg
The alternative is to create user-defined tags to allow these tags to be written individually. See the sample config file (https://www.exiftool.org/config.html) for instructions/examples on how to do this.
- Phil
it's work fine
thank you so much !!