Error: Not a D4... etc. nef file on iMac Sierra

Started by ralf11, October 26, 2017, 04:52:12 PM

Previous topic - Next topic

ralf11

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.

Hayo Baan

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.
Hayo Baan – Photography
Web: www.hayobaan.nl

ralf11

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)




ralf11

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...

Phil Harvey

It sounds like you want to use extract_preview 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
...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 ($).

ralf11

#5
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

Hayo Baan

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.
Hayo Baan – Photography
Web: www.hayobaan.nl

ralf11

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


Hayo Baan

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
Hayo Baan – Photography
Web: www.hayobaan.nl

ralf11

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 ??

ralf11

also, typing exif tool (no parameters) splats a bunch of help text on the screen and then locks up Terminal, so I closed it


Hayo Baan

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 ./


Hayo Baan – Photography
Web: www.hayobaan.nl

ralf11

#12
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

Hayo Baan

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?
Hayo Baan – Photography
Web: www.hayobaan.nl

ralf11

with the dir set to Downloads, in the same window, just typing:

which exiftool

returns:

/usr/local/bin/exiftool