Author Topic: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos  (Read 98608 times)

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3471
  • Blunt and to the point
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 Post
Since this is a kludge fix that requires extra post processing for all recorded video, you may want to help the developers fix it properly.




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, you would use the --black-fix command option.

Code: [Select]
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 to fix the issue.

Code: [Select]
exiftool -BlackLevel=2048 input.dngAdjusting 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.

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


Jared

  • New to the forum
  • *
  • Posts: 46
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #1 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:
Photographer, Videographer, RawVideo Lover.
Canon 7D / Canon 5DMKIII

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3471
  • Blunt and to the point
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #2 on: April 30, 2014, 12:08:19 PM »
Did you bother to read my post at all?

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3108
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #3 on: April 30, 2014, 02:50:46 PM »
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.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

Jared

  • New to the forum
  • *
  • Posts: 46
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #4 on: April 30, 2014, 03:01:22 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

Photographer, Videographer, RawVideo Lover.
Canon 7D / Canon 5DMKIII

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3108
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #5 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
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

Jared

  • New to the forum
  • *
  • Posts: 46
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #6 on: April 30, 2014, 03:54:54 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.  Audionut.
Photographer, Videographer, RawVideo Lover.
Canon 7D / Canon 5DMKIII

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3108
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #7 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
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

Jared

  • New to the forum
  • *
  • Posts: 46
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #8 on: April 30, 2014, 05:38:52 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
Photographer, Videographer, RawVideo Lover.
Canon 7D / Canon 5DMKIII

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3108
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #9 on: April 30, 2014, 08:31:23 PM »
well...


Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

Jared

  • New to the forum
  • *
  • Posts: 46
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #10 on: April 30, 2014, 08:52:50 PM »
well...   

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

can be repaired using the exiftool that comes with the installation of RawDigger
Photographer, Videographer, RawVideo Lover.
Canon 7D / Canon 5DMKIII

jippalippa

  • New to the forum
  • *
  • Posts: 8
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #11 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

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3471
  • Blunt and to the point
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #12 on: May 02, 2014, 05:04:16 AM »
On 5D2, the black level may be 1024, or around 1750.



Code: [Select]
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.



Code: [Select]
exiftool -BlackLevel=2048 input.dngAdjusting the -BlackLevel value.

ultimatemale

  • Freshman
  • **
  • Posts: 53
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #13 on: May 18, 2014, 10:00:24 AM »
I opened terminal after installing exiftool and got this-



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

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3471
  • Blunt and to the point
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #14 on: May 18, 2014, 10:25:58 AM »
Did you try following this?

Code: [Select]
exiftool -BlackLevel=2048 input.dngAdjusting the -BlackLevel value.
You can substitute the input name for a wildcard (*), to batch process large amounts of DNG files.

ultimatemale

  • Freshman
  • **
  • Posts: 53
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #15 on: May 18, 2014, 11:18:38 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.


ultimatemale

  • Freshman
  • **
  • Posts: 53
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #16 on: May 18, 2014, 12:38:28 PM »

Sorted

ayshih

  • Senior
  • ****
  • Posts: 266
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #17 on: May 18, 2014, 03:50:25 PM »
Never mind, you figured it out.
Canon EOS 50D | 17–40mm f/4L & 70–300mm f/4.5–5.6 DO IS | Lexar 1066x

gregmaustin

  • New to the forum
  • *
  • Posts: 3
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #18 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 ?

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3471
  • Blunt and to the point
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #19 on: May 19, 2014, 08:34:53 PM »
You can try toggling the black fix option.



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.

g3gg0

  • Developer
  • Hero Member
  • *****
  • Posts: 3108
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #20 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
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

FBongcam

  • New to the forum
  • *
  • Posts: 24
  • 5D Mark III, 550D
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #21 on: May 25, 2014, 09:04:09 PM »
Fixed my green and pink images, thanks!

budafilms

  • Hero Member
  • *****
  • Posts: 711
  • 5D Mark a1ex
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #22 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.


tom2

  • New to the forum
  • *
  • Posts: 10
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #23 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


Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3471
  • Blunt and to the point
Re: MLV - Wrong black level - Pink/Magenta/Green casts in raw videos
« Reply #24 on: June 04, 2014, 06:54:08 AM »
Upload a DNG.