ExifTool Forum

ExifTool => Newbies => Topic started by: ralf11 on October 26, 2017, 04:52:12 PM

Title: Error: Not a D4... etc. nef file on iMac Sierra
Post by: ralf11 on October 26, 2017, 04:52:12 PM
Someone else told me they were able to recover .jpg's from .nef files I sent them.

BUT, when I run the EXIFtool I get an error message like this:

Error: Not a D4, Df, D500, D600, D610, D750, D800/D800E, D810,
D3200, D5200, D5300, D5500, D7100 or D7200 NEF
- /Users/xx/Downloads/bad images/f32.NEF
Error: File format error - /Users/xx/Downloads/bad images/f32.NEF

Can anyone tell me why the difference in results?

I did rename the files to a shorter filename but I don't see how that could change things.
Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: Hayo Baan on October 26, 2017, 05:21:45 PM
Hi ralf,

I guess that was me on the PM forum :)

What was the exact command you used that gave you that message? Have you already tried with the new fils you sent me? I was successful in extracting a preview from those.
Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: ralf11 on October 26, 2017, 07:02:17 PM
Yes  ;D

I used the drag & drop instructions at https://exiftool.org/fix_corrupted_nef.html

3. Drag and drop "fix_corrupted_nef.pl" onto the Terminal window
4. Drag and drop the corrupted NEF files (I did a couple of files separately, then did the rest as a group for the command ot operate on).
5. pressed RETURN
6. then chose 14 at the prompt for bit depth  ( I tried one using 12 for bit depth too - same Error)



Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: ralf11 on October 26, 2017, 07:05:39 PM
BTW - there is only a single fixed folder - I don't understand how it could create more than one with the same name anyway?

and a Correction - files generated by a D-80 (not D610) based on looking at EXIF of other images taken just before these - but that can't be the problem...
Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: Phil Harvey on October 27, 2017, 07:32:54 AM
It sounds like you want to use extract_preview (https://exiftool.org/forum/index.php/topic,4172.msg19805.html#msg19805) to extract embedded JPEG images, not fix_corrupted_nef which fixes NEF files corrupted by Nikon software.  The extract_preview script requires that you have Perl and the ExifTool libraries installed.

- Phil
Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: ralf11 on October 27, 2017, 02:22:37 PM
there is a program called that which runs inside Lightroom, but I assume that is not what you mean...

so I tried typing extract preview on the cmd line in terminal...
I eventually got the terminal to stop telling me there was no such command (command not found)

... but it is now telling me " No such file or directory" even when I directly drop the file into the terminal window and it lands after the extract_preview command (with the dot and slash in front of it)

the thread your cited, has some kind of volume 250 in the middle of this but I have no idea what that is
Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: Hayo Baan on October 27, 2017, 05:55:48 PM
It sounds like you did not download  the extract preview script, but some other script. Or you have not installed exiftool or... it would be helpful if you showed us rhe exact commands you used and the exact output they gave you in Terminal. You can select text and copy it from the terminal and paste it here.
Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: ralf11 on October 27, 2017, 08:25:09 PM
Both were downloaded and installed, but perhaps not correctly.  Or maybe they have to be in a particular directory?

Here is the text from Terminal (with my name replaced by xxx):

cd ~/Desktop
iMac17:Desktop xxx$ ./extract_preview /Users/xxx/Downloads/bad\ images/f21.NEF
-bash: ./extract_preview: No such file or directory
iMac17:Desktop xxx$ exiftool -PreviewImage -b /Users/xxx/Downloads/bad\ images/f21.NEF
Error: File format error - /Users/xxx/Downloads/bad images/f21.NEF

Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: Hayo Baan on October 28, 2017, 03:23:42 AM
OK, we're getting somewhere now!
You have installed exiftool, but it appears you ran the extract preview command from a folder where it wasn't located. Try running extract preview with the full specification of the path where you put it. E.g if it is in your downloads folder, you could do this ~/Downloads/extract_preview FILE (the ~ is a shortcut for your home directory).

Hope this helps,
Hayo
Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: ralf11 on October 29, 2017, 08:17:44 PM
that yields a different error msg:

"This scripts requires Image::ExifTool -- please install it."

I thought I DID install EXIFtool - could it have uninstalled itself ??
Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: ralf11 on October 29, 2017, 08:22:25 PM
also, typing exif tool (no parameters) splats a bunch of help text on the screen and then locks up Terminal, so I closed it

Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: Hayo Baan on October 30, 2017, 02:32:13 AM
Hi ralf,

You did install exiftool since you can run it with no parameters. It doesn't lock up your terminal though, it merely waited for you to press a key (e.g space to show more, q to quit).

Anyway, since you only installed the standard version of exiftool, you'll need one additional trick to be able to use, and that is to point it to where exiftool put its internal files. Since I have installed the full version, I can't test this myself, but I think this should work in your case:
perl -I`which exiftool`/lib ./extract_previews ...
If you run this from a directory other than where you put extract preview, use it's full path instead of ./


Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: ralf11 on October 30, 2017, 03:28:07 PM
ok, I chg dir'd to Downloads

and then ran it w/o the ending s and the dots (ellipsis?) but it still did not work

perl -I`which exiftool`/lib ./extract_preview

Error msg:
This scripts requires Image::ExifTool -- please install it.

so I cannot tell why exiftool is not loaded - if I type EXIFTOOL then I get that help screen
Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: Hayo Baan on October 30, 2017, 05:42:32 PM
What does which exiftool say when you execute that in a terminal window?

@Phil, you probably know a better way to use the extract preview script without the library installed?
Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: ralf11 on October 30, 2017, 07:42:24 PM
with the dir set to Downloads, in the same window, just typing:

which exiftool

returns:

/usr/local/bin/exiftool
Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: Hayo Baan on October 31, 2017, 02:47:58 AM
Hmm, that look good, ah, and I think I know why my initial command didn't work. Can you try this:
perl -I /usr/local/bin/lib ./extract_preview ...
Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: Phil Harvey on October 31, 2017, 07:45:45 AM
You can either put extract_preview in /usr/local/bin, or change this line in extract preview from this

push @INC, '/usr/bin/lib', 'lib';

to this

push @INC, '/usr/local/bin/lib', 'lib';

I have updated the extract_preview script here (https://exiftool.org/forum/index.php/topic,4172.msg19805.html#msg19805) with this change.

- Phil
Title: Re: Error: Not a D4... etc. nef file on iMac Sierra
Post by: ralf11 on October 31, 2017, 04:40:20 PM
Thanks much!

I got them all extracted.