How do I remove the Caption field?

Started by bwanaRSA, October 19, 2022, 10:23:21 AM

Previous topic - Next topic

bwanaRSA

I'm using On1 Photo raw and when I export it gives me a "caption" field that is causing me no end of problems. How do I remove it?

I can remove Caption-Abstract using
exiftool -iptc:Caption-Abstract= but that's not the right field. I need to keep that one.

Phil Harvey

See FAQ 3 to determine the tag name and where it is stored, then consult the Tag Name documentation to see if this tag is writable.

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

bwanaRSA

Thanks Phil.

It says "string/" - does that mean I'm stuck with it?

StarGeek

What is the output of the command from FAQ 3?  "string/" shouldn't be the name and group of a tag.  You should see something like
[XMP-dc]        Description                     : This is a description
* 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).

bwanaRSA

Thanks StarGeek. When I do a exiftool -s for the image I find the description "Caption" under XMPToolkit                      : XMP Core 5.6.0

Phil Harvey

The "string/" in the Writable column of the tag name documentation means that it is writable as a string but avoided by default so you need to specify the full group name that you see with the -G1 option when extracting.  I think this is the XMP-acdsee group because that's the only Caption I can see in XMP.  So the command to remove this will be:

exiftool -xmp-acdsee:caption= 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 ($).

bwanaRSA

Thanks Phil

When I run with the -G1 option I see:

[XMP-iptcCore]  Caption                         :

Phil Harvey

That is unfortunate.  Whatever software wrote that tag is in error because this tag is not part of the IPTC-for-XMP specification.

You will need to create a user-defined tag to be able to write this.  The attached config file will do it for you, and allow you to delete the Caption tag with this command:

exiftool -config caption.config -caption= 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 ($).

bwanaRSA

Thank you so much for your help Phil!

I see there are numerous posts on creating automator actions to deal with this so that's what I'll do next.

StarGeek

Alternatively, the XMP can be removed and recopied.  The result is that XMP-iptcCore:Caption is removed and the contents copied to XMP-acdsee:Caption, which can be edited normally.

C:\>exiftool -G1 -a -s -xmp:all y:\!temp\Test4.jpg
[XMP-x]         XMPToolkit                      : Image::ExifTool 12.49
[XMP-iptcCore]  Caption                         : Badly created xmp
[XMP-dc]        Description                     : This is a description
[XMP-dc]        Title                           : Test4

C:\>exiftool -P -overwrite_original -xmp:all= -TagsFromFile @ -xmp:all y:\!temp\Test4.jpg
    1 image files updated

C:\>exiftool -G1 -a -s -xmp:all y:\!temp\Test4.jpg
[XMP-x]         XMPToolkit                      : Image::ExifTool 12.49
[XMP-acdsee]    Caption                         : Badly created xmp
[XMP-dc]        Description                     : This is a description
[XMP-dc]        Title                           : Test4
* 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).

Phil Harvey

Good point.  That is a quick way to remove all non-standard XMP.

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