Switch for macOS Catalina/Linux (former cr2hdr.app)

Started by Danne, May 05, 2015, 04:32:38 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


I know. I asked you to test with a few other dual iso files.


Ok, never mind. Found a file myself. Strange bug. Must check further.


I have just checked another iso file and it has the same exact problem, after 72 frames green frames happened.


Yes, thanks. I will investigate further. I think it has to do with raw2dng changes. I found when the problem started to occur in my version of mlv_dump.


Here we go. I nailed down the problem to some newer vertical stripes code. Inserted back the older code and now all is working fine again.

Hopefully... :P


all problems gone, good job! Thank you.


Yikes what a battle... You guys push each other to its limits and Danne was able to pull it off nicely at the end.

Thanks for pointing this out @festr!

Gonna shoot some short Dual-ISO lossless stuff and confirm this ASAP!
5D3.113 | 5D3.123 | EOSM.203 | 7D.203 | 70D.112 | 100D.101 | EOSM2.* | 50D.109


Great. Also uploaded an updated cr2hdr.app non compressed version.


New version uploaded. Compressed mlv_dump version is now merged with cr2hdr.app. Thanks to Bouncyball for setting s´things straight  :P. Thanks g3gg0 and a1ex for groundbreaking features.

Lately I´ve been playing around with white balance trying to outsmart dcraw -a (averaging auto white balancing) with either some better auto wb handling or some better way to do it manually. After some attempts using imagemagick scripting with some fairly good results but in the end it wasn´t better then dcraw I finally settled with a manual workflow in conjunction with ImageJ, a java based application. so if you want to try this out install ImageJ straight to applications folder before proceeding.
ImageJ download

Workflow description:
Simply select x,y coordinates with the multipoint tool in ImageJ and save those to a txt file. cr2hdr.app will take care of the rest.

It still depends on dcraw but by selecting x,y coordinates manually you get more control over the result.
The interesting workflow here is that you will be able to select up to 10 white balance points and those will be calculated into a median value and converted into the AsShotNeutral tag in your dng file. A lot like spot metering but using the same idea with white balance.
Also note that usually your NLE doesn´t rewrite the actual white balance tag in the dng file but applies it´s own local metadata system. Personally I rather have the actual dng tag changed so white balance could be read in multiple nle´s.

Movie tutorial:

Choose (13) in mlv_dump menu

Work with the multipoint tool

Select points(up to 10 points) and save the file next your MLV files. The format will be txt

You preview the new white balance by selecting (s) from the menu

Proceed to the next file (n) and apply white balance points and keep going as long as you like. When done select (q) and then run cr2hdr.app and it will process the dng files and apply the new AsShotNeutral tag to your dng files.

White balance files will be named with the extension .AW and cr2hdr.app will match the file with corresponding MLV


Quote from: Danne on May 06, 2017, 11:40:42 AM
New version uploaded. Compressed mlv_dump version is now merged with cr2hdr.app.

How do I output compressed DNGs?


Yet another version in first post.

Thanks(as always) to Bouncyball, for patching and adding vital parts to get g3gg0 latest lj92 code in mlv_dump to work with my version of ml-dng code(dmilligan). I added most of the code from here https://bitbucket.org/hudson/magic-lantern/branch/crop_rec_4k but Bouncyball tracked down parts which was causing black, corrupted frames and added some needed metadata to dng.c.
This means you now are able to output compressed dng files(how awesome is that!) through Andrew Baldwins lj92 code. Select (10) from within the mlv_dump menu.
Please report any findings, good or bad.
Happy processing.


Quote from: Danne on May 07, 2017, 09:29:27 AM
Yet another version in first post.

Please report any findings, good or bad.
Happy processing.

Cool, thanks. All good. 4.9Gb uncompressed file is down to 3.1Gb. Original 12Bit compressed MLV is 2.4Gb.



There is a problem with 10/12-bit files and mlv_dump with the latest crop_rec4k mlv_dump version. Until they are sorted out I´ll put the older version back up. It won´t compress dng files but it will work with all files.


I really like the compressing of dng/MLV files and would like to test it out in cr2hdr.app. For now it will not compress 10/12bit files but all the rest seems to work so therefore I will post a side testversion of cr2hdr.app
10/12bit files will still export but uncompressed. This is automated so even if you select -c, (10) in mlv_dump menu, compression will be neglected for only 10/12bit files.
(Added to universal cr2hdr.app build, link not working. Download in first post)
Happy testing.


I'm happy to say that cr2hdr is now nicelly integrated in my workflow! On the last period a lot of new things were added by Danne

1) you can pick destination folder.
2) dng compression almost 50% in size.
3) multithread (was already there maybe).
4) hot pixel map creation and usage.
5) batch processing of a series of folder.
6) countdown of files left to process.
7) A_ORIGINALS folder deleted when not needed, files stay in place.

On a usual day you can preview your MLV by launching MLVFS, then feeding the dngs to mlrawviewer. After that you can just launch the conversion to compressed dngs.


Thanks for feedback togg and testing, helping ironing out bugs(especially around multiple folder selections). It´s great to see the result of dng compression implemented by g3gg0(A.Baldwins code) and that you find good use of the badpixelmap handling(Bouncyball)
I will add some of the changes you highlight soon to main build and keep refining other processes when I find the time.


New download in first post.

- Reworked mlv_dump handling so that it runs multiple mlv files in parallell instead of the slowish extraction handling before. I tested against processing files lined up one by one opposed to parallelising processing and speed increase doubled when working with multiple mlv files.
- Also reworked how pixel map files are used with cameras such as eosm.
- Added a percent counter, going from 100% down to zero while extracting dng files.(togg feedbacked)
- Drag multiple folders onto cr2hdr.app containing files and cr2hdr.app will process what´s in those folders one by one.
- More goodies in the mlv_dump menu from recent code from g3gg0, amongst them "relaxed" mode if you check under "autopsy" setttings.
- HDR handling with dng files. Check ProRes menu(tblend filter)
Probably more stuff I can´t remember...

Feedback is welcome, both good and bad news.


just tried it.. seems really fast. thank you.


Cool, thanks for getting back.


Just uploaded a new version which makes it possible to preview any flavour of MLV. It works through symbolic linking which utilises MLVFS as a preview engine together with MlRawViewer. Thanks to dmilligan state of the art mlvfs now working with compressed raw(thanks Bouncyball for implementing A.Baldwin lj92 code) we can now preview any flavour of MLV.
It works like this.
- Once you have mlvfs installed you simply drag one or more MLV files to cr2hdr.app. This will build a temporary mlvfs structure and open up all MlRawViewer and builds thumbnails of all MLV files from within the folder. Once you close MlRawViewver the mlvfs structure is erased and ejected.
Some brute ejection (killall) so I renamed a mlvfs version to mlvfss so it doesn´t eject any regular mlvfs structures.

The script goes like this
#workaround which lets all files preview through MLVFS
    killall mlvfss
    rm -r /tmp/MLV_viewer
    mkdir /tmp/MLV_viewer
    mkdir /tmp/MLV_viewer/storage
    mkdir /tmp/MLV_viewer/mount
    ln -s "$(dirname "$(cat /tmp/DUALISO/path_1)")"/*.MLV /tmp/MLV_viewer/storage
    cd "$path_2"Contents/mlvfs

./mlvfss /tmp/MLV_viewer/mount --mlv-dir=/tmp/MLV_viewer/storage -f -o local -o volname=/tmp/MLV_viewer/mount -o allow_other --resolve-naming &

"$path_2"Contents/bin/MlRawViewer.app/Contents/MacOS/mlrawviewer /tmp/MLV_viewer/mount &
while pgrep mlrawviewer
do sleep 1
    killall mlvfss
    rm -r /tmp/MLV_viewer
    rm /tmp/DUALISO/path_1


New download.

Reworked a lot around darkframe automation. Now a setting to process dng files together with darkframe files for example. All automated and multithreaded of course. Just film a few short darkframes along with your regular footage and add them to the mix of MLV files and see the difference in picture quality when g3gg0´s implementation of darkframe averaging takes place. The darkframe average settings can be reached from Main menu then select (A).
"The select darkframe storage" is optional and the thinking around building a darkframe storage folder is to be able to use it statically and always set and ready for any matched MLV footage. Fill the selected darkframe storage with darkframe MLV files and if they´re not created yet they will be in the process.


Can i convert DNG sequence (edited in Lightroom) into MOV (say, Prores 4444 and other formats) with your app?

Davinci Resolve doesn't see changes that i made with DNGs in Lightroom.

Adobe Premiere doesn't see DNGs. And i wouldn't like to work with TIFFs, because anyway i need to keep DNGs to be able to change them after.

After Effects correctly sees DNGs with changes, but there are problems with understanding that app - and it's very bulky itself and too slow - 8 min for 10 sec video.

I just need a simple conversion from edited DNGs to MOV.



Yes, you can export to ProRes4444 and proxys too if you like. Once you get it rolin´one easy way is to do following

1 - Drag a folder with mlv file onto cr2hdr.app

2 - From Main menu select (p) and hit enter to get into the prores menu

3 - Select an output flavour. In the example I selected cineon but any of the settings could be used. If you want proxys too just select from the proxy section further down.

4 - If done select (r) to start the application. First the MLV files will be turned into folders with dng files and after this exported to ProRes files.

There will be two folders created in which the ProRes files will be exported to. Let me now if it works out for you.

*For dng files edited in acr/lightroom check out the setting (22) in the prores menu.


Hey guys. I have a strange problem with the latest version of the CR2HDR app that I just downloaded the other day. When converting my regular .MLV files (14 bit, with sound on MAC 10.11.6), for some reason the audio for each .MLV file dissapears from the dng folder for each clip?! I can see the audio file clearly when it´s working on spitting out the .dng files, it´s the first file that appears when it starts converting, and after it´s done, the audio file normally jumps to the bottom of the .dng files in each folder. But for some reason, as soon as CR2HDR is done processing a .MLV file to .dng files, the audio file disappears and is simply gone and I can´t find them anywhere? Very strange?

In this first pic when the app is converting the file you can clearly see the audio file at the top of the .dng folder.

In this pic the .MLV file has been finished and there is no audio file at the top as usual, since it normally goes down to the bottom.

And in this pic you can clearly see that there is no audio file at the bottom either.

I opened the converted .dng sequence in Resolve just to check and see if the audio was present anyway, but it wasn´t.

So I went back to an earlier version of the CR2HDR app that I fortunately had saved in my system that I´ve been using up until a couple of days ago when I decided to try out the latest version. This version is from around march-april 2017 (can´t remember exactly), and the exact same .MLV file converts properly with the audio saved and present in the .dng folder as usual..

It´s just a regular 14 bit .MLV file, no dual iso or anything else, and I didn´t do anything differently in the CR2HDR app between both conversions, I used the exact same settings. Am I doing something wrong? I´ve looked thru the app to see if there has been an option for sound added somewhere that I don´t know about, but couldn´t find anything.

Thanks for a respons, and if this has been asked and answered somewhere, I´m sorry to write this post, but I´ve searched and couldn´t find anything about this..

Kind regards