How to check if a .DNG is really raw data

Started by Milk and Coffee, June 02, 2020, 09:51:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Milk and Coffee

I've received a .DNG sequence from a coworker, and the files are incredibly small (like 200kb-ish a frame.) My suspicion is that they exported a .JPG sequence, and then converted the .JPG's to .DNG (which apparently you can do that???)

How can I check if a .DNG is really raw data? Can I open in a text editor? Is there a utility that makes it easy?

Thanks all!
Canon 5D Mark II, Mac/OSX

Walter Schulz

Let me suggest a non-technical approach: Ask your coworker to deliver unaltered raw footage instead of DNG.

Milk and Coffee

Thanks Walter. I already did that. Can you provide a technical approach?
Canon 5D Mark II, Mac/OSX

names_are_hard

What OS?  If Linux or Mac, run "file" over the file.  Test with a known JPG and DNG, the output should be consistent and different.

yourboylloyd

Just open it in Adobe camera Raw (maybe phortoshop, lightroom, or after effects) and try to color grade it. Push the highlights all the way down and shadows all the way up. A real RAW image would still hold up. An 8bit image would turn grey
Join the ML discord! https://discord.gg/H7h6rfq

Walter Schulz

@yourboylloyd: Can you provide some samples/screenshots showing the difference?
What happens if they messed up and converted raw to 8 bit dng or converted to 8 bit somewhere else in post and stored it as 16 bit dng after?
He gave not the slightest hint about pp...

Forensic with this kind of info?

mothaibaphoto

https://www.rawdigger.com/download
You can see absolute pixel values of every channel.
No need to buy/activate for that.

Luther

Use Rawtherapee. On the demosaicing menu, choose "bayer". If it is a raw image, you will see the bayer pattern (mozaic of RGGB). This is the easiest way.
But for the images to be 200kb, someone probably made lossy compression on those files.

Milk and Coffee

Thanks all! I'll try a few of those suggestions! Is there no way to open in a text editor Or something and view the code that would reveal it to be raw data?
Canon 5D Mark II, Mac/OSX

Danne

Use exiftool or what has already been recommended.
Dng can be lossless raw or even some lossy jpg turned into dng. Too bad you don't take the time to share samples.

Milk and Coffee

Quote from: Danne on June 03, 2020, 07:37:31 AM
Use exiftool or what has already been recommended.
Dng can be lossless raw or even some lossy jpg turned into dng. Too bad you don't take the time to share samples.

Sorry about the late reply! Here is a frame from that sequence!
https://www.mediafire.com/view/ve4pxi7gbd1wtra/M24-2054_1_2020-06-24_0001_C0000_000155.dng/file
Canon 5D Mark II, Mac/OSX

names_are_hard

Here's the output from running "file":
M24-2054_1_2020-06-24_0001_C0000_000155.dng: TIFF image data, little-endian, direntries=43, height=144, bps=530, compression=JPEG, PhotometricIntepretation=YCbCr, orientation=upper-left, width=256

So I say that's JPEG inside TIFF.  Would need to see another suspected good frame to be sure the other kinds of DNG get detected sensibly as well.

Danne

Image Width                     : 1880
Image Height                    : 1056
Bits Per Sample                 : 8 8 8
Compression                     : Lossy JPEG

Looks quite good despite compression. What was it filmed with from the beginning?

reddeercity

Interesting , Looks like sRaw compression on 5d2
Active Area                     : 0 0 1056 1880
Y Cb Cr Coefficients            : 0.299 0.587 0.114
Y Cb Cr Sub Sampling            : YCbCr4:4:4 (1 1)
Y Cb Cr Positioning             : Co-sited


This a great read & explains the compression in detail Subsampling.pdf

from the above pdf file


History Parameters  : converted from image/jpeg to image/dng, saved to new location
Didn't know you could do that

Milk and Coffee

So I asked my coworker what his original workflow was. Originally, I asked him to deliver a DNG sequence. He exported a JPG sequence with adjustments from ACR because he felt the DNG's looked "dark." (Probably because the DNG's are previewed in linear gamma on mac?) He then batch converted the adjusted JPGs back to DNG. (He obviously doesn't know the benefits of RAW)

I hate that DNGs can hold raster images. Now ill be skeptical if I'm receiving RAW data or not. :-\

Anyway, after some talking I asked for the original DNG sequence. Below is the original RAW DNG from Canon 5D2. (File size is larger, but still 740kb.)
https://www.mediafire.com/view/lzsxznzy1aq8fjy/M24-2054_1_2020-06-24_0001_C0000_000155.dng/file

Canon 5D Mark II, Mac/OSX

names_are_hard

Output from file for both:

M24-2054_1_2020-06-24_0001_C0000_000155.dng: TIFF image data, little-endian, direntries=43, height=144, bps=530, compression=JPEG, PhotometricIntepretation=YCbCr, orientation=upper-left, width=256
M24-2054_1_2020-06-24_0001_C0000_000155(2).dng: TIFF image data, little-endian, direntries=41, height=1056, bps=10, compression=JPEG, PhotometricIntepretation=(unknown=0x8023), manufacturer=Canon, model=Canon EOS 5D Mark II, orientation=upper-left, width=1880

It thinks they're both JPEG which feels weird.  That made me check with exiftool, which says one is "Lossy JPEG" and one is "JPEG".  Possibly jpeg2000?  I'd forgotten, but that does have a lossless mode.

Milk and Coffee

That is weird! Doesn't ML use a JPEG compression method for making lossless RAW? Is MLV App using it too for lossless DNG? I see that when I open both in ACR, the "JPEG DNG" doesn't show Adobe's RAW profiles in the drop down. Whereas, the second DNG I posted (should be real RAW) DOES have Adobe's RAW profiles available.
Canon 5D Mark II, Mac/OSX

names_are_hard

Don't know.  DNG uses TIFF/EP, and TIFF/EP supports lossless JPEG, lossy JPEG and other lossless formats.  I couldn't be bothered spending the time to manually analyse the sample file to dig deeper.  It's an open format so if you want to, go ahead :)

masc

Quote from: Milk and Coffee on June 30, 2020, 12:40:34 AM
Doesn't ML use a JPEG compression method for making lossless RAW? Is MLV App using it too for lossless DNG?
MLVApp uses LJ92 library for lossless footage.
5D3.113 | EOSM.202

Milk and Coffee

Thank you masc! Then I would suspect that's why exif is showing JPEG for both.
Canon 5D Mark II, Mac/OSX