Corrupted Nef - can it be fixed?

Started by NoobPower, February 07, 2018, 04:26:05 AM

Previous topic - Next topic

NoobPower

Hi Guys :)

first, excuse me for my english, french is my mother tongue but i'll try my best!

i read that exiftool could help with corrupted nef so i give it a try of course, thx for creating tools that helps others in distress :P

I had an SD card with .nef on it, i think my son erased a bunch months ago playing on the camera (kiddos!)... not knowing i used this card a few times after... few days ago i had the idea to use something like stellar to recover the files on the card

it worked as i could recovered the deleted files, the nefs are the "right" weight (+- 35mo)... but when i try to open them on Lightroom or photoshop or... but it won't, get a error message so it's corrupted :(

so even if i'm an noooob girl, i've been reading looooots of things on internet to try to fix it on my own :P and some led me here :) i've "installed" Exiftool on my mac, did the line command etc but i get this:

Error: File format error - /Users/jessvds/Downloads/fix_corrupted_nef/lib/Image/ExifTool/_VDS0111.NEF
    0 output files created

(i tried first with a "healthy" nef and it worked, i got 4 files out of it)

i guess as i "wrote" on the SD it's probably lost forever :( silly question but how can i be sure?

i can upload one of the corrupted file if it may help?

Thank you so much

A damsel in Distress :D

Phil Harvey

Sure.  Upload a file and I'll take a look.  There is a chance that some embedded JPEG's may be recovered even if the RAW files are scrambled.  Email me with the link if you don't want to post it here (philharvey66 at gmail.com).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

NoobPower

Hi Phil:)

I just sent you a wetransfer:) as I said really thanks for taking time to help!!

cheers:)

Phil Harvey

Lucky you.

I am able to extract a full-sized JPEG image of a cute little baby from the file you sent.

However, I don't think the RAW image is recoverable.

Extracting the JPEG's yourself will require installing Perl on your system.  The script I used is here.

You run it like this:

perl extract_preview DIR

Let me know if you have any questions.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

NoobPower

ahah then it's the good picture:)

i thought so, anyway jpg is better than nothing so i'm glad! thanks, i'll try the script :))


morgan

Hello! I am not familiar with posting on forums but I have done a lot of research and this seems to be most appropriate to post here since it is a very similar problem? I have 66 NEF files that won't show a preview or open in any photo editors. They are similar in size to the other raw photos I took during a photo shoot, and so I've come to the exift tool! I have tried two alternatives, but neither one seem to work. The first error I received was something about not being able to create a preview because of the file being a "binary oxff" or something like that.

Here is the terminal output of both things I have tried (among many others, but these seem to be the most relevant)

Morgans-MacBook-Pro:Desktop morganwills$ ./extract_preview /Users/morganwills/Desktop/damaged\ back\ up
[extract_preview version 1.04]
===== /Users/morganwills/Desktop/damaged back up/DSC_0939.NEF
===== /Users/morganwills/Desktop/damaged back up/DSC_0905.NEF
===== /Users/morganwills/Desktop/damaged back up/DSC_0911.NEF
===== /Users/morganwills/Desktop/damaged back up/DSC_0910.NEF....through to the 66th file.....

----- Summary
   66 files processed
    0 previews created:
Done.
Morgans-MacBook-Pro:Desktop morganwills$

And then the other one:
Morgans-MacBook-Pro:Desktop morganwills$ /Users/morganwills/Desktop/fix_corrupted_nef/fix_corrupted_nef.pl /Users/morganwills/Desktop/damaged\ back\ up
---- fix_corrupted_nef version 3.1 ----
Fixes Nikon D4, Df, D500, D600, D610, D750, D800, D800E, D810,
D850, D3200, D5200, D5300, D5500, D7100 and D7200 NEF images that
have been corrupted by transferring with older Nikon software.

Bit depth of compressed images (12 or 14) [14]?
Fixing 66 files...
======== /Users/morganwills/Desktop/damaged back up/DSC_0939.NEF [1/66]
Error: Not a D4, Df, D500, D600, D610, D750, D800/D800E, D810,
D850, D3200, D5200, D5300, D5500, D7100 or D7200 NEF
- /Users/morganwills/Desktop/damaged back up/DSC_0939.NEF
Error: File format error - /Users/morganwills/Desktop/damaged back up/DSC_0939.NEF
======== /Users/morganwills/Desktop/damaged back up/DSC_0905.NEF [2/66]
Error: Not a D4, Df, D500, D600, D610, D750, D800/D800E, D810,
D850, D3200, D5200, D5300, D5500, D7100 or D7200 NEF
(similar error for the rest of the photos)
    1 directories scanned
    1 directories created
    0 image files read
Morgans-MacBook-Pro:Desktop morganwills$

Any guidance would be so greatly appreciated. My camera is a Nikon D3300 so that is probably a definite issue with the second solution.

Phil Harvey

Sounds like these aren't NEF files.  They may contain other random data, or mostly nothing.  To see if they contain nothing, try zipping one, and if it gets really small then it definitely can't contain an image.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

morgan

Quote from: Phil Harvey on September 07, 2018, 02:52:21 PM
Sounds like these aren't NEF files.  They may contain other random data, or mostly nothing.  To see if they contain nothing, try zipping one, and if it gets really small then it definitely can't contain an image.

- Phil

Hi, thank you so much for the quick reply! I compressed a file that was 18 MB and it went down to 18 KB. Is that really small haha?

StarGeek

I'm sorry to say that if it compresses that much, there's nothing that can be recovered.
* 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).