updating a.nef with -model=D610 makes file unusable

Started by newmikeman, December 29, 2015, 04:57:37 AM

Previous topic - Next topic

newmikeman

I'm transferring settings from an app by creating a batch file of exiftool commands. All seems to work just fine with .jpg files but in some (not all) cases when the target is a .nef of the same image exiftool says it has done the job but the updated .nef can't be read by Nikon Capture NX2 nor by Lighroom 6.3. I get the same result if I copy the metadata from the .jpg using "exiftool -tagsfromfile %d%f.JPG a.nef".

Of two very similar images shot at the same time with practically the same exiftool command, one works and the other doesn't.

This works:
exiftool -xmp:createdate="2015:12:06 12:35:00" -exif:rating=2 -xmp:rating=2 -iptc:objectname="cotoneaster hedge" -xmp:title="cotoneaster hedge" -make="Nikon" -model="D610" -exif:copyright="©2015 Michael Newman All rights reserved" -copyright="©2015 Michael Newman All rights reserved" -xmp:creator="Michael Newman" -xmp:rights="©2015 Michael Newman All rights reserved" -copyrightflag=true -by-line="Michael Newman" -Country="UK" -State="Bucks" -City="Milton Keynes" -Location="Great Linford" -keywords="Places|UK|Bucks|Milton Keynes|Great Linford" -keywords="Things|Growing things|Shrubbery|Cotoneaster" "M:\My Pictures\!My Photos\2015\2015-12\MN610-10072.JPG" -overwrite_original

This doesn't:
exiftool -xmp:createdate="2015:12:06 12:35:08" -exif:rating=2 -xmp:rating=2 -iptc:objectname="cotoneaster hedge" -xmp:title="cotoneaster hedge" -make="Nikon" -model="D610" -exif:copyright="©2015 Michael Newman All rights reserved" -copyright="©2015 Michael Newman All rights reserved" -xmp:creator="Michael Newman" -xmp:rights="©2015 Michael Newman All rights reserved" -copyrightflag=true -by-line="Michael Newman" -Country="UK" -State="Bucks" -City="Milton Keynes" -Location="Great Linford" -keywords="Places|UK|Bucks|Milton Keynes|Great Linford" -keywords="Things|Growing things|Shrubbery|Cotoneaster" "M:\My Pictures\!My Photos\2015\2015-12\MN610-10074.JPG" -overwrite_original

If I successively remove parts of the second command until the resulting file works I discover that '-model="D610"' is the item that makes the difference. I also tried editing it to remove the quotes round D610 and it made no difference. The command that worked was this:
exiftool -xmp:createdate="2015:12:06 12:35:08" -exif:rating=2 -xmp:rating=2 -iptc:objectname="cotoneaster hedge" -xmp:title="cotoneaster hedge" -exif:copyright="©2015 Michael Newman All rights reserved" -copyright="©2015 Michael Newman All rights reserved" -xmp:creator="Michael Newman" -xmp:rights="©2015 Michael Newman All rights reserved" -copyrightflag=true -by-line="Michael Newman" -Country="UK" -State="Bucks" -City="Milton Keynes" -Location="Great Linford" -keywords="Places|UK|Bucks|Milton Keynes|Great Linford" -keywords="Things|Growing things|Shrubbery|Cotoneaster" "M:\My Pictures\!My Photos\2015\2015-12\MN610-10074.nef" -overwrite_original

I guess I don't mind leaving out the make and model in most cases, but given that these seem pretty simple and uncontentious tags could there be some more sinister error in exiftool that I could trip over with other tags?

I would be happy to provide you with copies of the 2 images but they are huge at 27MB each.

Is this a known problem that's fixed in the very latest version? I found it difficult to follow the installation instructions for the perl jobby and am not too sure I could do it again reliably. I did update the library to 10.08 and please let me know if I really really need to upgrade something else from version 10.04.

Thanks for any help or hints anyone can provide me.

regards, Mike

exiftool command line tool version
10.04 [Warning: Library version is 10.08]
Windows 7-64
Console output:
M:\My Pictures\!My Photos\2015\2015-12+>exiftool -xmp:createdate="2015:12:06 12:
35:08" -exif:rating=2 -xmp:rating=2 -iptc:objectname="cotoneaster hedge" -xmp:ti
tle="cotoneaster hedge" -make="Nikon" -model="D610" -exif:copyright="©2015 Micha
el Newman All rights reserved" -copyright="©2015 Michael Newman All rights reser
ved" -xmp:creator="Michael Newman" -xmp:rights="©2015 Michael Newman All rights
reserved" -copyrightflag=true -by-line="Michael Newman" -Country="UK" -State="Bu
cks" -City="Milton Keynes" -Location="Great Linford" -keywords="Places|UK|Bucks|
Milton Keynes|Great Linford" -keywords="Things|Growing things|Shrubbery|Cotoneas
ter" "M:\My Pictures\!My Photos\2015\2015-12+\MN610-10074.nef" -overwrite_origin
al
    1 image files updated

M:\My Pictures\!My Photos\2015\2015-12+>

Alan Clifford

Isn't the model already in the nef?  My Nikon D7000 nefs have it.

newmikeman

Thanks for your prompt reply and Yes but not for those that I have scanned from slides. I set the job up to cater for both but obviously I don't need the make and model for original digital photos as you say. For 10,000 plus slides from my trusty Nikon film scanner I will want to be able to set make and model. If this is just a special case of making certain tags read-only & not writable then (a) I would expect an error or warning message from exiftool and (b) I would expect to be able to override the read-only status if for no other reason than potentially to correct errors that may have occurred somehow.

regards, Mike

StarGeek

It could be that changing the model name is causing the programs to attempt to render the image incorrectly.  This could be a variation of why it's not recommended to remove all metadata from RAW images.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

newmikeman

Thanks StarGeek but I'm not sure I understand really  :)
I didn't intend to remove any metadata from the RAW file.
Are there any other tags that I shouldn't try and change?

Thanks, Mike

Alan Clifford

Perhaps you should reduce the number of photos you are looking at to try and pin down the problem better.  I don't see that the problem has been isolated.

Maybe take one of the .nef files your scanner has produced and see if changing the model to D610 is the problem.

Or is it a nef from a D610 you are changing and the syntax is not quite the same.

Or is it a nef from another Nikon camera that, when you change the model to D610, that causes a problem.


StarGeek

Quote from: newmikeman on December 29, 2015, 05:44:49 PM
Thanks StarGeek but I'm not sure I understand really  :)
I didn't intend to remove any metadata from the RAW file.

Sorry if I wasn't clear.  It wasn't that you removed data, it was that you changed data, specifically in the Model tag.

I could be wrong, but from what I understand, not all RAW files are alike.  They get rendered in certain ways depending upon the model of the camera.  You're telling Lightroom that this Nef is produced by a D610 and it tries to render the image in that way.  Except it's not produced by a D610 and so the rendering fails.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Michael


  • All of the Nikon D-series cameras I know of have a model name like "NIKON D610". So as I wrote in a different forum: be careful when changing make & model for actual cameras!
  • Have you doublechecked that both versions of software already support the D610? LR 6.3 is not an actual version (it's 6.6 at the time being) and NX2 isn't supported anymore for at least a year or two. This might be another reason.
HTH, Michael
Michael

Phil Harvey

Hi Michael,

This is essentially FAQ 8, except that you need to know that the maker notes are necessary for proper rendering of any RAW image (except DNG).  So changing the make and/or model will generally make a RAW image undisplayable unless the model is very closely related (same imaging sensor and similar firmware).

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

newmikeman

Thanks Phil & Michael and now I understand - it's because I was a bit lazy in exporting from my old software and used the same commands for scanned slide images that were jpegs and had minimal exif data as I did for more recent images from digital cameras. In my scanned images I had set a value for camera make and model that's primarily useful for searching post-import as it's more meaningful than "Nikon Super Coolscan 4000ED". Obviously I didn't need to set that for digital camera images that have their make and model already.
I've adjusted the generation of the batches of exiftool commands to avoid setting any new values for make or model and all seems to be well.
Thank you everyone for your help.
Happy New Year!
regards, Mike