So what is that all about:
I've modified raw2dng code and added the fully compatible (hopefully

) MLV output with all required info blocks and metadata.
usage:
raw2dng file.raw [prefix|--mlv [sidecar]]
prefix will create prefix000000.dng, prefix0000001.dng and so on.
--mlv will output MLV with unprocessed raw data and the same name as input.
sidecar if needed specify (prerecorded or any) MLV file to override meaningless
metadata values in IDNT, EXPO, LENS and WBAL blocks
It fully supports multiple file chunks in DNG and MLV mode. Produced MLV files tested and working with mlv_dump, mlvfs, MlRawViewer. Compiled for Linux and Win32. OSX binaries kindly provided by
Danne.
I needed this tool and I've done it for myself, but if our _master_ devs or anyone feel like this is useful addition it's a honor to contribute at least something to the great ML project community.
Download latest source and binaries or compile it from ML source (it's merged to Unified branch).
Update:Here is a small tool which automatically sets proper frameCount value to MLV file header (
development raw_rec, raw v1.1 mlv lite case where it's zero not any more,
patched).
usage:
mlv_setframes file.mlv [--set]
--set if specified actually writes frameCount to file
otherwise just outputs the information
Extra testing option:
--set0x00000000 sets zero frameCount to any mlv file
Download:
Source,
BinariesThe binary looks for proper MLV/MXX file not by extension but a content of a file, makes sure the file has to be changed and only after that alters the value if additionally --set option specified.
You can safely run it on any folder with any mixed files in it like this: "for file in *.*; do ./mlv_setframes "$file"; done".
However *.M* wildcard is better

performance wise.
If --set is not specified it changes nothing - just outputs a few info about processed files. With --set0x00000000 you can go back to original state.
Note: It does not alter file modification time. Which I guess essential at least for me.
Update 2:Here is a mlv_dump version from Dmilligan's magic-lantern repo. He did substitute original dng handling (chdk-dng.c) with his own library (dng.c) which is a base of mlvfs dng handling code. dng.c from latest mlvfs is quite different from the version of this branch, so I merged some sweet code from latest file and it seems worked out ok.
What we got after that:
1. Very similar to MLVFS dng output except it's 14bit and there are no forward matrixes in the header.
2. Fully works (hopefully): white balance, timecode, default scale.
3. Some fixes to mlv_dump to work properly including crash when using chroma smooth option.
I want to thank David for his great work on dng.c and mlvfs in general and Danne for his ideas, pointing out to this great reworked version of mlv_dump and helping out to test the program during development process. As well as all ML leading devs here and all the community.
Latest source is
here.
Update 3:There is more advanced and up to date version called
"mlv_dump on steroids"Update 4:Now "mlv_dump on steroids" merged to official ML's crop_rec_4k branch
LinkRegards
bb