Removing Junk Embedded In RAW

Started by scottd, February 04, 2015, 04:29:28 PM

Previous topic - Next topic

scottd

I documented a bug in Capture One and have them working on a fix.  In the mean time, I have HUNDRED of these lines in around 800 raw files (NEF).  Is there a quick method to remove this entire structure?  The "expressionmedia" and "mediapro:people" seem to be problems. :-(

-- cut from the XMP export in Bridge --
   <Iptc4xmpCore:Location></Iptc4xmpCore:Location>
         <Iptc4xmpCore:CreatorContactInfo rdf:parseType="Resource">
            <Iptc4xmpCore:CiEmailWork></Iptc4xmpCore:CiEmailWork>
            <Iptc4xmpCore:CiTelWork></Iptc4xmpCore:CiTelWork>
            <Iptc4xmpCore:CiUrlWork></Iptc4xmpCore:CiUrlWork>
         </Iptc4xmpCore:CreatorContactInfo>
         <expressionmedia:Event>NAHA Hair Shoot</expressionmedia:Event>
         <expressionmedia:People>
            <rdf:Bag>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
            </rdf:Bag>
         </expressionmedia:People>
         <mediapro:Event>NAHA Hair Shoot</mediapro:Event>
         <mediapro:People>
            <rdf:Bag>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>
               <rdf:li>Annette</rdf:li>

Phil Harvey

You could try recreating the XMP from scratch, which will have the effect of deleting all XMP that ExifTool doesn't recognize:

exiftool -xmp:all= -tagsfromfile @ "-all:all<xmp:all" FILE

where FILE is the name of one or more files and/or directories to be changed.

But you should check to be sure that this doesn't erase anything that you want preserved.

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