Approve the Cookies
This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and our Privacy Policy.
OK
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Guest
Forums  •   • New posts  •   • RTAT  •   • 'Best of'  •   • Gallery  •   • Gear
Register to forums    Log in

 
FORUMS Post Processing, Marketing & Presenting Photos RAW, Post Processing & Printing 
Thread started 05 Aug 2014 (Tuesday) 15:46
Search threadPrev/next
sponsored links (only for non-logged)

Is there any way to validate DNG files without Lightroom?

 
tim
Light Bringer
Avatar
51,010 posts
Likes: 375
Joined Nov 2004
Location: Wellington, New Zealand
     
Aug 05, 2014 15:46 |  #1

I have a lot of DNG files and I know at least one or two have errors. Is there a tool that can validate the checksums in the DNG files? This will help detect and prevent bit rot.

I know Adobe has an API that can do it, but I don't know if anyone has developed a tool that uses it.

Right now the only method I can see is to convert them all to DNG again and manually look for error messages, a bit of a long process when you have tens of thousands of DNG files.


Professional wedding photographer, solution architect and general technical guy with multiple Amazon Web Services certifications.
Read all my FAQs (wedding, printing, lighting, books, etc)

  
  LOG IN TO REPLY
kirkt
Cream of the Crop
6,602 posts
Gallery: 5 photos
Likes: 1556
Joined Feb 2008
Location: Philadelphia, PA USA
     
Aug 05, 2014 16:25 |  #2

The DNG SDK contains a utility called "dng_validate" that you can run in a command line environment. For example:


KT-Laptop-3:TestRaw kirkt$ dng_validate /Volumes/KT_External_S​SD/5D3_Tests/Focus/_R0​00829.DNG
Validating "/Volumes/KT_External_​SSD/5D3_Tests/Focus/_R​000829.DNG"...
Raw image read time: 0.289 sec
Linearization time: 0.033 sec
Interpolate time: 0.301 sec
Validation complete

You could send the output to a text file. I'm not sure if this is sufficient for your purposes.

kirk

Kirk
---
images: http://kirkt.smugmug.c​om (external link)

  
  LOG IN TO REPLY
tim
THREAD ­ STARTER
Light Bringer
Avatar
51,010 posts
Likes: 375
Joined Nov 2004
Location: Wellington, New Zealand
     
Aug 05, 2014 16:36 |  #3

Great, thanks Kirk.

I'll write up some kind of a script or program that can work on multiple files or directories when I get around to it. Unfortunately I haven't done CPP in many many years and don't want to bother extending what they have, so I'll probably write a Java program that runs it or something.


Professional wedding photographer, solution architect and general technical guy with multiple Amazon Web Services certifications.
Read all my FAQs (wedding, printing, lighting, books, etc)

  
  LOG IN TO REPLY
kirkt
Cream of the Crop
6,602 posts
Gallery: 5 photos
Likes: 1556
Joined Feb 2008
Location: Philadelphia, PA USA
     
Aug 05, 2014 16:44 |  #4

If you group all of your DNGs in a directory and use the command:


dng_validate *.DNG > output.txt

you get the following text file:


Validating "_R000849.DNG"...
Validation complete
Validating "_R000850.DNG"...
Validation complete
Validating "_R000851.DNG"...
Validation complete
Validating "_R000852.DNG"...
Validation complete
Validating "_R000853.DNG"...
Validation complete
Validating "_R000854.DNG"...
Validation complete
Validating "_R000855.DNG"...
Validation complete
Validating "_R000856.DNG"...
Validation complete

You should probably test the utility on a known bad file to see what output you get and whether it gets piped to a text file with sufficient detail.

kirk

Kirk
---
images: http://kirkt.smugmug.c​om (external link)

  
  LOG IN TO REPLY
tim
THREAD ­ STARTER
Light Bringer
Avatar
51,010 posts
Likes: 375
Joined Nov 2004
Location: Wellington, New Zealand
     
Aug 05, 2014 17:16 |  #5

Thanks Kirk. I have very deep nested directory trees. Knocking up a little program will only take 30 minutes or so, I'll try it this afternoon.


Professional wedding photographer, solution architect and general technical guy with multiple Amazon Web Services certifications.
Read all my FAQs (wedding, printing, lighting, books, etc)

  
  LOG IN TO REPLY
tim
THREAD ­ STARTER
Light Bringer
Avatar
51,010 posts
Likes: 375
Joined Nov 2004
Location: Wellington, New Zealand
     
Aug 06, 2014 04:33 |  #6

Well it took a few hours to knock the program up, but it works fine. It's just a wrapper, I'll release it as open source sooner or later.

The problem is the DNG SDK only supports files up to ACR 5.6 - anything later (ie compressed DNG files) can't be checked as the SDK is too old. Anyone have another suggestion?

I've posted to the Adobe forum, but they planned to release support two years ago but never got around to it.

So far my tool has found problems with about 20 files, out of the 40,000 I've checked. As well as DNG I have RAW and jpeg versions, so I'll just juggle things about to make sure I have good copies of all.

I wonder if there's a similar utility for Canon or Nikon RAW files? I could validate them too.


Professional wedding photographer, solution architect and general technical guy with multiple Amazon Web Services certifications.
Read all my FAQs (wedding, printing, lighting, books, etc)

  
  LOG IN TO REPLY
lsquare
Goldmember
1,933 posts
Likes: 2
Joined Apr 2008
     
Aug 06, 2014 06:04 |  #7

tim wrote in post #17078194 (external link)
I have a lot of DNG files and I know at least one or two have errors. Is there a tool that can validate the checksums in the DNG files? This will help detect and prevent bit rot.

I know Adobe has an API that can do it, but I don't know if anyone has developed a tool that uses it.

Right now the only method I can see is to convert them all to DNG again and manually look for error messages, a bit of a long process when you have tens of thousands of DNG files.

Is it possible to validate the checksums in other RAW formats? Can the DNGs be checked with Photoshop instead of LR?




  
  LOG IN TO REPLY
lsquare
Goldmember
1,933 posts
Likes: 2
Joined Apr 2008
     
Aug 06, 2014 06:06 |  #8

tim wrote in post #17079391 (external link)
Well it took a few hours to knock the program up, but it works fine. It's just a wrapper, I'll release it as open source sooner or later.

The problem is the DNG SDK only supports files up to ACR 5.6 - anything later (ie compressed DNG files) can't be checked as the SDK is too old. Anyone have another suggestion?

I've posted to the Adobe forum, but they planned to release support two years ago but never got around to it.

So far my tool has found problems with about 20 files, out of the 40,000 I've checked. As well as DNG I have RAW and jpeg versions, so I'll just juggle things about to make sure I have good copies of all.

I wonder if there's a similar utility for Canon or Nikon RAW files? I could validate them too.

I am aware of the bit rot phenomenon. Have you thought what may have led to those 20 files being corrupted? Are those files lost for good?




  
  LOG IN TO REPLY
Eyeball2
Member
132 posts
Likes: 3
Joined Jun 2014
     
Aug 06, 2014 06:56 |  #9

The DNG convertor actually does some validation of camera manufacturer raw files although I haven't taken the time to actually try to understand what it is checking. There is at least one downloader/image transfer utility that uses the DNG process to validate raw files during transfer even though it allows you to leave the raw files, not DNGs, at the target location. I think it was this one:
http://basepath.com/ne​w/detail-ImageIngester.php (external link)

The developer of that utility also has this utility that was mentioned in one of the editions of the DAM book:
http://basepath.com/ne​w/detail-ImageVerifier.php (external link)

Also ran across this thread:
http://photo.stackexch​ange.com …ity-of-a-series-of-images (external link)




  
  LOG IN TO REPLY
tim
THREAD ­ STARTER
Light Bringer
Avatar
51,010 posts
Likes: 375
Joined Nov 2004
Location: Wellington, New Zealand
     
Aug 06, 2014 15:08 |  #10

Good to hear products are already available, but their SEO sucks, I couldn't find them despite searching.

Unsure what caused the bit rot. My disk has two sectors gone bad, maybe that, or maybe just that hard drives aren't 100% reliable. I haven't lost any data, I have a native RAW copy of each image onsite, DNG files offsite in two locations, plus JPEG files of every image in each of those locations.

I've solved the problem too - I was using an old version of the DNG SDK, as the Adobe website linked to the old version not the new version. Now that I have the latest version I'll re-run my verification and see what happens.

I've looked for an open source program or library to validate other RAW files but I've had no luck. If anyone knows a suitable library or piece of software that works from the command line let me know. dcraw was my first stop but it converts the broken files fine and doesn't seem to report any problems.


Professional wedding photographer, solution architect and general technical guy with multiple Amazon Web Services certifications.
Read all my FAQs (wedding, printing, lighting, books, etc)

  
  LOG IN TO REPLY
tim
THREAD ­ STARTER
Light Bringer
Avatar
51,010 posts
Likes: 375
Joined Nov 2004
Location: Wellington, New Zealand
     
Aug 06, 2014 23:55 |  #11

I've released my DNG validation tool, you can read about it on this thread. I won't respond to questions on this thread about the tool, but happy to continue the discussion about validation libraries etc.


Professional wedding photographer, solution architect and general technical guy with multiple Amazon Web Services certifications.
Read all my FAQs (wedding, printing, lighting, books, etc)

  
  LOG IN TO REPLY
tim
THREAD ­ STARTER
Light Bringer
Avatar
51,010 posts
Likes: 375
Joined Nov 2004
Location: Wellington, New Zealand
     
Aug 10, 2014 15:51 |  #12

If anyone's interested in data corruption there's a good article here (external link).


Professional wedding photographer, solution architect and general technical guy with multiple Amazon Web Services certifications.
Read all my FAQs (wedding, printing, lighting, books, etc)

  
  LOG IN TO REPLY
kirkt
Cream of the Crop
6,602 posts
Gallery: 5 photos
Likes: 1556
Joined Feb 2008
Location: Philadelphia, PA USA
     
Aug 10, 2014 16:37 |  #13

Thanks Tim!

kirk


Kirk
---
images: http://kirkt.smugmug.c​om (external link)

  
  LOG IN TO REPLY
sponsored links (only for non-logged)

5,349 views & 0 likes for this thread, 4 members have posted to it.
Is there any way to validate DNG files without Lightroom?
FORUMS Post Processing, Marketing & Presenting Photos RAW, Post Processing & Printing 
AAA
x 1600
y 1600

Jump to forum...   •  Rules   •  Forums   •  New posts   •  RTAT   •  'Best of'   •  Gallery   •  Gear   •  Reviews   •  Member list   •  Polls   •  Image rules   •  Search   •  Password reset   •  Home

Not a member yet?
Register to forums
Registered members may log in to forums and access all the features: full search, image upload, follow forums, own gear list and ratings, likes, more forums, private messaging, thread follow, notifications, own gallery, all settings, view hosted photos, own reviews, see more and do more... and all is free. Don't be a stranger - register now and start posting!


COOKIES DISCLAIMER: This website uses cookies to improve your user experience. By using this site, you agree to our use of cookies and to our privacy policy.
Privacy policy and cookie usage info.


POWERED BY AMASS forum software 2.58forum software
version 2.58 /
code and design
by Pekka Saarinen ©
for photography-on-the.net

Latest registered member is semonsters
1533 guests, 131 members online
Simultaneous users record so far is 15,144, that happened on Nov 22, 2018

Photography-on-the.net Digital Photography Forums is the website for photographers and all who love great photos, camera and post processing techniques, gear talk, discussion and sharing. Professionals, hobbyists, newbies and those who don't even own a camera -- all are welcome regardless of skill, favourite brand, gear, gender or age. Registering and usage is free.