Magic Lantern Forum

Using Magic Lantern => Raw Video => Topic started by: Audionut on April 29, 2014, 11:00:27 AM

Title: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on April 29, 2014, 11:00:27 AM
The black level fix has been merged with unified.  If you're still having issues make sure you're using an updated build.



Quote from: Original PostSince this is a kludge fix that requires extra post processing for all recorded video, you may want to help the developers fix it properly (http://www.magiclantern.fm/forum/index.php?topic=11942.0).





There are some issues in the raw backend, that may cause some issues with the black level in recorded video.
The black level is a function of the camera, and needs to be set correctly, otherwise issues such as pink casts on the footage may result.

On 5D3, 7D and others, the black level should be 2048.
On 5D2, the black level may be 1024, or around 1750.

If you notice issues with your footage from MLV, there are 2 options to fixing the footage.

With mlv_dump (http://www.magiclantern.fm/forum/index.php?topic=7122.0), you would use the --black-fix command option.

mlv_dump --black-fix=2048 -o out.mlv in.mlv

Here, you would adjust the value for --black-fix, suitable for your camera, until the footage looks correct.  From my quick testing, if you have the black level to low, there will be pink casts, and if you have the black level to high, there will be green casts.

If you have already outputted DNGs, then you can use exiftool (http://www.sno.phy.queensu.ca/~phil/exiftool/) to fix the issue.

exiftool -BlackLevel=2048 input.dng
Adjusting the -BlackLevel value.
You can substitute the input name for a wildcard (*), to batch process large amounts of DNG files.


User ultimatemale has created a tutorial with Mac.  Most of the things can be followed even if you're a Windows/Linux user.

Quote from: ultimatemale on June 06, 2014, 01:20:30 AM
This is a video tutorial to show you how i fixed the corrupt ML files that comes out looking black and green
Shot a music video on ML-RAW (not MLV)
Canon 5D3 1.2.3
ML build March 17th
Converted with RAWmagic lite
I use an apple Imac


Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Jared on April 29, 2014, 09:11:42 PM
Hello
Is there any way to correct this error with RAWVideo?
Today I did some tests with the build "magiclantern-Nightly.2014Apr29.5D3113"
Used Camera: 5D Mark III
DNG FILE: https://www.dropbox.com/s/10k6tf2mec16bmq/M28-0517-000000.dng
SCREENSHOOT:
(http://i61.tinypic.com/j7qfx0.png)
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on April 30, 2014, 12:08:19 PM
Did you bother to read my post at all?
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: g3gg0 on April 30, 2014, 02:50:46 PM
Quote from: Audionut on April 29, 2014, 11:00:27 AM
The latest MLV module has some issues with black level that may need fixing on your footage.

just a note - its neither mlv_rec nor raw_rec but ML core (raw backend) and this bug is not in the latest ML version, but is there for a long time.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Jared on April 30, 2014, 03:01:22 PM
Quote from: Audionut on April 30, 2014, 12:08:19 PM
Did you bother to read my post at all?

Of course I read your post friend, but we wonder if there is an option that works, (exiftool did not work with my dng damaged) in the case of mlv if it works ... but unfortunately this record it in RAW.

as you can see I try as you're explaining in the post.

sorry friend, you're upset by my question, but this way does not work for me
(http://i58.tinypic.com/2zodlom.jpg)
(http://i62.tinypic.com/16hrind.jpg)
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: g3gg0 on April 30, 2014, 03:11:12 PM
a) never use directories with spaces -> try somewhere else
b) use a obviously wrong value like 1024 to check if it has any effect
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Jared on April 30, 2014, 03:54:54 PM
Quote from: g3gg0 on April 30, 2014, 03:11:12 PM
a) never use directories with spaces -> try somewhere else
b) use a obviously wrong value like 1024 to check if it has any effect

trying again this way
not working
: (

http://i57.tinypic.com/2mpeayo.jpg


// Please use valid image sizes, as per the Forum Rules (http://www.magiclantern.fm/forum/index.php?topic=934.0).  Audionut.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: g3gg0 on April 30, 2014, 04:03:12 PM
you are sure that this is a .dng generated from raw2dng or mlv_dump?
or was it made with some other tool?

if not -> use raw2dng / mlv_dump
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Jared on April 30, 2014, 05:38:52 PM
Quote from: g3gg0 on April 30, 2014, 04:03:12 PM
you are sure that this is a .dng generated from raw2dng or mlv_dump?
or was it made with some other tool?

if not -> use raw2dng / mlv_dump

first use to generate dng RAWanizer
then use raw2dng.exe
without solving the problem in *.raw files
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: g3gg0 on April 30, 2014, 08:31:23 PM
well...

(http://s7.directupload.net/images/140430/temp/rnme7ose.png) (http://www.directupload.net/file/d/3608/rnme7ose_png.htm)
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Jared on April 30, 2014, 08:52:50 PM
Quote from: g3gg0 on April 30, 2014, 08:31:23 PM
well...   

Thanx G3gg0 !!!!!!!!!  :) :) :)

can be repaired using the exiftool that comes with the installation of RawDigger
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: jippalippa on May 01, 2014, 10:19:49 PM
Thank you so much for this message! It's a true relief to know i can fix this issue!
I thought my camera was broken.
I have a 5D Mark II and i solved by disabling the "Force Black Level to 2048" (that was causing the magenta cast).
The problem was probably the fact that my camera has a lower native black level value, and so, by forcing a higher one, it introduces color casts...
So everything ok, from now on.
But i still have the problem of the old clips i shot with this option enabled (infact they are all pink)
If i use the exif tool (or the mlv dump) method and input a 2048 black level i don't think i'm going to solve the issue (2048 is the same level i used in those pink pictures).
What level should i input to get a neutral result? (On my 5D Mark II)?
Thanks a lot
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on May 02, 2014, 05:04:16 AM
Quote from: Audionut on April 29, 2014, 11:00:27 AM
On 5D2, the black level may be 1024, or around 1750.




mlv_dump --black-fix=2048 -o out.mlv in.mlv

Here, you would adjust the value for --black-fix, suitable for your camera, until the footage looks correct.




exiftool -BlackLevel=2048 input.dng
Adjusting the -BlackLevel value.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: ultimatemale on May 18, 2014, 10:00:24 AM
I opened terminal after installing exiftool and got this-

(https://lh4.googleusercontent.com/-XGqPxuLZRcc/U3hkZq5FxXI/AAAAAAAAARc/XamsdRDrMX8/s618/Screen%2520Shot%25202014-05-18%2520at%252008.38.04.png)

Can someone please tell me what to do now.


I know nothing about coding but if you can tell me what to type in there and where to type to help fix the dng files it would really really make my day
i desperately need to save these footages
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on May 18, 2014, 10:25:58 AM
Did you try following this?

Quote from: Audionut on April 29, 2014, 11:00:27 AM
exiftool -BlackLevel=2048 input.dng
Adjusting the -BlackLevel value.
You can substitute the input name for a wildcard (*), to batch process large amounts of DNG files.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: ultimatemale on May 18, 2014, 11:18:38 AM
Quote from: Audionut on May 18, 2014, 10:25:58 AM
Did you try following this?

I want to follow it but i dont know where specifically to type that in. Where in the screen grab below do i put it?

Really really sorry for sounding so dumb but i have never used exiftool ever and no really little about computers.

(https://lh4.googleusercontent.com/-XGqPxuLZRcc/U3hkZq5FxXI/AAAAAAAAARc/XamsdRDrMX8/s618/Screen%2520Shot%25202014-05-18%2520at%252008.38.04.png)
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: ultimatemale on May 18, 2014, 12:38:28 PM

Sorted
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: ayshih on May 18, 2014, 03:50:25 PM
Never mind, you figured it out.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: gregmaustin on May 19, 2014, 08:11:07 PM
is there something I can change on my camera so that I dont have to do this every time? Where's it at ?
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on May 19, 2014, 08:34:53 PM
You can try toggling the black fix option.

(https://s15.postimg.cc/h79wzcf5n/blacklevel.png)

IIRC, the "Memory hack" and/or "Extra Hacks", can have some effect also.  If you try these and find a problem one, please let me know and I can add relevant information to the OP.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: g3gg0 on May 20, 2014, 01:28:55 AM
fix is already done, we need testers.
--> http://www.magiclantern.fm/forum/index.php?topic=11942.0
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: FBongcam on May 25, 2014, 09:04:09 PM
Fixed my green and pink images, thanks!
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: budafilms on May 26, 2014, 09:05:05 AM
How to reduce noise in dark areas using MLV?
I compare the black levels with h264 and I had less noise in blacks in the compressed format.

Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: tom2 on June 02, 2014, 06:02:36 PM
Hi

I shoot .MLV clips with magiclantern-Nightly.2014May31.5D3113 on my 5D Mark III. I convert them to DNG with MLRAWviewer 1.1.6 on my Macbook Pro, to make color timing in Da Vinci Resolve Lite.
Last week, suddenly some of my clips had randomly the « green cast » issue. But thanks to this forum I could save my clips by using the "mlv_dump --black-fix=2048 »  method. It worked fine!

Unfortunatly since yesterday this method is useless!

Yesterday I've been shooting two types of clip:
- in 1920 25P mode: the mlv clips are fine, no green cast problem
- in 1280 50i mode (to get a slow motion effect) in 1928x606: the .mlv files seem to be ok when I read them in the FILE MANAGER or in MLRAWviewer, but the DNG files have the green cast problem in Resolve (and Resolve starts to bug). Unfortunalty the "mlv_dump --black-fix=2048 » doesn't fix the problem, and neither does the "exiftool -BlackLevel=2048 input.dng » method.

What can I do to save my corrupted clips? I really need to make color timing in Resolve, which is much better that the MLRAWviewer APPLE PRoRes conversion.
How can I avoid this issue in the future?
(I have to specify that in order to avoid this issue, yesterday i switched ON  Memory hack, Extra hacks and Fix black level.)

Maybe it's not a « black level" problem, but another metadata issue specific to the "1280 50i" mode?

thanks for your help!

tom

Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on June 04, 2014, 06:54:08 AM
Upload a DNG.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: tom2 on June 05, 2014, 08:59:37 PM
one .MLV file: http://we.tl/UAb7JQYQDb
one .DNG file: http://we.tl/wkt9Is7dTG

I suspect a bug due to the fact that these clips were shot at 1280 50i...

thanx
tom
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: ultimatemale on June 06, 2014, 01:20:30 AM
This is a video tutorial to show you how i fixed the corrupt ML files that comes out looking black and green
Shot a music video on ML-RAW (not MLV)
Canon 5D3 1.2.3
ML build March 17th
Converted with RAWmagic lite
I use an apple Imac

Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on June 06, 2014, 02:19:12 AM
Quote from: tom2 on June 05, 2014, 08:59:37 PM
one .MLV file: http://we.tl/UAb7JQYQDb
one .DNG file: http://we.tl/wkt9Is7dTG

That's a white balance issue.  The green tint is from the lighting I suspect.  4200K +72 looks about right here.


@ultimatemale, great tutorial thanks.  I'll add it to the OP.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: tom2 on June 06, 2014, 09:47:41 AM
I'm glad to read that for you it seems to be only a color temperature issue with my clip (I was aware of that light shift).
What was your conversion method to go to this conclusion?
Unfortunatly, for me, it's much more than this: the mlv files are ok when read in MLRawviewer, but when I convert them to DNG, they appear to be dramaticaly green in Resolve  (debayer problem) and they make Resolve bug, and each time I'm forced to quit Resolve beacause it doesn't want to run these 50i clips!!!
Usually there is no problem, but with 25P clips.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on June 06, 2014, 09:54:23 AM
Quote from: tom2 on June 06, 2014, 09:47:41 AM
What was your conversion method to go to this conclusion?

I opened your DNG in Lightroom and adjusted WB.  :)
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: tom2 on June 06, 2014, 11:34:21 AM
If you had the time to do the whole process from the mlv file I uploaded, maybe you will meet my bug (and solve it maybe?).
The issue may not be noticeable on one single frame, but on the whole video file.
Maybe there is something wrong in the fps metadata? (As I said, I meet this problem only with 50i videos)
thanks a lot!
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on June 06, 2014, 05:38:16 PM
I don't have time for maybe.  Either upload corrupted images, or accept that your workflow is flawed. 

If there are only some corrupted images in the MLV file, then I expect you to find them and upload them.  :)
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: vagavr on July 07, 2014, 06:53:35 AM
Recently I experienced this wrong -Blacklevel problem with ~400GB of mk3 mixed RAW and MLV clips.
I dont like waste my time to do bot-work, so I write this two very simple windows batches.

First one exports RAW file to dng via raw2dng and correct -Blacklevel with exiftool.
To use you need to drop RAW (dont forget to concatenate RAW+R01+R02 etc.) files onto it.
https://docs.google.com/file/d/0B9mHlWQzMRjRNDd4ZUJ6MFFqOXc/edit

Second one corrects mlv files with mlv_dump. To use you need to drop folders with mlv files onto it.
https://docs.google.com/file/d/0B9mHlWQzMRjROGlTcVVIbHAtVTQ/edit

Do not forget to include path to folders with raw2dng, exiftool and mlv_dump into the Windows path variable, or use the full paths in the script.

This scrips are very stub and adapted to my case, but i hope they will be useful for somebody.

Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Limelighter on July 22, 2014, 05:53:49 AM
I have no idea what I'm doing wrong! I followed the instructions and when I go to add the "*.dng" part it says "0 image files updated
  628 image files unchanged" please help
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: zelionprime on July 22, 2014, 08:31:24 AM
I am getting my butt kicked by this problem! I can't seem to get ride of pink frames either. Here's what i've tried thus far after reading this thread.

I installed the following:
> Exiftool by Phil Harveyhttp://www.sno.phy.queensu.ca/~phil/exiftool/  (http://www.sno.phy.queensu.ca/~phil/exiftool/)
>Raw2DNG

My Set up
> 5D MKII
> Force Black Levels OFF/On (I tried both off and on)
> Raw Recording is being used, I also tried MLV Recording as well

What I tried for my .RAW file
> Created DNGs with Raw2DNG but the DNGs. When I load said DNGs into DaVinci, it's all scrambled with black and pink flashes. Raw2DNG however does create a .MOV file for me that works fine but without sound.
> Created DNGs using RawMagic gave me pink frames. I uploaded 1 frame to my dropbox (https://www.dropbox.com/s/39f3ol60jaqc8l8/M21-2340_C0000_00769.dng)
> For the pink frames, I tried the terminal commands to no avail. Terminal returned a report of 0 Files Updated even when I used 1024 or 2048. Then I sent the .RAW file through Raw2DNG which produced new DNGs for me that were all scrambled. RAW2DNG did create a .mov file that played fine but had no sound.

What am I doing wrong here? I am using RAW2DNG now. On my 5D Mark II, I have shut off Force Black Levels. Any help is greatly appreciated. Soooo frustrated  :(
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Midphase on July 22, 2014, 09:04:31 AM
Quote from: Limelighter on July 22, 2014, 05:53:49 AM
I have no idea what I'm doing wrong! I followed the instructions and when I go to add the "*.dng" part it says "0 image files updated
  628 image files unchanged" please help

I keep getting the same error message and none of my files end up being changed at all. Does this have to do with the fact that I converted using RAWMagic? Unfortunately, I no longer have access to the original .raw file...does that mean I'm screwed?
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on July 22, 2014, 11:11:56 AM
I get the same error from the DNG from zelionprime above.

Running that DNG through adobe DNG convertor, and I no longer get the error.  I would say that whatever program you are using to convert the MLV to DNG is causing the problems.  Suggest to contact the developer of that application.

@zelionprime, FWIW, --BlackLevel=1750 looks about right for that DNG.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: zelionprime on July 22, 2014, 12:38:22 PM
Quote from: Audionut on July 22, 2014, 11:11:56 AM
I get the same error from the DNG from zelionprime above.

Running that DNG through adobe DNG convertor, and I no longer get the error.  I would say that whatever program you are using to convert the MLV to DNG is causing the problems.  Suggest to contact the developer of that application.

@zelionprime, FWIW, --BlackLevel=1750 looks about right for that DNG.

Thanks for responding Audionut. I am using Raw2DNG to convert the .RAW file from my camera. This is the file that Raw2DNG created for me (000000.dng) https://www.dropbox.com/s/02h4i1a6bpsppew/000000.dng. Note that it's not pink. I then ran that file in terminal using the code you recommended that uses exiftool and it produced the 000000.dng_original https://www.dropbox.com/s/mhfh2ygbyg2id0u/000000.dng_original.  There's seems to be something else wrong with it.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on July 22, 2014, 02:59:34 PM
White balance.  Try 2850K with 0 tint.

The command line should be overwriting the original, not producing some other output.  Not sure what you have going on there.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Limelighter on July 22, 2014, 04:40:51 PM
Thank you Audionut!!! It worked to convert the dng's!
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: zelionprime on July 22, 2014, 11:02:36 PM
Quote from: Audionut on July 22, 2014, 02:59:34 PM
White balance.  Try 2850K with 0 tint.

The command line should be overwriting the original, not producing some other output.  Not sure what you have going on there.

Ok well let's take it from the top:

For the Canon 5D Mark II, what settings should I use for video and any other settings?
Which ExifTool do you recommend?
I know I need Raw2DNG but what else do you recommend?
I am on an iMac 27" 2014 model

Is there anything at all I am missing please let me know. I am so dumfounded that others can get their DNGs to work but me. THnaks in advance!
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on July 23, 2014, 03:13:43 AM
The best way to get the problem sorted, is to help the developers (http://www.magiclantern.fm/forum/index.php?topic=11942.0) fix the issue in ML.  This would mean all of this post processing kludge would no longer be needed.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: tayz0n on August 31, 2014, 11:12:22 PM
SOLVED
Hi, i have problem with terminal command with MLV_DUMP

What is "IN" and what is "OUT" .mlv file?
im dumb)

output file - its a new converted file from destenation *.MLV
mlv_dump was great, I have fix all my bug files

thanks for all

my command in terminal (for other noobs like me)

hack:zed hackpro$ /Users/hackpro/Desktop/zed/mlv_dump.osx --black-fix=2048 -o fixed.mlv m30-2010.mlv

MLV Dumper v1.0
-----------------

Mode of operation:
   - Input MLV file: 'm30-2010.mlv'
   - Setting black level to 2048
   - Rewrite MLV
   - Output into 'fixed.mlv'
File m30-2010.mlv opened
File m30-2010.m00 opened
File m30-2010.m01 not existing.
Processing...
Reached end of chunk 1/2 after 1347 blocks
[ERROR] Invalid block size at position 0x00000000
Processed 638 video frames
Done



Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: stagsy on October 29, 2014, 06:35:03 AM
Got the green cast - tried to fix using the exiftool method as in ultimatemale's video and get this....help!

exiftool -BlackLevel=2048 M29-0418_frame_000000t.dng
-bash: exiftool: command not found
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: dmilligan on October 29, 2014, 11:45:43 AM
did you install exiftool?
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: stagsy on October 29, 2014, 12:44:39 PM
Didn't install exiftool specifically as there was no mention of having to in ultimatemale's vid - I guess I thought it was something that just occurred. ::)
How best to install - is there preferred approach e.g. perl(/) or not etc?

Also noticed a difference between mine and ultimatemale's initial "green" issue in that his preview image of the file was ok and it was only in photoshop that it turned green - whereas with mine, there is no preview, just the DNG logo. The green files became apparent when viewing in Bridge.

It would be profoundly useful to be able to preview them as thumbnails - is this an option?
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: stagsy on October 29, 2014, 01:04:37 PM
Ok. Installed Exif Tool and went throughout the whole process. Terminal says the image file was updated but when opening in photoshop, it still green.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: stagsy on October 29, 2014, 01:49:17 PM
Switched on Fix black level, converted to DNG using mlvtodng, still no preview just logo, green cast when opening dng in Photoshop or Bridge.
Used ExifTool to correct and file updated but is still green.

Strange thing is in Camera Raw this green image's Temperature is set at the extreme end of the scale at 50000 and Tint is at the other extreme at -150 It looks ok when these are reined in to more normal levels but not sure this is the way to go as these are major adjustments being made just to get the image in the ball park to start with.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: dmilligan on October 29, 2014, 03:09:53 PM
It sounds like the AsShotNeutral (white balance) in the DNG is wrong, not the black level. What converter are you using? What's the value of AsShotNeutral (use exiftool to find out)? Or just post a sample DNG.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: stagsy on October 29, 2014, 04:06:03 PM
Using MLVtoDNG

https://www.dropbox.com/s/cgeijgif9lvzo61/M29-1224_frame_000015.dng?dl=0
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: dmilligan on October 29, 2014, 10:08:43 PM
Yes, nothing wrong except the white balance metadata, all you need to do is adjust the white balance. Not sure how it got this way. Perhaps you should use mlv_dump or one of the other converters.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: stagsy on October 29, 2014, 10:58:30 PM
Can't be the converter at fault as it's green when viewed in the back of the camera.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: dmilligan on October 30, 2014, 01:07:09 AM
Check your camera's white balance then.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: stagsy on October 30, 2014, 04:57:05 AM
The strange thing now is it alternates between green and normal when viewing on camera.
Initially it was green, then when viewed again, it looked ok - which was good but perplexing.
Then on reboot it went back to green etc.

What's happening?
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: dmilligan on October 30, 2014, 02:44:09 PM
Quote from: dmilligan on October 30, 2014, 01:07:09 AM
Check your camera's white balance
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: stagsy on October 30, 2014, 02:57:55 PM
White balance was and is on Auto
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: dmilligan on October 30, 2014, 09:01:17 PM
There are R,G,B white balance multipliers in the ML white balance menu, please check the value of these. Also, please try a different converter like mlv_dump, mlrawviewer, or mlvfs.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: stagsy on October 30, 2014, 10:15:15 PM
R = 1.314
G = 1.000
B = 2.909
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: myneo on November 16, 2014, 10:29:55 PM
 i have done  the same thing that i switched on the Fix black level by mistake  and my footage is pink.................. plz help me........
5dmark ii and MLV Format
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: dmilligan on November 16, 2014, 10:48:21 PM
So have you followed the instructions in the first post of this thread to fix it?
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: iheartbmx on January 15, 2015, 02:32:46 AM
Hoping someone can help me out as I'm already in a pinch for time! I have figured out every issue over the years but this one is going nowhere fast..

I believe this is a black level issue (vertical banding is present too, I really messed up!)

https://www.dropbox.com/sh/s7kscab0hlpw9hy/AAA69qiRAQiy5ci7ETVbVzWWa?dl=0

No matter what I do Exiftool always states:
0 image files updated
1 image files unchanged

Any help would be great, thankyou kindly!
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on January 15, 2015, 02:52:12 AM
There was/is a problem with some of the convertors.

Run the DNG/s through Adobe DNG Converter and you should be fine with exiftool.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: iheartbmx on January 15, 2015, 03:24:37 AM
Quote from: Audionut on January 15, 2015, 02:52:12 AM
There was/is a problem with some of the convertors.

Run the DNG/s through Adobe DNG Converter and you should be fine with exiftool.

Thanks

I ran some files through exiftool and it changed the black level to 2048, but im still getting identical results.

Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on January 15, 2015, 05:55:36 AM
What exactly is the problem?
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Danne on January 15, 2015, 10:05:43 AM
By looking at the picture you have a very contrasty area with blown highlights. DOn,t think it has anything to do with black level. What did you use to convert? Could you provide an original file?
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: iheartbmx on January 15, 2015, 03:51:06 PM
Quote from: Audionut on January 15, 2015, 05:55:36 AM
What exactly is the problem?

I apologize for total lack of information I gave last night. I will upload more examples tonight. The original .DNG looks fine but once opened in Resolve 11 the issue appears (photoshop as well if highlights are completely brought down to accentuate the effect). The highlights are not rolling off whatsoever and instead an edge is appearing. I encourage someone to try opening this in Resolve to see what I am trying to explain. Thanks again!

magiclantern-Nightly.2014Oct07.5D3113 (black level fix off)
OSX Mavericks
MLVFS (no fixes applied, because I'm an idiot?)

Ran though exiftool to fix black level to 2048 and results are the same.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on January 15, 2015, 11:06:40 PM
That's not an black level issue.  You've overexposed the headlights. 

On the left headlight (as you look at image), it's not so bad because the headlight is well defined.  On the right headlight, the surrounding mist is also overexposed.
My suggestion would be to not try and recover any highlights, because some of the mist can be recovered well, but there is an hard boundary in the mist that is completely overexposed and cannot be recovered.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: DylanWhiteCinema on March 17, 2015, 08:16:53 PM
Ive been looking for a solution for a few days now, but can't seem to find it. I usually find all the answers I need through other peoples issues but this time I finally decided to make an account to ask for some help. I'm not new to magic lantern, but I have been away from using it for about 6 months now, and I,m finally getting around to trying some raw footage.

I believe I have all the settings correct but when I go to convert the mlv to dngs using RAWmagic all of my DNGs look like I was using an ND Filter made of pink cotton candy! haha I've tried shooting with fix black level OFF and ON and
I get the same results. I've also tried all the blck level settings in RAWmagic when I convert too, same thing, same exact outcome. The build I'm using is the magiclantern-Nightly.2015Mar16.

I've noticed there hasn't been a post since January, and theres been several builds since, anyone have update on this issue? Thought I'd post in here instead of making a new thread. This would be greatly appreciated!  :D
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Walter Schulz on March 17, 2015, 08:32:35 PM
RAWmagic is banned here. You may contact RareVision. Or use other converters -> Postprocessing forum
http://www.magiclantern.fm/forum/index.php?topic=13335.0
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: dmilligan on March 17, 2015, 08:40:27 PM
Have you read the first post of this thread and tried following those instructions?

Are you actually viewing the DNGs with a proper program (like Photoshop, Premiere, DaVinci Resolve)? or do they just appear pink the Finder preview (Mac Finder is bad at previewing DNGs and there are known issues)?
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: DylanWhiteCinema on March 18, 2015, 04:04:21 PM
oh wow, I was unaware of that with that application. I originally tried to use Raw2Dng but when I dropped in my MLV files, I kept getting the following error:

usage: dirname path
Error: could not open /Users/dylanwhite/Desktop/raw
ls: *.dng: No such file or directory
Nothing converted

I followed the first post and as this was a way to fix my current footage, I doesn't really help. I'm looking for the way to prevent it from happening in the first place.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: dmilligan on March 18, 2015, 04:50:30 PM
Quote from: DylanWhiteCinema on March 18, 2015, 04:04:21 PM
I'm looking for the way to prevent it from happening in the first place.
Perhaps you should read the first sentence of the first post of this thread again. The only way to prevent it from happening in the first place is to fix the bug in Magic Lantern that is causing the issue. There is a proposed fix to this bug here (https://bitbucket.org/hudson/magic-lantern/pull-request/484/black-level-fix/diff) and forum thread here (http://www.magiclantern.fm/forum/index.php?topic=11942.0). It has not been merged yet due to lack of testing/feedback.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: DylanWhiteCinema on March 18, 2015, 06:48:35 PM
Yeah I was going through those pages, I have no idea how to compile ML at the moment, so I'm not sure I would be benefit to the testing process. I wasn't sure if there has been a better way since the thread opened, because the playback in my camera was fine, it only occurred once converted. I'll have to do more research why raw2dmg isn't accepting my files too. Thanks for quick responses!
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: daw1d on March 29, 2015, 04:49:48 PM
Hello, I have some RAW shots from EOS 5D III (fw 123) with ML Nightly.2014.Aug.07. One shot is long (it is split to RAW and R00 files). I tried to export the RAWs to DNGs using "raw2cdng 1.7.0", "MlRawViewer 1.3.3", "MLVMystic.exe" and "raw2dng.exe" and all four short shots are ok but the long one has black level error or dont even export. I tried to fix it with this procedures but nothing helps:
http://www.magiclantern.fm/forum/index.php?topic=11664.0
https://vimeo.com/97477678

Raw2cdng 1.7.0 and MlRawViewer 1.3.3 gives me black and green screen after export. Raw2dng.exe and MLVMystic.exe cant open the files and crashes. Please can someone help me with this? What can I do to save the footage?

Here is one DNG from MlRawViewer
https://dl.dropboxusercontent.com/u/33503671/M28-1902_000000.dng

Thanks
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: chmee on April 04, 2015, 03:45:54 PM
@daw1d
please download mlvdiag (http://www.phreekz.de/wordpress/2014/04/magiclantern-raw2cdng-1-5-0/) and analyze the structure from the short and the long one - i suspect, some metadata (a datachunk) havent been written.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: arturochu on April 13, 2015, 03:57:34 AM
plz help can't fix it! i've tried the solution in this post and nothing, care to help?

https://www.dropbox.com/s/nhjq9pjk8t0zt9w/M12-164900000.dng?dl=0
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: reddeercity on April 13, 2015, 08:11:14 AM
Ok , not sure what your WB was and lens etc.. so I Guess at most of the information  ::)
With Exiftool I reset the Black Level to "1024" from "2048"  and did the rest in Photoshop with ACR
turn out not bad , but not sure what it's suppose to be like .
I used Windows7 in the command prompt  nav. to the root of the file folder where your files are.
exiftool<-k> -BlackLevel=1024 M12-164900000.dng -o TEST.DNG
Here is the ACR XMP file I created to adjust the image  link--> https://www.dropbox.com/s/jwc3pano8l25aaf/TEST.xmp?dl=0
DNG With the ACR Adjustments Link---------------------------> https://www.dropbox.com/s/7uffa1bwk5mrijf/TEST.DNG?dl=0
Here is the same file but as a .png file-------------------------> https://www.dropbox.com/s/rhtz5wguhg1omkw/TEST.png?dl=0
This is the DNG with 1024 black level I used in Photoshop---> https://www.dropbox.com/s/wjbiyvyou76ib12/TEST_BlackLevel_1024.DNG?dl=0
To check the file info with exiftool  use "exiftool<-k>"
Plus not sure what converter you used ,but you could try some other one's here on the forum and see if it's a convertor problem also.

Hope that helps

Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: dogmydog on May 18, 2015, 02:45:02 PM
Hello Guys!

I'm a big fan of Magic Lantern, been shooting with it on my Canon 50D with no major issues so far.
I'm using Tragic_Lantern_for_50D_Andy600Build.2014Feb01.50D109 (for a bigger resolution on 16:9 1584x896) on LEXAR 64GB, SANDISK 64GB, SANDISK 16GB and TRANSCEND 32GB UDMA 7 cards with VAF Filter.
I'm recording MLV and converting it to DNG using MLV Converter 1.9.1 on Windows 8 - PC
http://www.magiclantern.fm/forum/index.php?topic=10198.0

I got this green cast on my footage:
http://postimg.org/image/4gsr6xyxf

Tried this fix. It created new DNG files, but it didnt work:
http://www.magiclantern.fm/forum/index.php?topic=11664.0

Used: exiftool -BlackLevel=2048 *.dng

Can anyone help me please?
Ty so much!
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on May 19, 2015, 01:09:43 AM
Use a build that isn't in excess of 12 months old.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: reddeercity on May 19, 2015, 08:44:28 AM
@dogmydog Try lowering the blacklevel to "1024" then adjust your ACR setting in A.E. and or try a different extracting software.
I would use "raw2Cdng" as my recommendation on Pc's--> http://www.phreekz.de/wordpress/2014/04/magiclantern-raw2cdng-1-5-0/
I would use 1.65 as the most stable version, or if you only need DNG's then use MLV_Dump on command line
MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win) is also very good to extract DNG's but no Cdng's thou.
Link---> http://www.magiclantern.fm/forum/index.php?topic=9560.msg91165#msg91165

If you post a download link like Dropbox of the DNG or a very small MLV file I'll have a look and see if I can fix it. ;D
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: dogmydog on May 19, 2015, 10:21:42 PM
Quote from: reddeercity on May 19, 2015, 08:44:28 AM
@dogmydog Try lowering the blacklevel to "1024" then adjust your ACR setting in A.E. and or try a different extracting software.
I would use "raw2Cdng" as my recommendation on Pc's--> http://www.phreekz.de/wordpress/2014/04/magiclantern-raw2cdng-1-5-0/
I would use 1.65 as the most stable version, or if you only need DNG's then use MLV_Dump on command line
MlRawViewer 1.3.3 (CDNG/MLV/RAW Viewer & Encoder, Linux/Mac/Win) is also very good to extract DNG's but no Cdng's thou.
Link---> http://www.magiclantern.fm/forum/index.php?topic=9560.msg91165#msg91165

If you post a download link like Dropbox of the DNG or a very small MLV file I'll have a look and see if I can fix it. ;D


@reddeercity Ty SO MUCH! The MlRawViewer 1.3.3 extracted DNG's worked out PERFECTLY!
Don't know what's wrong with my MLV Converter. Not only the green cast is gone, but the image quality is so superior I'm actually thinking about re-extracting all my other MLV files with the Viewer.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Licaon_Kter on May 19, 2015, 11:02:03 PM

Quote from: dogmydog on May 19, 2015, 10:21:42 PM
@reddeercity Ty SO MUCH! The MlRawViewer 1.3.3 extracted DNG's worked out PERFECTLY!
Also do update to 1.4.3: https://bitbucket.org/baldand/mlrawviewer/downloads ;)
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: dogmydog on May 19, 2015, 11:44:18 PM
Quote from: Licaon_Kter on May 19, 2015, 11:02:03 PM
Also do update to 1.4.3: https://bitbucket.org/baldand/mlrawviewer/downloads ;)

Ty too, Licaon! Is there a way of batch extracting DNG's using mlrawviewer?
I have like 30 MLV files to re-extract. Thx!
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: reddeercity on May 20, 2015, 01:33:12 AM
raw2cdng can Batch Convert , give it a try there also a preview in the latest version.
If you edit in Premiere Pro , 16bit Cdng's from raw2cdng are supported .
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: dogmydog on May 21, 2015, 03:21:28 AM
Quote from: reddeercity on May 20, 2015, 01:33:12 AM
raw2cdng can Batch Convert , give it a try there also a preview in the latest version.
If you edit in Premiere Pro , 16bit Cdng's from raw2cdng are supported .

I sure will. I actually ended up queueing files in MLRAWVIEWER selecting one by one and using the E key.
The results are so much better then MLV converter. Thx again!
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: reddeercity on May 21, 2015, 05:09:55 AM
@dogmydog you are welcome, Glad you are getting the result you expected.
There is always new developments in Post workflow of MLV & or Raw
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: AlexCanonD50 on June 04, 2015, 03:07:32 PM
Hello All.
I can't fix this green dark shadow in some footages.
I try Raw2cDNG and MLrawViewer, both last version, but I obtain same wrong dng. Like this:

https://goo.gl/photos/8VKXS5nhFmnBPxTy8

Someone could help me? I shot with 50D eos in 5x crop mode. Lexar 1066x. This problem affect only a few clips, others are perfect, why?
Can I fix or avoid this problem?
Please.
Regards.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Andy600 on June 04, 2015, 03:27:54 PM
@AlexCanonD50 - Can you send me the DNG - I'll take a look at the levels in RawDigger.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: AlexCanonD50 on June 05, 2015, 01:57:49 PM
Hi Andy,
I posted you two dngs exported with MLrawViewer (last version). With RAWtocDNG (16bit) the problem affects they also.
This appears only on a few random shots, where I don't change settings.. :-\
I hope that can be fixed.
Only one thing. I don't have an ND filter and I have used ML iso -1stop (50iso) 1/130s shutter.

http://www.filedropper.com/dngsdarkgreenshadows

Thanx

Regards.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Andy600 on June 05, 2015, 02:35:38 PM
The boat shot is over exposed and you could lower your exposure a touch in general for daylight shots - I'm judging this on 2 shots so forgive me if these are not typical of your shooting practices.

Avoid 50 ISO. The 50D's base ISO is ~200 (100 is the same as 200). Change your shutter speed to 180° of your frame rate i.e. as close to 1/50 for 25p or 1/48 for 24p etc and use your aperture to control the light or you'll get very choppy footage - if you want a shallow DOF you will definitely need an ND in daylight/sunny conditions.

Always use the raw metering when shooting ML Raw! - you can safely shoot ETTR in daylight for most shots but don't be afraid to increase ISO a bit (max I would ever go to on the 50D is 800) if the image is looking very dark. Also, it's generally preferable to clip some spectral highlight info if it means cleaner shadows and mid tones.

Anyway, the green shadows issue....

MLRawViewer puts the 50D Black level at 2286 - this seems a bit much and is what is causing the green tint. Try changing it with Exiftool to something lower.

-BlackLevel 1750
looks better ;)

I would suggest using raw2cdng with '16bit CDNG maximized' selected.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: AlexCanonD50 on June 05, 2015, 03:41:31 PM
Great, Andy.
I know all those errors in shooting, I must buy a good ND filter to obtain good footages in external with sun.
thanks for spend your time in order to give me excellent tips.
I try to change Black level down to 1750 and it works fine! Thanx
Only a doubt. My exiftool says "dng 1.4.0.0 not yet supported". I try to add [-m] option but it doesn't work. I must convert in older dng version and than fix the problem. >:( Can I skip this pass? Do you have a different working version of exiftool? Or, if is possible, can I fix direclty di MLV footage?
Ah.. sorry for my english, I am italian and here it's very hard to learn a foreign language.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Andy600 on June 05, 2015, 04:01:53 PM
Are you using the latest Exiftool? http://owl.phy.queensu.ca/~phil/exiftool/index.html (http://owl.phy.queensu.ca/~phil/exiftool/index.html). It should have write support for 1.4

If that doesn't work you could try changing the dng version exif tag in the DNG to 1.2 or 1.3 - not sure if this would work though and only try it on a copy of the dng.

If you want to fix it in the MLRawViewer you'll need to edit the Python source code and probably use command line (I'm not sure how the GUI fits into things). Also, AFAIK MLRawViewer outputs 'lossy' DNGs. You are better off using raw2cdng. If you want smaller, lossless compressed files get a copy of Slimraw http://www.slimraw.com/ (http://www.slimraw.com/).
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: AlexCanonD50 on June 05, 2015, 05:04:35 PM
OK. I have solved!  8)
with:

mlv_dump --black-fix=1750 -o output.mlv input.mlv

It's very important don't change the original MLV file name.. Otherwise the utilty doesn't work.

Then i have converted in cDNG 16bit (with RAW2cDNG) and that's all!
look:

in ACR with CineLOG V3  ;D

http://goo.gl/photos/SXest3AYSqfN5Ru3A

and a frame with colorspace REDlogFilm-Redcolor3 -> koji 2383 redlog (some basic grading).

https://goo.gl/photos/967n6TgzgVPVrL1m8

THANX FOR ALL, ANDY and congratulation for CinelogC DCP, best buy for me.
Regards
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: hjfilmspeed on December 15, 2015, 04:56:35 PM
How are you using Redlogfilm - redlog3 ? Is that in Resolve or is that a part of Cinelog v3 for ARC?
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on April 14, 2016, 12:59:04 AM
The black level fix has been merged with unified.  If you're still having issues make sure you're using an updated build.
Title: Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
Post by: Audionut on September 18, 2018, 05:59:26 PM
Unsticking this thread.

2+ years since the fix was pushed to nightly.