ExifTool Forum

ExifTool => Newbies => Topic started by: MatthewMcD on March 15, 2018, 08:04:03 PM

Title: Reading Fujifilm RAF Star Rating
Post by: MatthewMcD on March 15, 2018, 08:04:03 PM
First time poster. I have been shooting Fujifilm RAF and just noticed that the star ratings set in camera are stored in binary MakerNotes rather than Rating. Is it possible to use EXIFTool to read the rating from the MakerNotes and write it to the proper EXIF Rating field in a Fujifilm RAF file?
Title: Re: Reading Fujifilm RAF Star Rating
Post by: Phil Harvey on March 15, 2018, 09:51:10 PM
Should be.  Try running ExifTool on a file to see if you see the rating.  If so, copying it to any other tag is easy with an argument like "-DEST_TAG<SRC_TAG"

- Phil
Title: Re: Reading Fujifilm RAF Star Rating
Post by: MatthewMcD on March 16, 2018, 09:01:54 AM
Thanks Phil, I should have mentioned that I tested on a sample photo rated 5 stars in camera.
exiftool -Rating birds.jpg
Rating : 0

I tried:
exiftool -MakerNotes birds.jpg
Maker Note Fuji Film : (Binary data 1002 bytes, use -b option to extract)

exiftool -b -MakerNotes birds.jpg
FUJIFILM ... with tons of binary code


I am very new to ExifTool and don't have a clue how to decode the MakerNotes.
Title: Re: Reading Fujifilm RAF Star Rating
Post by: Phil Harvey on March 16, 2018, 09:05:01 AM
Try this:

exiftool -u -makernotes:all birds.jpg

And look for a tag with the value 5 (or maybe 50).

- Phil
Title: Re: Reading Fujifilm RAF Star Rating
Post by: MatthewMcD on March 16, 2018, 09:54:11 AM
Thanks! Closer, but... on a RAF file tagged 3 stars (the jpg did not have a Rating result.)
exiftool -u -makernotes:all birds.raf
Rating : 0
:(

There are a number of "Fuji Film 0xHEX#" fields but none contain the number "3".

Attached is a comparison of the JPG and RAF Result from the same image. (Ingest was done with PM5.)

I'd be happy to upload the RAF I am using.
Title: Re: Reading Fujifilm RAF Star Rating
Post by: Phil Harvey on March 16, 2018, 09:55:44 AM
Can you send me the RAF that you marked with 5 stars?  (philharvey66 at gmail.com)
Title: Re: Reading Fujifilm RAF Star Rating
Post by: Phil Harvey on March 16, 2018, 10:23:51 AM
I got the file, thanks.  I can't see any obvious place where the rating is stored.  What software did you use to write the rating?

- Phil
Title: Re: Reading Fujifilm RAF Star Rating
Post by: MatthewMcD on March 16, 2018, 10:55:36 AM
It is set in camera. I can send you another copy of the same image and change the rating so you can do a diff. Would that help?
Title: Re: Reading Fujifilm RAF Star Rating
Post by: Phil Harvey on March 16, 2018, 10:59:56 AM
Sure. Good idea. 
Title: Re: Reading Fujifilm RAF Star Rating
Post by: MatthewMcD on March 16, 2018, 11:21:39 AM
Phil, thanks so much. OK, I did it myself with a simple "comp" command. The RAF files are the same. :( BUT the JPG files are not.  :)
comp .\DSCF1203-1.RAF .\DSCF1203-5.RAF

Comparing .\DSCF1203-1.RAF and .\DSCF1203-5.RAF...
Files compare OK


and...

comp .\DSCF1203-1.JPG .\DSCF1203-5.JPG

Comparing .\DSCF1203-1.JPG and .\DSCF1203-5.JPG...
Compare error at OFFSET B12
file1 = 1
file2 = 5


Could this be a bug (or omission) on the part of Fujifilm or would the reason be that they don't want to "change" the RAW file after it is created in camera? It makes me question my workflow approach. I can "read" the rating from the JPG sister file and "apply" it to the RAF in Lightroom or Photomechanic. But would it be "wrong" to edit the actual RAW file even for something as trivial as the rating?

I have previously written a LR plugin to convert PM5 Ratings (or color labels) to Flags in LR and that helps my workflow significantly. This would help with culling when I actually have the time in the field to flag picks in camera.
                                           
Title: Re: Reading Fujifilm RAF Star Rating
Post by: Phil Harvey on March 16, 2018, 11:35:00 AM
Editing raw files always comes with some risk, but as long as you keep backups then you are protected.  If you use ExifTool to write the raw file, the risks should be minimal.  I can't speak for PhotoMechanic, but I think their software is pretty good.  You can try running exiftool -validate on the file to see if exiftool picks up any problems.

LR should read sidecar XMP files, so this is an option.  But personally I prefer keeping things in one file.

- Phil
Title: Re: Reading Fujifilm RAF Star Rating
Post by: MatthewMcD on March 16, 2018, 11:38:19 AM
Good to know. Thanks!

One last question. Is there a sample Lightroom Plugin that shows how to run ExifTool in the background? I have found a few but they are all compiled and obfuscated.

Cheers!
Title: Re: Reading Fujifilm RAF Star Rating
Post by: Phil Harvey on March 16, 2018, 11:44:15 AM
Sorry, I don't know of any such examples.

- Phil
Title: Re: Reading Fujifilm RAF Star Rating
Post by: MatthewMcD on March 16, 2018, 01:55:48 PM
No problem, thanks for working through this with me. I submitted a bug to Fujifilm and found a GitHub project that may help get me rolling. Will report back with what I find. For now I am just going to write a PowerShell script to perform the update.
Title: Re: Reading Fujifilm RAF Star Rating
Post by: MatthewMcD on March 17, 2018, 12:58:19 PM
Anyone looking for a "Hello World" Lightroom sample to call ExifTool. Here is a sample I build based on Focus-Points and the Adobe LR SDK: https://github.com/MatthewMcD/Lightroom/tree/master/helloexiftool.lrdevplugin
Title: Re: Reading Fujifilm RAF Star Rating
Post by: MatthewMcD on March 18, 2018, 01:40:14 PM
More fun, just posting this to follow through on the thread. When you shoot in RAW only and add star ratings the ratings get written to the RAF. Shoot in RAW+JPG and they only get written to the JPG.  :-\