Write specific XMP tags to images

Started by Martla, May 12, 2020, 05:35:14 AM

Previous topic - Next topic

Martla

Hi,

I am trying to copy some XMP tags from Camera family (e.g CentralWavelength and BandName) of my image to another image.

I am using the following command: exiftool -tagsfromFile originalimage.tif -xmp-Camera:BandName writeimage.tif but it fails to execute.
Probably it has a very simple solution, but i am not able to find it.
What am i missing?

<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0">
   <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
      <rdf:Description rdf:about="Pix4D Camera Information"
            xmlns:Camera="http://pix4d.com/camera/1.0">
         <Camera:RigName>RedEdge</Camera:RigName>
         <Camera:BandName>Blue</Camera:BandName>
         <Camera:CentralWavelength>475</Camera:CentralWavelength>


Thanks in advance!

Phil Harvey

There is a pix4d.config file included in the full distribution that you can use to write these tags with this command:

exiftool -config pix4d.config -tagsfromFile originalimage.tif -xmp-Camera:BandName FILE

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

Martla

Thanks for the prompt response, Phil!

Would it also be possible to copy more than one tag in one go? Something like:

exiftool -config pix4d.config -tagsfromFile originalimage.tif -xmp-Camera:BandName, CentralWavelength.... FILE

Or for each tag one needs to run separate commands?

StarGeek

exiftool -config pix4d.config -tagsfromFile originalimage.tif -xmp-Camera:BandName -xmp-CameraCentralWavelength -TAG3 -TAG4 -TAG5 -ETC FILE

See the -TagsFromFile option docs and Copying Examples.
* Did you read FAQ #3 and use the command listed there?
* Please use the Code button for exiftool code/output.
 
* Please include your OS, Exiftool version, and type of file you're processing (MP4, JPG, etc).