CinemaDNG workflow for Blackmagic or Sigma FP cameras in Darktable

They have to be approved before they show up, I believe.

1 Like

I only see one pending upload for Micro Cinema Camera, CAM1_2000-01-01_1659_C0002_000100.dng, so i guess they didn’t upload after all?

I’ve also just uploaded a 3:1 compressed DNG that I took yesterday. It looks like it went through.

@independent Ok, i guess i’ve found that upload too, verified both uploads, thank you for contributing the samples!

1 Like

Reading this: Cinema Raw : Shooting and Color Grading with the Ikonoskop, Digital Bolex, and Blackmagic Cinema Cameras by Kurt Lancaster.

There’s a pretty interesting quote in it from the early days of BMPCC.

Because the Pocket camera records to an SD card, filmmaker Marco Solorio of OneRiver media wanted to know more about how Blackmagic Design could create a raw camera in such a small package. He interviewed Grant Petty, founder and CEO of Blackmagic Design at the industry trade show, NAB, in Las Vegas, April 2013. Petty explained how they were able to get raw CinemaDNG onto an SD card at 24 frames per second, but ran into issues at 30 fps. They really wanted to do raw, so they went back to the CinemaDNG spec sheet. They discovered that not only was there uncompressed raw that they put into their 2.5K Cinema camera, but there were two compression types for 12-bit raw CinemaDNG. Petty explains:
There’s a lossless compression (which is about 2.5:1 to 1.5:1—that’s not very much compression—it’s mathematically clean, It’s perfect). And then there’s a slightly lossy version, which is like a variation of jpg—it’s visually lossless; it’s very clean—and of course you’re still getting 12 bit raw, so it’s awesome. … So we’ve decided to Implement those standards. Blackmagic Design had actually developed their own 3:1 compression codec, but they decided to stick with the open standard of CinemaDNG. The Pocket Cinema Camera (BMPC) contains the CinemaDNG lossless compression, while they added the “slightly lossy” DNG codec to their 4K camera in order to keep the data rate down. Petty claims that, “[m]ost people are going to find that you cannot tell the difference” between the compressed CinemaDNG and the uncompressed. Furthermore, Blackmagic is also developing a QuickTime wrapper for the CinemaDNG format. “What we want to do,” Petty says to Solorio, “is to save the DNG into the QuickTime movie. That would potentially let us decode and read the files. We’ll make it a QuickTime movie, but it’s actually CinemaDNG inside—so that would be much more readable by Final Cut Pro and other applications like Premiere Pro.”

Thing is, there is no such thing in the CinemaDNG spec sheet as far as 12-bit JPEG extensions, nor in the original DNG spec sheet.

It’s a proprietary Blackmagic thing in the description near the bottom of CinemaDNG - Wikipedia

Of course the interesting thing is that now DNG 1.7 supports JPEG XL, which I think is going to be the killer app for JXL.

The DNG spec allows only for lossless JPEG when it comes to raw, at any bit depth (and is what is likely to be implemented at some point). The lossy (3:1, 4:1) 12-bit JPEG for raw was never in the spec indeed.

Yup. Lossy mandated 8-bit JPEG until 1.7 with the advent of JXL.

Of course it’s best described as “pseudo-raw” since it’s demosaiced but not color-converted, which also happens to be a solid way to work around RED’s pesky patent.

FWIW Blackmagic removed CinemaDNG from cameras they could move on to BRAW. It’s not currently supported by them AFAIK (except in Resolve). I think that the BMPCC4K had an even more compressed version of CinemaDNG before the switchover to BRAW in firmware 6.1 (I think).

I just corrected my post and left out some unnecessary commentry

Does anyone have access to a camera that produces that new raw format?
It would be rather awesome if someone could contribute the appropriate sample set.

This is what I found about BRAW:

Blackmagic RAW is defined as an Open Standard because it is cross-platform and open for anybody to include in their products/develop with using our free SDK. You can find all the information on Blackmagic RAW including drivers, manuals, the SDK and the player at our developer website: (/developer/product/camera)

In my post above I meant to say the CinemaDNG format was what they abandoned. However, there are still many older cinema cameras that shoot in CinemaDNG and several contempary cameras. Many people love CinemaDNG :smiling_face_with_three_hearts:.

From what it sounds like, a tricky thing as well, is there are differences between Sigma FPs CinemaDNG files and their stills DNGs. So, the Sigma FP DNGs can be read by Darktable and not the CinemaDNGs it produces.

Is there a chance CinemaDNGs (CDNGs) can be supported by Darktable? Would even having a toggle based system (tickbox, only loading CDNGs for instance) to separate all the noise the CDNGs create when trying to figure out what DNGs belong to what camera?

Again, this a wide term. What do you mean specifically? We have established there are (at least?) three kinds of “CinemaDNGs”:

  1. Uncompressed, as written by Sigma fp (i.e. not different to any regular DNG/TIFF) - already supported

  2. Lossless compressed, as written by Blackmagic, Magick Lantern FW on Canon cams, recently DJI drones and possibly others - it looks like this is becoming a more realistic goal thanks to recent efforts by @LebedevRI

  3. Lossy 3:1/4:1, as hacked by Blackmagic - although the tech is there (libjpeg-turbo 3.x now has support for 12b), it might take a while to put all together because it is an ugly hack breaking the DNG spec, which probably means ugly workarounds in darktable/RawSpeed (not impossible, but would need a strong motivation to do, if @LebedevRI is at all willing to consider it)

@independent note that i’ve asked about “BRAW” samples, because it is not obvious how well that new raw format is supported, either. It would be really lovely if someone, with an access to the camera, that can produce those raws, would contribute the appropriate samples to RPU.

FWIW, BM also produces uncompressed raws, and they are also not supported.
BM managed to mess even that up. I’ve just fixed support in

What a mess.

Yep. Wait until you find out they don’t put in Make or Model tags… :wink:

It’s odd - I’ve never seen an example of BRAW stills. BRAW is designed to be a video format.

Newer Blackmagic cameras don’t even list stills shooting support in their specs, although your link indicates clearly that the 6kPro can shoot DNGs under some circumstances.

There is a solution that converts, BMMCC, BMPCC and Sigma Fp CinemaDNGs into DNGs now. Dnglab is an amazing piece of of software that does exactly this. The developer is on this board.

It is commandline software and needs compiling with a very recent rust but I imagine precompiled versions will be forthcoming in the future.

My testing last night showed that it can convert into lossless compressed and uncompressed DNGs. Uncompressed conversion is instantaneous and lossless takes milliseconds. Lossless compressed DNGs are only slightly larger than standard CinemaDNGs from where they were converted from. The workflow is very nice as it designed for batch conversions or it can work on single files. It only works on non-compressed blackmagic files. Darktable 4.6.1 loads them up perfectly from what I could tell last night from my limited testing.

1 Like

I guess this requires a new post rather than editing my last post from 2 weeks ago.

I’ve seen this application on the periphery and looked past it. However mlvapp does most of what I really need for processing files on commodity hardware with free software.

It injests CinemaDNG folders, allows for multiple clips to be processed at once. Can play CinemaDNG files easily. It has a good range of tools, including highlight recovery, histogram, curves, colour temperature, bad pixel maps…

The program exports in whatever format you like. It seems to load 3:1 compressed CinemaDNG files fine :grinning:. And lastly it has a cut/trim feature. I can’t seem to load my wavs that belong to the individual CDNGs from the folder so this last feature is kind of a moot point. There is the work around of adding audio files with ffmpeg after the fact but it’s not an ideal situation. That trim/cut feature would be a real boon. Also, having audio included with the CinemaDNG file is one less step to muck up in postproduction if you have to do it afterwards. It might be there but I can’t seem to see how to do it from within mlvapp.

I haven’t used it extensively, just this morning however, apart from a few spurious comments in the terminal window, it seems stable–for now.

Lastly, it hasn’t been updated in a couple of years which is a real pity. The main use this program seems to have is in loading Magic Latern files but like I said it imports CinemaDNG files (without the audio it seems) and exports with adjustments just fine. It also can be used as a CinemaDNG player.

This is really interesting. I shot a lot with magic lantern and a Canon 5D mk3 back in the day, mostly using MLVApp to post process. Since upgrading to a Sigma fp, I’ve been mostly using Resolve and custom scripts to debayer to exr.

I’m super curious how the heck you can import folders of CinemaDNG in MLVapp. I just compiled from master on linux and can’t figure out how it might be possible to load the clips. All the usual suspects (drag and drop, import etc) don’t seem to work. Any secret tricks to share?

Also +1 for dnglab… with the recent 0.6.1. release it’s the first viable open source option for lossless compressing dng images. I compressed a 1TB video archive of cinema dng images down to about 300GB.

File → Transcode and Import.

From there there’s a folder icon to click on your CDNG file and you are good to go! You can load several CDNG files (folders) and have it like a media bin. So, that works really well. Great for matching several shots.

So, i t makes an .mlv file and from there you can export to anything you like. I’ve just tried it with some test Sigma FP files and it works.

The footage was pretty odd looking so I don’t know what’s going on there. I’ve got no experience with Sigma FP files. Something I found on the net.

Also, from the test file I can see it didn’t load the sidecar .wav file as well.

EDIT: @jedsmith seemed to compile fine but my self compiled Linux version won’t import DNGs and you need to link the compiled ffmpeg to your mlvapp $PATH. Also, I said in a post above that mlvapp imports compressed CDNGs. It does but the colours are all up the wazzoo as are uncompressed CDNGs.

So to summarise, mlvapp will load CDNGs from Sigma FP and Gen 1 Blackmagic CDNGs but the colours are wrong and from what I can tell the software is abandonedware. Trying the obvious fixes (black level) and different colour spaces doesn’t help

1 Like