Issue updating RatingPercent

Started by XMPLost, July 09, 2020, 11:20:12 AM

Previous topic - Next topic

XMPLost

Hi,

I have a lot of pictures on my Synology NAS, i want to reset the rating of the picture to 'none'.
ExifTool looks like the tool to do the job for me.

I have set a rating with a Synology program called Photo Station 6.

I've ran the following command before and after updating the rating on a picture:
exiftool -a -s -g1 DSCN2081.JPG

The values that were added:

---- ExifTool ----
Warning                         : [minor] Fixed incorrect URI for xmlns:MicrosoftPhoto
---- IFD0 ----
Rating                          : 1
RatingPercent                   : 1
---- XMP-xmp ----
Rating                          : 1
RatingPercent                   : 1
---- XMP-microsoft ----
RatingPercent                   : 1


After running the following commands, i expect al those values to be deleted again:
exiftool -P -g1 -RatingPercent= DSCN2081.JPG
exiftool -P -g1 -Rating= DSCN2081.JPG

All the above entries are gone, exept for:

---- XMP-xmp ----
RatingPercent                   : 1


When explicitly trying to remove this using:
exiftool -P -g1 -xmp:RatingPercent= DSCN2081.JPG

i get the following notification:

  0 image files updated
  1 image files unchanged


I'm new to ExifTool, so probably i'm doing something wrong..
Can anyone help me out removing this value?

When running:
exiftool -a -s -g1 -v2 DSCN2081.JPG
I'm seeing the following: (not sure it this helps)


  | [adding XMP-xmp:RatingPercent]
  | RatingPercent = 1
  | - Tag 'x:xmpmeta/rdf:RDF/rdf:Description/xmp:RatingPercent'


Regards J.


Phil Harvey

Quote from: XMPLost on July 09, 2020, 11:20:12 AM

  | [adding XMP-xmp:RatingPercent]

This line indicates that the tag is not pre-defined, so it is added dynamically to the tables.  Only pre-defined tags may be written.

As far as I know, there is no standard RatingPercent tag in the XMP-xmp namespace.  Perhaps they were trying to write XMP-xmp:Rating.  I think this is a Synology bug.

To write this with ExifTool would require definition of a user-defined tag.

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

StarGeek

Phil beat me to commenting, but here's some further thoughts.

After some searches it looks like XMP-xmp:PercentRating might be supported by Digikam and exiv2 as well as Photo Station.

This might be able to remove that tag, though I'd check to see if there might be other tags in the XMP-xmp group to watch for.
exiftool -TagsFromFile @ -XMP-xmp:all /path/to/files/
* 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

It looks like maybe I should add support for this then.

@StarGeek, I think you meant this command (must delete the tags before adding them back again):

exiftool -xmp-xmp:all= -TagsFromFile @ -XMP-xmp:all /path/to/files/

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

XMPLost

Thanks for your quick response!

I've tried to run the command, i'm getting the following output:


exiftool -XMP-xmp:all= @ -XMP-xmp:all DSCN2081.JPG
Ignored superfluous tag name or invalid option: -XMP-xmp:all
Error: File not found - @
    1 image files updated
    1 files weren't updated due to errors


When checking the file, all values of XMP-xmp are gone, also
CreateDate, CreatorTool, MetadataDate, ModifyDate

Is there a way to keep those values?

StarGeek

Quote from: XMPLost on July 09, 2020, 12:10:35 PM
exiftool -XMP-xmp:all= @ -XMP-xmp:all DSCN2081.JPG

Incomplete command
exiftool -xmp-xmp:all= -TagsFromFile @ -XMP-xmp:all DSCN2081.JPG
* 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).

StarGeek

Quote from: Phil Harvey on July 09, 2020, 11:43:12 AM@StarGeek, I think you meant this command (must delete the tags before adding them back again):

Oops.  You're right.
* 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).

XMPLost

Thanks alot!

This solved my issue, you guys are the best!