Multiple Supplemental Categories

Started by ludde_t, December 08, 2019, 09:32:26 AM

Previous topic - Next topic

ludde_t

Hi,
Is there any way to write multiple supplemental categories to correspond with Photo Mechanics Sup Cat 1, Sup Cat 2 and Sup Cat 3?

Tried it like this and it just overwrites Sup Cat 1 in Photo Mechanics.
/usr/local/bin/exiftool -SupplementalCategories="35696" -SupplementalCategories="" -SupplementalCategories="Livepic" -overwrite_original 191208LT010.JPG

Any help is greatly appreciated.

Thanks!
/Ludde

Phil Harvey

Try running ExifTool on an image containing these tags to see where they are stored.  If you can't figure it out, attach the image here and we'll try to help

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ludde_t

Hi Phil,
Great - thanks!

Output from ExifTool looks like this on an image that has Supp cat 1 and Supp cat 3 set in Photomechanics 6:
Supplemental Categories         : 35697,  , Livepic

Still can't figure out how to write so the information shows up in the different fields.
Running exiftool -SupplementalCategories="35697, ,Livepic" LT_120919_1255.jpg
Puts all the information in the same field.

Attached you'll find a white jpeg with the correct information saved from Photo Mechanics 6.

Thanks for the help and a great tool!

Kind regards
Ludvig

Phil Harvey

Ah.  I should have paid closer attention to your command.  Your second assignment (with an empty value) will delete the tag, so only the third value will be written.  This is because -TAG= is the sytnax to delete a tag, and -TAG="" is equivalent since the command shell will remove the quotes before ExifTool sees it.  To write an empty value, you must use -TAG^=.

So try this:

/usr/local/bin/exiftool -SupplementalCategories="35696" -SupplementalCategories^= -SupplementalCategories="Livepic" -overwrite_original 191208LT010.JPG

Also, your sample image contained both IPTC and XMP SupplementalCategories, but the above command writes only IPTC.  To write both, you need to do this:

/usr/local/bin/exiftool -SupplementalCategories="35696" -SupplementalCategories^= -SupplementalCategories="Livepic" -xmp:SupplementalCategories="35696" -xmp:SupplementalCategories^= -xmp:SupplementalCategories="Livepic" -overwrite_original 191208LT010.JPG

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ludde_t

Hi Phil,
Great! Thank you so much for the help.

Getting there but still some issues I'm afraid with the IPTC commands.

/usr/local/bin/exiftool -xmp:SupplementalCategories="35696" -xmp:SupplementalCategories^="" -xmp:SupplementalCategories="Livepic" -overwrite_original 191208LT010.JPG - Works great!

But
/usr/local/bin/exiftool -SupplementalCategories="35696" -SupplementalCategories^="" -SupplementalCategories="Livepic" -xmp:SupplementalCategories="35696" -xmp:SupplementalCategories^="" -xmp:SupplementalCategories="Livepic" -overwrite_original 191208LT010.JPG

Produces the attached result in the attached image (191208LT010.JPG).


Phil Harvey

Right, sorry.  Try this:

/usr/local/bin/exiftool -iptc:SupplementalCategories="35696" -iptc:SupplementalCategories^="" -iptc:SupplementalCategories="Livepic" -xmp:SupplementalCategories="35696" -xmp:SupplementalCategories^="" -xmp:SupplementalCategories="Livepic" -overwrite_original 191208LT010.JPG

The trouble was that the first set of arguments will also write XMP if it exists, which it would after we added the second set of arguments.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ludde_t

Thanks!
Still no luck tough, getting the same result with that command..

Phil Harvey

I don't understand.  I've tried that command here and it works for me.  After running that command, what is the result from this?:

/usr/local/bin/exiftool "-sup*" -G1 -a 191208LT010.JPG

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

ludde_t

Ah, this might be a PhotoMechanics issue :(

The result from /usr/local/bin/exiftool "-sup*" -G1 -a 191208LT010.JPG
[IPTC]          Supplemental Categories         : 35696, , Livepic
[XMP-photoshop] Supplemental Categories         : 35696, , Livepic

But Photo Mechanics 6 still shows it like 35696, Livepic, Livepic.

I'll send the file to Krik in their forum to see if it might be something in their end.

Looking at the raw data in Photoshop also shows it as it should be I think:
         <photoshop:SupplementalCategories>
            <rdf:Bag>
               <rdf:li>35696</rdf:li>
               <rdf:li/>
               <rdf:li>Livepic</rdf:li>
            </rdf:Bag>
         </photoshop:SupplementalCategories>

Thanks again for the help!

ludde_t

/usr/local/bin/exiftool -iptc:SupplementalCategories="35696" -xmp:SupplementalCategories="35696" -xmp:SupplementalCategories^="" -xmp:SupplementalCategories="Livepic" -overwrite_original 191208LT010.JPG

Also works fine.

So it would seem that Photo Mechanics does not interpret the presence of a "blank" sup cat 2 in the IPTC data correctly.

Found an easy workaround tough,
/usr/local/bin/exiftool -iptc:SupplementalCategories="35696" -iptc:SupplementalCategories^=" " -iptc:SupplementalCategories="Livepic" -xmp:SupplementalCategories="35696" -xmp:SupplementalCategories^="" -xmp:SupplementalCategories="Livepic" -overwrite_original 191208LT010.JPG

Note the space in the blank IPTC sup cat 2.

So problem solved for me at least! Again many thanks for the help Phil!

StarGeek

If you're setting a value of a single space, you should remove the carat symbol ^.  That is only used to assign a empty value.
-iptc:SupplementalCategories=" "
instead of
-iptc:SupplementalCategories^=" "
* 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

Actually, the carat has no effect unless the value is empty.  So using it when it isn't necessary won't change anything.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).