6
\$\begingroup\$

I have a Nikon D7000 with which I use dual SD cards. I have the camera configured to write the same images to both cards, in case one of the cards becomes unreliable. I accidentally let the two cards get out of sync, so I've been trying to merge the contents.

When I go to merge the files, however, the images with the same name, for example DSC_8850.NEF have slightly different file dates (off by two seconds or so), and the file sizes don't match precisely. When I run a checksum (md5sum) on the two files, I don't get the same result for both.

What gives? Why is it writing a slightly different image file on the second card? Both of them are being written as RAW NEF files.

How will I be able to differentiate between the situation where the two files are the same photograph, but differ in meaningless way, and the situation where two different photographs have the same filename?

Thanks a lot.

\$\endgroup\$
0

1 Answer 1

3
\$\begingroup\$

The slight difference in the filesystem timestamp isn't surprising, because that would depend on how exactly the camera's internal operating system writes to both devices at once and the structure of the data pipelines, as well as possible differences in the card speeds. But the differing file sizes seems like a mystery.

Turns out there is a difference in the metadata. I found this forum discussion (about the D7200, but I bet the situation is the same), where people did some digging and discovered that the camera records which slot was used. Although it's just a one-bit change, with compression, this would also account for a difference in file size.

To address this, I can think of several approaches. A simple way is to rename all files using their internal timestamp (rather than the filesystem timestamp). Make sure to use the subsecond time, because otherwise if you've taken more than one frame per second they'll overlap:

exiftool -d %Y%m%d%H%M%S "-filename<${datetimeoriginal}${subsectimeoriginal}0.%e" *.NEF

Or, you could extract the preview JPEG from each image and checksum that — that should show you what's identical without regard to metadata.

\$\endgroup\$
3
  • \$\begingroup\$ I wonder if there's any way to mark two files from different cards as a match, ignoring this one parameter? \$\endgroup\$ Commented May 17, 2018 at 13:10
  • \$\begingroup\$ Ah! That thread has a method for doing it. \$\endgroup\$ Commented May 17, 2018 at 13:14
  • \$\begingroup\$ It's somewhat tedious though. \$\endgroup\$ Commented May 17, 2018 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.