CinemaDNG workflow for Blackmagic or Sigma FP cameras in Darktable

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

what makes you think this? the repo has a commit only a few weeks old and there is a fork with support for motion cam raw video with a commit that is from a few hours back.

i didn’t see that fork. On the original project the last release was from over 600 days ago on their github. The magiclantern website made it difficult enough to register I gave up.

What happened was my own fault, a case of bad media management. I’d been doing tests with various CinemaDNG sequences and mixed up a couple I’d done with darktable and dnglab which look gorgeous. I was so excited for this new software between this and my work and also didn’t notice the pink wash mlvapp produces. It bummed me out.

Anyway, thank you for the heads up. I’m cloning the fork for compiling now.