The CinemaDNG Discussion (raw2cdng)

Started by chmee, May 23, 2013, 10:46:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.



THis looks like a fantastic diagnostic tool to help resolve issues w problematic MLV files. THanks so much! Looking forward to the next version of raw2cdng.
Please let us know how we can use it to either fix files, and\or use it to provide you with useful diagnostic information


In beta 6, I still cannot scroll through the files without the app crashing


Just a thought for a request. I have seen in the MLV to DNG Batch Converter v1.9 there is an option to use an ACR profile when exporting the DNGs. The idea behind it is to apply an ACR preset that is a flat profile or one that you would create for what ever you have in mind. Then, you could either bring those into AE to export to ProRes or what ever codec you want OR bring those right into Premiere or Resolve with that preset applied. That would save a ton of clicks, especially with larger projects with bringing them with a flat preset applied already. However, I do not know if Premiere or Resolve will read that applied preset since cDNG is a different process than just the normal DNG (to my knowledge).


Quote from: ChadMuffin on June 28, 2014, 03:28:53 AM
However, I do not know if Premiere or Resolve will read that applied preset since cDNG is a different process than just the normal DNG (to my knowledge).
No, they won't. PP uses Speedgrade framework which doesn't read ACR and the same goes for Resolve (where you can apply a flat profile - BMPCC - and then a LUT of your choice to all your footage. Plus it encodes faster).

Forgot to mention that MLV to DNG Batch Converter v.1.9 generates DNG, not CDNG. So PP won't read them at all, for Resolve it's about the same between the two formats right now (reads both equally).
5D Mark III



Thanks for the info! Never mind about my request then. heh.


Hi, from my 2TB shooting I have a trouble opening one of my file. The loader bar is still loading, both raw2cdng and mlvdiag.

What i did -- downloaded all the mlv's, deleted those 1 bytes and batch renamed all the mlv's (because of Resolve round-trip method).

The debug info:

[drop] ------
[drop] -- file K:\xxx\002_M0336.MLV will be analyzed now.
[drop] is MLV
[setFileinfoData] set/changed Filedata
[drop] FileinfoData set
[createMLVBlocklist] started
[createMLVBlocklist] splitFiles counted (1)
[createMLVBlocklist] indexing Blocks in K:\xxx\002_M0336.MLV

My theory is that the end of this file was splitted into those 1byte chunks and sice I deleted them, raw2cdng don't know where to find them? The progress bar is still active, but the disc activity is zero.

EDIT: But I deleted many 1 byte files and from 399 MLV's only with this I am getting error. The file exctracts with MLV Converter 1.9.2 fine. :(


can you open it with mlvdiag? Oh Sorry, see now, you tried. ok. will change the reader module in mlvdiag/raw2cdng to allow open/read "corrupted"/strange blocks.
[size=2]phreekz * blog * twitter[/size]


@chmee: now tested with mlv convertor 1.9.2 ... the files open, but won't extract... since it's a 80gb of data I think there's something important in it.. :( oh, god...
Do you think there is a chance to get the data from the file?

tested it also with mlv2dng:
mlv2dng.exe 002_M0336.MLV
Exception! Header not recognized: ''

Exception! Header not recognized: ''


mlv_dump.exe 002_M0336.MLV

MLV Dumper v1.0

Mode of operation:
   - Input MLV file: '002_M0336.MLV'
   - Verify file structure
File 002_M0336.MLV opened
File 002_M0336.M00 not existing.
[ERROR] Missing file header
Processed 0 video frames


Do you have a Hex-File-Editor like HXD? Open the file with it, copy the first 1MB (or 5 or 10) to a new file and send it to me. [email protected] (i will code such a button into mlvdiag).. Ahh, please write down the original and ml-firmware-version and body, maybe its a hint for @a1ex on a bug. maybe..
[size=2]phreekz * blog * twitter[/size]


as you assumed in your pm, this file is empty, full with zeros.

regards chmee
[size=2]phreekz * blog * twitter[/size]


Chmee, I've got visual studio 2012 and have been playing with the source a bit, added some exception code due to warnings, etc.  I'd be happy to help out on the code base, I'm trying to get my C# skills up, I've got a class on it this semester, so any tinkering I can do will help me.  Also, I can help try and add some more try/catch blocks for some of the I/O type errors we've been seeing, but wanted to make sure you're needing help with the program.



of course, lets start a workflow with bitbucket.
[size=2]phreekz * blog * twitter[/size]


hey chmee,

here are a few logs from attempting to decode MLV files from my latest vacation clips. These are all shot on a 7D. Tried numerous times, and it seems some of these files just dont want to decode, they just crash the application. Only several files out of almost a TB of video tho, so not horrible. Just wish I knew what was causing these crashes. Please let me know if I can provide any further info about any specific file.

Smaller log1 error:
Log 2 error log:
Log 3 Errors:
BIG log file:


chmee what happened to the development of this program? not a single update in two months? bummer.



guys. sorry, really.. it just has been full o' work, and it is still. next days i'll publish a beta7 with some fixes but *SORRY* still no chroma and vertical banding. on the end of this month i'll start my holiday-time with more time for this project again.

to be honest, i didnt found the trick with chroma and vertical banding - i just spent far too little time to understand the sourcecode - and i think about changing the whole code to byte-arrays (instead of uint16) to be on a better track for that. cant say, if it changes the transcoding time. on the todolist is a c#-dll-library for mlv-things as well, cause i use nearly the same code on raw2cdng and mlvdiag. makes sense :) but positive news: a german guy mailed, he wants to help on raw2cdng, maybe we get all the transcoding-code in c++, hoping it speeds up the thing.

regards chmee
[size=2]phreekz * blog * twitter[/size]


Glad to see more things coming and expanding the team! Excited for more developments.




short info on some work: as someone stated i didnt used the WBAL-data from MLV. the values are kind of tricky. why? The values inside WBAL are only usable under some circumstances:

these are (by now) the interesting data-fields in WBAL
wb_mode - from 0 to 6 and 9
kelvin - only accurate if wb_mode = 9
wbgain_r ,_g and _b - only accurate if wb_mode = 6
If you use wb-Presets (tungsten, shade, cloudy etc), i only see the preset, but neither kelvin nor wb_gain is right (there will be old values from the moment you used them last time). If you use KELVIN (manual setting), only kelvin will be right, the wbgain-values are not refreshed. as well, wb_mode MANUAL leads to accurate wbgain-values, but kelvin wont be refreshed.

(by the way)
wbs_gm - is the known green-magenta-shift, i assume, its a simple value shift green versus red/blue
wbs_ab - assume its a YPbPr-Shift (Lab)

Why do i write this? it seems, it makes sense to write down all necessary fields/values and save them as lists into the main ml-modules or into the converter. If you look into a cr2-file from your body, you ll find the presets. more: to get the most informations we should save the values from all possible Kelvin-Steps.

(1) i did pictures with all kelvin-steps (5DIII 2.500-10.000).
(2) saved them into a folder
(3) then i used the great exiftool to extract the wbgain-fields.

save this code into a file named wb_manual.fmt into this folder:

$ColorTemperature,${WB_RGGBLevelsAsShot;tr/ /,/}

and run this via command-line inside the folder you saved the cr2-files.

exiftool -p wb_manual.fmt *.CR2 > list.csv

voila, you ve got a commaseparated list - kelvin to rggb-values. here you see it inside excel:

then do this format-file (name it wb_presets.fmt) on only one cr2-file to save the presets:

Daylight,$ColorTempDaylight,${WB_RGGBLevelsDaylight;tr/ /,/}
Shade,$ColorTempShade,${WB_RGGBLevelsShade;tr/ /,/}
Cloudy,$ColorTempCloudy,${WB_RGGBLevelsCloudy;tr/ /,/}
Tungsten,$ColorTempTungsten,${WB_RGGBLevelsTungsten;tr/ /,/}
Fluorescent,$ColorTempFluorescent,${WB_RGGBLevelsFluorescent;tr/ /,/}
Flash,$ColorTempFlash,${WB_RGGBLevelsFlash;tr/ /,/}

call it:

exiftool -p wb_presets.fmt [CR2-FILENAME] > wb_presets.csv

after that we've got the rggb-values for the wb_mode's 0-5. for 5DIII fw 1.1.3 these are the values:


so, now i've got all values to give the cinemadngs (nearly) accurate rggb-values to simplify the workflow inside the editing tools.

and now? whats the problem? it seems (look inside a cr2) these rggb-values from 5dIII are not accurate for all bodies. i will build this things into the next raw2cdng-version, but maybe its necessary to do these rggb-lists for every modell - and maybe these values change with the firmware. if someone's got some time for that, try to build these lists as well..

@g3gg0 , @baldand and @a1ex was this work somewhere done already?

@jbowdach i didnt forgot you, right now i just have the time to solve actual things. if you've got a "smaller" non-functional file, please send it to me.

regards chmee
[size=2]phreekz * blog * twitter[/size]


Hey there,

unless I did not make any mistake, the values are different on my 5D mark III's:

1. Older 5D mark III, bought in 2012, SN 013021001***, FW 1.1.3

1. Newer 5D mark III, bought in 2014, SN 268021002***, FW 1.1.3

For instance also the shutter sounds a bit different on these, so maybe there's some little design difference?

I also doublechecked that no WB shift was set on both and that both had same settings, same standard profile, disabled all "enchance" functions, etc.


thanks a lot. i assumed, that every sensor has got its own indivdual adjustment - maybe once on build or maybe once on switch on or firmware-update.. means, every 5DIII has a slightly other characteristic curve. but for the job as a converter-app with static rggb-values it should be enough - OR - i/we apply this data as external files - i dont think its worth it.

now could be interesting to see, how the curves differ on other models.

thanks and regards chmee
[size=2]phreekz * blog * twitter[/size]


For me it's totally OK to use some "average" values. This values will still be used only when creating proxies and then finetuned in the final color grade.


Im having sync issues when I autosync in Resolve. Theres a consistent gap at the beginning of the audio. Anyone else having this issue or other audio sync issues?


i just did a small test with ~25 files, recorded (in terms of timecode) in nearly same time. after autosync it went good, no gaps, no real problems. i assume, my timecode-calculations for the audiotrack going wrong if they're broken framerates. did you checked the timecode inside the files?

just found that: maybe thats kind of similar?

regards chmee

btw: i implemented the WBAL-usage and resolve, premiere and photoshop behaves quite well. did some more exception-trapping and debug-writing. beta7 is near.
[size=2]phreekz * blog * twitter[/size]