Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
2nd April 2020, 14:55 | #1 | Link |
Registered User
Join Date: Jul 2004
Posts: 98
|
Autolevels and full black frames
Hi all,
I'm trying to use autolevels() and I'm running into an issue where it's causing pure black frames that exist in my video to go all funky colored. (see attachment) Is there a parameter I'm missing that can act as a threshold so it's doesn't try to do it's magic on pure black frames? |
2nd April 2020, 17:18 | #3 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
What version AutoLevels ?
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
2nd April 2020, 18:56 | #5 | Link |
Registered User
Join Date: Jul 2004
Posts: 98
|
ahhh, think i figured it out. I needed to have ConvertToRGB24() before autolevels. That seemed to fix the issue.
edit-hmm but then that seems to cause some issues in other places with blacks getting crushed....weird I'm using autolevels(output_low=6, output_high=235) Last edited by frubsen; 2nd April 2020 at 19:03. |
2nd April 2020, 19:18 | #6 | Link |
Registered User
Join Date: Jul 2004
Posts: 98
|
This is my script
Code:
SetMemoryMax(800) LSMASHVideoSource("X:\Reels_10-18.mov") converttoyv12() Crop(146, 2, -146, -2) removedirtmc(50) converttorgb24() autolevels(output_low=6, output_high=235) converttoyv12() ColorYUV(autowhite=true) LanczosResize(662, 480) Sharpen(0.3) |
2nd April 2020, 23:51 | #7 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
Try this one here:- http://www.mediafire.com/file/8k2vub...90711.zip/file Maybe use something like this Code:
AL_IGNORE_LO = 1.0/4096 AL_IGNORE_HI = AL_IGNORE_LO AL_RADIUS = 12 AL_SC2TH = 8 AL_SC2PERC = 100.0/3 AL_MINRNG = 100 SetMemoryMax(800) LSMASHVideoSource("X:\Reels_10-18.mov") converttoyv12() Crop(146, 2, -146, -2) removedirtmc(50) AutoLevels(FilterRadius=AL_RADIUS,ignore_low=AL_IGNORE_LO,ignore_high=AL_IGNORE_HI, \ sc2Th=AL_SC2TH,sc2Perc=AL_SC2PERC,MinRng=AL_MINRNG) ColorYUV(autowhite=true) LanczosResize(662, 480) Sharpen(0.3)
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 2nd April 2020 at 23:56. |
|
3rd April 2020, 16:27 | #8 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Now I've seen your frame (well modified frames)
Maybe start with something like this, but I dont really have any idea what you are expecting to get out of it. Using the previously linked dll Code:
/* Autolevels(clip c, int "filterRadius" = 7, [* Original plugin = 5 *] int "sceneChgThresh" = 20, string "frameOverrides" = "", float "gamma" = 1.0, [* Auto if autogamma *] bool "autogamma" = false, float "midpoint" = 0.5, bool "autolevel" = true, int "input_low" = undefined, [* measured by statistics *] int "input_high" = undefined, [* measured by statistics *] int "output_low" = (c.IsYUV)?16 :0, [* 16 for yuv, 0 for rgb *] int "output_high", = (c.IsYUV)?235:255 [* 235 for yuv, 255 for rgb *] bool "coring" = false, float "ignore" = 1.0/256.0, float "ignore_low" = ignore, float "ignore_high" = ignore, int "border" = 0, int "border_l" = border, int "border_r" = border, int "border_t" = border, int "border_b" = border, bool "debug" = false [* Additional to original args *] int "sc2th" = 12 Float "sc2Perc" = 33.33 [* Where scene change via sceneChgThresh, and % of pixels different by at least sc2th is less than sc2Perc, then Override to NOT scene change *] Float "GamMax" = 1.5 [* Max limit on Gamma correct *] Float "GamMin" = 1.0/GamMax [* Min limit on Gamma correct *] int "minRng" = 100 [* If dynamic range of luma is less than minRng then corrections are reduced *] ) */ LoadPlugin(".\ImageSeq.dll") AUTOGAMMA = True MIDPOINT = 0.45 IGNORE_LO = 1.0/512 IGNORE_HI = IGNORE_LO ### SC2TH = 12 SC2PERC = 100.0/3 GAMMAX = 2.0 # Limit gamma correction GAMMIN = 1.0/GAMMAX # Ditto MINRNG = 110 Imagesource(".\without rgb24.jpg") Crop(0,0,Width/4*4,height/4*4) # Mod 4 converttoyv12() ORG=Last AutoLevels(autogamma=AUTOGAMMA,MidPoint=MIDPOINT,ignore_low=IGNORE_LO,ignore_high=IGNORE_HI, \ sc2Th=SC2TH,sc2Perc=SC2PERC,gammax=GAMMAX,gammin=GAMMIN,MinRng=MINRNG) #ColorYUV(autowhite=true) Stackhorizontal(ORG,Last) It dont look too good (but you got the source frame, I dont, also v0.10 is I think original AutoLevels just recompiled). EDIT: Above using just gamma, plenty of both black and white already in your modded frames. Above image, gamma is almost certainly being limited by GamMax as MidPoint would make way too bright.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 3rd April 2020 at 16:41. |
4th April 2020, 19:42 | #10 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Good.
I'm kinda curious, can you post same frame again, before and after. You can also turn off AUTOGAMMA in 2nd script and also play with other args. Maybe make IGNORE_LO = 1.0/4096 # 1.0/512 EDIT: You can upload images on PostImage.org without an account, and post links here. (Use hotlink for forum, or thumbnail for forum.)
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 4th April 2020 at 19:53. |
5th April 2020, 13:03 | #11 | Link |
brainless
Join Date: Mar 2003
Location: Germany
Posts: 3,653
|
when converting YUV -> RGB -> YUV don't forget to set the correct matrix:
Code:
converttorgb24(matrix="PC.601") Y=0 becomes R=G=B=0 yourfiltershere() converttoyv12(matrix="PC.601") R=G=B=0 becomes Y=0 Code:
converttorgb24(matrix="PC.601") Y=0 becomes R=G=B=0 yourfiltershere() converttoyv12() R=G=B=0 becomes Y=16 Code:
converttorgb24() Y=16 becomes R=G=B=0 (everything below Y=16 and above Y=235 will be clipped!) yourfiltershere() converttoyv12() R=G=B=0 becomes Y=16
__________________
Don't forget the 'c'! Don't PM me for technical support, please. |
5th April 2020, 18:51 | #13 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Thanks very much, I'm quite amazed that it does as well as that.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
5th April 2020, 19:03 | #15 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Did you try AutoGain ?
EDIT: I meant AutoAdjust. AutoAdjust is a bit darker.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 5th April 2020 at 19:12. |
12th April 2020, 19:08 | #17 | Link |
Registered User
Join Date: Jul 2004
Posts: 98
|
So I'm running into another issue with flickering brightness levels using autolevels 0.12.
Here is the script I'm using Code:
AL_IGNORE_LO = 1/4096 AL_IGNORE_HI = AL_IGNORE_LO AL_RADIUS = 12 AL_SC2TH = 4 AL_SC2PERC = 100.0/3 AL_MINRNG = 100 SetMemoryMax(800) ImageSource("Reel_4.720p_%05d.png", start =4,end=3592,fps=18) audiodub(BlankClip(audio_rate=48000, stereo = true, length = 3589, fps=18)) converttoyv12() Crop(140, 4, -140, -4) removedirtmc(40) AutoLevels(FilterRadius=AL_RADIUS,ignore_low=AL_IGNORE_LO,ignore_high=AL_IGNORE_HI, sc2Th=AL_SC2TH,sc2Perc=AL_SC2PERC,MinRng=AL_MINRNG) Tweak(sat=1.1) LanczosResize(676, 480) sharpen(0.2) https://www.mediafire.com/file/weku8...icker.mp4/file edit: looks like it's the AL_IGNORE_HIGH value which is causing the differing levels...now what to set it to... Last edited by frubsen; 12th April 2020 at 19:31. |
12th April 2020, 20:13 | #18 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Ignore by default in original was 1.0/256.0, I changed to 1.0/512.0,
1.0/4096 was intended specific for your dark clip [I did not want it to ignore too much, 0.0 would have been a good choice too maybe]. I want to get back to this plug, wanna add DC detect clip, where can denoise/blur DC, and stats taken from that instead of source. Try above two mentioned Ignore settings, see what happens.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 13th April 2020 at 11:48. |
13th April 2020, 11:36 | #20 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
You could try this (req RT_Stats)
https://forum.doom9.org/showthread.p...61#post1757661 Does a scan of SAMPLES Frames of a clip detecting min and max luma for those samples (default 40 samples), then stretches luma range using Levels() for entire clip. There should be no flickering at all, unless already in source clip.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 13th April 2020 at 11:39. |
Thread Tools | Search this Thread |
Display Modes | |
|
|