• Welcome to the Lightroom Queen Forums! We're a friendly bunch, so please feel free to register and join in the conversation. If you're not familiar with forums, you'll find step by step instructions on how to post your first thread under Help at the bottom of the page. You're also welcome to download our free Lightroom Quick Start eBooks and explore our other FAQ resources.
  • Stop struggling with Lightroom! There's no need to spend hours hunting for the answers to your Lightroom Classic questions. All the information you need is in Adobe Lightroom Classic - The Missing FAQ!

    To help you get started, there's a series of easy tutorials to guide you through a simple workflow. As you grow in confidence, the book switches to a conversational FAQ format, so you can quickly find answers to advanced questions. And better still, the eBooks are updated for every release, so it's always up to date.

Software to Recover Suspected Corrupt NEF File

Joined
Mar 29, 2015
Messages
805
Lightroom Experience
Intermediate
Lightroom Version
Classic
Lightroom Version
LrC 10.3
Operating System
  1. Windows 10
I hit the 'The files cannot be opened by Lightroom' importing some old NEF files from 2009. I also tried to open one in PS but ACR coughed at it as well.

I found that embedded previews were ok. I was able to pull the 'JPGfromRaw' file using EXIFTOOL so I have a good JPG (See below on one file 20090913_103830)

I Googled recovering Corrupt NEF files and got a hit on a couple of software products. Both said they worked in recovering but would not save until I purchased a license. Further investigation on one uncovered the recovered file was only a JPG.

Being the skeptic I am, and knowing the proprietary format of RAW files, does anyone know if there are any true RAW recovery programs for NEF files or are they simply pulling an embedded JPG/TIFF? Any validated products would be appreciated.

Thanks


Code:
$
$ exiftool -preview:all 20090913_103830.NEF
Jpg From Raw                    : (Binary data 711624 bytes, use -b option to extract)
Preview Image                   : (Binary data 25928 bytes, use -b option to extract)
Thumbnail TIFF                  : (Binary data 57816 bytes, use -b option to extract)

$ exiftool -b -jpgfromraw 20090913_103830.NEF > 20090913_103830.jpg

$ dir 20090913_103830.*
 Volume in drive C is OS
 Volume Serial Number is 1C4B-665A

 Directory of C:\Users\paul\Pictures\_temp3

2021-08-26  04:17 PM           711,624 20090913_103830.jpg
2019-03-09  10:19 AM         5,574,246 20090913_103830.NEF
               2 File(s)      6,285,870 bytes
               0 Dir(s)  1,200,834,588,672 bytes free
 
Last edited:
Joined
Jun 20, 2009
Messages
18,448
Location
Houston, TX USA
Lightroom Experience
Power User
Lightroom Version
Cloud Service
If you did not have a backup of the damaged NEF, you may be limited to the JPEG thumbnail. recovered from the original RAW file. The NEF is a TIFF/EP6 type file and contains the RAW photo site data in a defined data block. If that data block is incomplete. there is probably little that can be done to recover the photo site values.

I know of no app that handles this like you want. However, I would approach this by trying to recover all of the photosite values from the RAW data block. If you are successful in achieving that, then take a copy of an undamaged NEF and replace its data block of RAW photosite values with the recovered photo site values from the damaged NEF.

How did the NEF get damaged? Why were there no backups? Has this NEF never been imported into Lightroom before? If so were there any "Make a Second Copy.." files saved?
 
Joined
Mar 29, 2015
Messages
805
Lightroom Experience
Intermediate
Lightroom Version
Classic
I know of no app that handles this like you want
Thanks. I suspected the apps that were advertising RAW recovery were bogus.
How did the NEF get damaged?
I don't know. I'm reloading what I thought were NEF's I'd already loaded into a previous catalog. However, now checking, I don't find any XMP files so I may have never loaded these in before.
How did the NEF get damaged
Don't know. I checked NEF's from the same month and they are fine. It could have been a SD card issue I'm just discovering now.
Why were there no backups?
Oh, I have a backup. Same behavior on the backup.
were there any "Make a Second Copy.." files saved?
Nope. Never used that feature. My backup runs nightly to an external disk. I don't reformat my SD cards until they are full in case I need to recover.
However, I would approach this by trying to recover all of the photosite values from the RAW data block. If you are successful in achieving that, then take a copy of an undamaged NEF and replace its data block of RAW photosite values with the recovered photo site values from the damaged NEF.
Thanks Cleetus. I'll keep this approach in mind for future recoveries where I really need to get the RAW information back. At present, I can likely live with the JPG's I recovered.
 
Joined
Nov 27, 2013
Messages
1,674
Location
Queensland
Lightroom Experience
Intermediate
Lightroom Version
Classic
Joined
Mar 29, 2015
Messages
805
Lightroom Experience
Intermediate
Lightroom Version
Classic

PhilBurton

Lightroom enthusiast (but still learning)
Premium Classic Member
Joined
Nov 16, 2015
Messages
2,585
Location
California, USA
Lightroom Experience
Intermediate
Lightroom Version
Classic
Paul,

It can't hurt to try this Fix tool on a copy of the corrupted NEF file. I am curious as to your results, since I have some corrupt NEFs from 2010.

Phil Burton
 
Joined
Mar 29, 2015
Messages
805
Lightroom Experience
Intermediate
Lightroom Version
Classic
It can't hurt to try this Fix tool on a copy of the corrupted NEF file.
Phil, after I posted my reply to ISL, I had the same thought. I'm not sure in 2009 if I had started to use Lr yet or was still using Nikon VX/CX products. I've put it down as something to try and will report back when I get a chance.
 
Joined
Mar 29, 2015
Messages
805
Lightroom Experience
Intermediate
Lightroom Version
Classic
I downloaded and tried the link @I-See-Light provided but no joy. None of the files were created by one of the candidate cameras. See below. It didn't process any of the images.

Code:
C:\Users\paul\Pictures\_temp2>fix_corrupted_nef .
---- fix_corrupted_nef version 3.3 ----
Fixes Nikon D4, Df, D500, D600, D610, D750, D800, D800E, D810, D850,
D3200, D5200, D5300, D5500, D7100, D7200, D7500 and Z50 NEF images that
have been corrupted by transferring with older Nikon software.

Bit depth of compressed images (12 or 14) [14]?
Fixing 25 files...
======== ./20090913_103830.NEF [1/25]
Error: Not a D4, Df, D500, D600, D610, D750, D800/D800E, D810,
D850, D3200, D5200, D5300, D5500, D7100, D7200, D7500 or Z50
NEF
 - ./20090913_103830.NEF
======== ./20090913_103847.NEF [2/25]
Error: Not a D4, Df, D500, D600, D610, D750, D800/D800E, D810,
D850, D3200, D5200, D5300, D5500, D7100, D7200, D7500 or Z50
NEF
...
    1 directories scanned
    1 directories created
    0 image files read
 
Joined
Mar 29, 2015
Messages
805
Lightroom Experience
Intermediate
Lightroom Version
Classic
Ahem. I'm embarrassed to say that my problem was self inflicted.

In 2009, I used to carry my small Intova IC600 when I took the dog for a walk. This camera only took JPG's and was poor at setting metadata tags for make and model. The IC600 was also my first underwater camera.

As part of my image cleanup, I corrected the IC600 images with the proper make. As part of checking the results the fix_corrupted_nef program, I listed the make and model of the file. This is where I discovered a mixup in the metadata. I didn't realize that one directory had a mix if IC600 JPG files and Nikon NEF files.

Code:
C:\Users\paul\Pictures\_temp2>exiftool -make -model 20090913_103830.NEF
Make                            : Intova IC600
Camera Model Name               : NIKON D50

I changed the metadata in the NEF files that wouldn't load from a Make tag of 'Intova IC600' to NIKON and I was able to import the photos.
 
Top