ExifTool Forum

ExifTool => The "exiftool" Application => Topic started by: frereroy on April 19, 2017, 03:51:40 PM

Title: Eliminating XMP blocks
Post by: frereroy on April 19, 2017, 03:51:40 PM
I am trying to eliminate 2 tags from XMP that were filled with a "bizarre" character.

exiftool -xmp-expressionmedia:all= FileOrDir

takes care of the following:

<rdf:Description rdf:about=""
            xmlns:expressionmedia="http://ns.microsoft.com/expressionmedia/1.0/">
         <expressionmedia:People>
            <rdf:Bag>
               <rdf:li>☀orthodoxe</rdf:li>
            </rdf:Bag>
         </expressionmedia:People>

But this one I cannot remove using the following:

exiftool -xmp-Iptc4xmpExt= FileOrDir

<rdf:Description rdf:about=""
            xmlns:Iptc4xmpExt="http://iptc.org/std/Iptc4xmpExt/2008-02-29/">
         <Iptc4xmpExt:PersonInImage>
            <rdf:Bag>
               <rdf:li>☀orthodoxe</rdf:li>
            </rdf:Bag>
         </Iptc4xmpExt:PersonInImage>
      </rdf:Description>
      <rdf:Description rdf:about=""

Any ideas please?
Title: Re: Eliminating XMP blocks
Post by: StarGeek on April 19, 2017, 05:14:28 PM
You could use
exiftool -PersonInImage=
to remove just that tag or
exiftool -XMP-iptcExt:all=
to remove the entire block, which might contain other tags.

See XMP Tags (http://www.exiftool.org/TagNames/XMP.html) for more details.

Also, try using exiftool -G1 -a -s -TAGNAME, replacing TAGNAME with that actual tag if you want to see what group the tag is actually part of.
Title: Re: Eliminating XMP blocks
Post by: frereroy on April 20, 2017, 01:08:52 AM
Thanks, it worked just fine.

Is there a way to combine my 4 commands so that I could find and eliminate all the offending tags in a single pass?

exiftool -xmp-mediapro:all=
exiftool -xmp-expressionmedia:all=
exiftool -XPTitle=
exiftool -PersonInImage=

Thanks in advance.
Title: Re: Eliminating XMP blocks
Post by: Hayo Baan on April 20, 2017, 01:52:37 AM
Sure, just combine them all on one line :)
Title: Re: Eliminating XMP blocks
Post by: frereroy on April 20, 2017, 04:23:48 AM
Wow, as easy as ABC.
Many thanks, I was expecting a long and complicated script.