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. |
27th October 2012, 04:42 | #1 | Link |
Registered User
Join Date: Oct 2008
Posts: 16
|
Help me adjust brightness for a dark video source
preferably without screwing up the other colors. i am not sure what type of brightening would work best. i can PM details about what source and other things i notice with it (like default driver brightness makes it appear fine, while washing out colors on EVERYTHING else on my system, YAY).
|
27th October 2012, 12:57 | #2 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
You are not going to get much help without posting a ~30MB sample, use eg DGIndex to cut VOB and up to MediaFire.
__________________
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; 27th October 2012 at 13:24. |
27th October 2012, 13:04 | #4 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
To do an optional Auto Crop with auto levels
Code:
Function RoboLevels(clip c,float "Strength",int "Samples",float "Ignore",Bool "QBC",Float "QBC_Thresh",int "X",int "Y",int "W",int "H", \ int "Matrix",bool "PC",bool "DEBUG") { c Frames=FrameCount Strength=Float(Default(Strength,1.0)) Samples=(!Defined(Samples)) ? 24 : (Samples > Frames) ? Frames : (Samples < 1) ? 1 : Samples Ignore=Float(Default(Ignore,0.2)) QBC=Default(QBC,True) QBC_Thresh=Float(Default(QBC_Thresh,-32.0)) QBCropXP = Default(X,0) QBCropYP = Default(Y,0) QBCropWP = Default(W,0) QBCropHP = Default(H,0) Matrix = Default(Matrix,(width <= 720) ? 2 : 3) PC=Default(PC,False) DEBUG=Default(DEBUG,True) Assert(Strength>0.0 && Strength <=1.0, "RoboLevels: 0.0 < Strength <= 1.0") GScript(""" if(QBC) { QBCS=QueryBorderCrop(samples=Samples,thresh=QBC_Thresh,debug=DEBUG,ignore=Ignore,matrix=Matrix) (DEBUG)? RT_Debug(QBCS): NOP Eval(QBCS) } tclip=c.Crop(QBCropXP,QBCropYP,QBCropWP,QBCropHP) QLMMS=QueryLumaMinMax(tclip,samples=Samples,ignore=Ignore,debug=DEBUG,matrix=Matrix) (DEBUG)?RT_Debug(QLMMS):NOP Eval(QLMMS) if(IsRGB() || PC) { CSMin = 0 CSMax = 255 } else { CSMin = 16 CSMax = 235 } ALMin = Int(CSMin - ((CSMin - QLMMMin) * Strength) + 0.5) # Round Up ALMax = Int(CSMax - ((CSMax - QLMMMax) * Strength)) # Round down (QBC) ? Crop(QBCropXM,QBCropYM,QBCropWM,QBCropHM): NOP Levels(ALMin,1.0,ALMax,CSMin,CSMax,Coring=False) # DO NOT use Coring """) return Last } both the scripts pointed to are contained in RT_Stats zip): http://forum.doom9.org/showthread.ph...57#post1586857 EDIT: Also need GScript. QBC controls optional cropping, others can default. If no borders present then just simple "Robolevels()" will work fine. Above script is work in progess but works fine.
__________________
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; 27th October 2012 at 13:26. |
27th October 2012, 18:42 | #6 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
@travolter,
You could try it with QBC=false to switch off cropping, and/or Debug=true, and see what comes out of DebugView. As far as I'm concerned, if it works ok in AVSP then it should work ok in whatever player you are using. (as far as I know, ffdshow is just a codec) What is the actual player you are using. Perhaps the player is failing because of the long timeout until first frame delivered, then its a player fault. You might reduce timeout by setting samples lower but this may affect how well it auto levels. You could also skip robolevels (just a temp name, a testing script to develop a plugin) and test with QueryBorderCrop() and QueryLumaMinMax() separately just to see what the player dont like. Have you tried with Mplayer or any other player? I (just a few days ago) did 60 test clips which all worked perfectly in GOM, Mplayer HC, and MS MPlayer2 (the old one, dont like new one). If posting further on this, please do it in the RT_Stats thread so as not to clutter this one. Thankyou. EDIT: Make sure you are using latest version of RT_Stats and scripts.
__________________
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; 27th October 2012 at 18:49. |
27th October 2012, 23:45 | #8 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Sorry if I was unclear, those were only d2v files.
Load VOB into DGIndex, move bottom slider to START of area of interest and then press '[' to set start. move slider to END of area of interest and then press ']' to set end. Then on file menu click on "Save Project & Demux Video", it will save with name ending ".demuxed.m2v". Check file size is suitable and then repost.
__________________
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 ??? |
28th October 2012, 03:25 | #9 | Link |
Registered User
Join Date: Oct 2008
Posts: 16
|
http://www.sendspace.com/filegroup/iUGvV1drrxxBJQ26sf1l0HGq9HkKm4Ov
included d2v with the demuxed vid side note: for sure source related. watching others on current settings dont need to change brightness to see dark areas. Last edited by B3-bomber; 28th October 2012 at 03:26. Reason: adding info |
29th October 2012, 00:20 | #10 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Have looked at your source anime, and it looks like it is the intent of the makers that it be that dark
in places, looks like a coal cellar or something. It is I think unlikely that you can do anything other than bring up lighting levels where everything will be almost solid grey rather than black, and expose little detail, only noise. Perhaps look at hdragc as Mournir suggested, any global leveling will fail (as for the supplied Robolevels). Here are stats for your source clips and auto leveled (the crop fails on dark clip as it is nearly all black and so short, ie crops out much of the video). Code:
darkarea.demuxed.d2v AVE_Y=27.58 MIN_Y= 11 MAX_Y=236 LMIN_Y= 15 LMAX_Y=227 AVE_U=128.09 MIN_U=110 MAX_U=152 LMIN_U=120 LMAX_U=145 AVE_V=128.44 MIN_V=117 MAX_V=203 LMIN_V=121 LMAX_V=151 darkarea.demuxed.d2v Auto Leveled AVE_Y=34.29 MIN_Y= 16 MAX_Y=235 LMIN_Y= 16 LMAX_Y=235 AVE_U=128.14 MIN_U=109 MAX_U=150 LMIN_U=119 LMAX_U=145 AVE_V=128.66 MIN_V=116 MAX_V=207 LMIN_V=121 LMAX_V=156 lightarea.demuxed.d2v AVE_Y=66.54 MIN_Y= 13 MAX_Y=237 LMIN_Y= 16 LMAX_Y=234 AVE_U=132.75 MIN_U=112 MAX_U=170 LMIN_U=118 LMAX_U=168 AVE_V=123.93 MIN_V= 91 MAX_V=139 LMIN_V= 99 LMAX_V=136 lightarea.demuxed.d2v Auto Leveled AVE_Y=66.93 MIN_Y= 16 MAX_Y=235 LMIN_Y= 16 LMAX_Y=235 AVE_U=132.75 MIN_U=112 MAX_U=170 LMIN_U=118 LMAX_U=168 AVE_V=123.93 MIN_V= 91 MAX_V=139 LMIN_V= 99 LMAX_V=136 would be be better than only on 10 to 20 seconds of clip). EDIT: Global leveling (eg RoboLevels, on FULL movie) would not do any harm and may help just a little, but nothing spectacular would result in the deliberately dark sections.
__________________
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; 29th October 2012 at 01:13. |
29th October 2012, 03:02 | #11 | Link |
Registered User
Join Date: Oct 2008
Posts: 16
|
i know i wont get it fully lightened without breaking stuff. but the brightness setting that i have on my monitor that shows it as it was aired on TV is much too high for overall viewing. this also doesnt seem to affect the actual other scenes oddly enough (my guess is they just plain did the entire thing a tad too dark). there have been a lot of complaints about the non TV sources for this. so yeah it may be deliberate but there is still some censorship built in and i just want it to play as a mostly normal scene and not a big wall of black (some eps are basically 80% of the super darkened crap because of this).
p.s. why the hell wont quick reply work even when i fully refresh the page? it shows me as logged in still too. unless i go out of the thread and reload it through clicking the thread it blocks me. at least using the post button works. also may i get a little more detailed info on what to do for the robot thing or is there something simpler? i could actually give an idea of the light levels needed to see the show as it was on TV if i had a way to figure out if out driver and monitors did the same level of lighting... Last edited by B3-bomber; 29th October 2012 at 03:06. |
29th October 2012, 04:28 | #12 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
You need RT_Stats and GScript,
RT_Stats: http://forum.doom9.org/showthread.php?t=165479 GScript: http://forum.doom9.org/showthread.ph...hlight=gscript Also MS DebugView: http://technet.microsoft.com/en-us/s.../bb896647.aspx Rough script: Code:
VIDOEOFILE="D:\AVS\AVI\lightarea.demuxed.d2v" MPEG2Source(VIDOEOFILE) # Your source above, # RT_Stats & GScript plugins in avisynth plug dir and import below or put in plugs dir Import ("D:\avs\BANK\QueryBorderCrop.avsi") Import ("D:\avs\BANK\QueryLumaMinMAx.Avsi") Robolevels(QBC=false,samples=24) # higher samples better, especially for your clip I think. Return Last Function RoboLevels(clip c,float "Strength",int "Samples",float "Ignore",Bool "QBC",Float "QBC_Thresh",int "X",int "Y",int "W",int "H", \ int "Matrix",bool "PC",bool "DEBUG") { c Frames=FrameCount Strength=Float(Default(Strength,1.0)) Samples=(!Defined(Samples)) ? 24 : (Samples > Frames) ? Frames : (Samples < 1) ? 1 : Samples Ignore=Float(Default(Ignore,0.2)) QBC=Default(QBC,True) QBC_Thresh=Float(Default(QBC_Thresh,-32.0)) QBCropXP = Default(X,0) QBCropYP = Default(Y,0) QBCropWP = Default(W,0) QBCropHP = Default(H,0) Matrix = Default(Matrix,(width <= 720) ? 2 : 3) PC=Default(PC,False) DEBUG=Default(DEBUG,True) Assert(Strength>0.0 && Strength <=1.0, "RoboLevels: 0.0 < Strength <= 1.0") GScript(""" if(QBC) { QBCS=QueryBorderCrop(samples=Samples,thresh=QBC_Thresh,debug=DEBUG,ignore=Ignore,matrix=Matrix) (DEBUG)? RT_Debug(QBCS): NOP Eval(QBCS) } tclip=c.Crop(QBCropXP,QBCropYP,QBCropWP,QBCropHP) QLMMS=QueryLumaMinMax(tclip,samples=Samples,ignore=Ignore,debug=DEBUG,matrix=Matrix) (DEBUG)?RT_Debug(QLMMS):NOP Eval(QLMMS) if(IsRGB() || PC) { CSMin = 0 CSMax = 255 } else { CSMin = 16 CSMax = 235 } ALMin = Int(CSMin - ((CSMin - QLMMMin) * Strength) + 0.5) # Round Up ALMax = Int(CSMax - ((CSMax - QLMMMax) * Strength)) # Round down (QBC) ? Crop(QBCropXM,QBCropYM,QBCropWM,QBCropHM): NOP (DEBUG)? RT_Debug("Levels("+String(ALMin)+",1.0,"+String(AlMax)+","+String(CSMin)+","+String(CSMax)+",Coring=False)"):NOP Levels(ALMin,1.0,ALMax,CSMin,CSMax,Coring=False) # DO NOT use Coring """) return Last } Code:
Levels(16,1.0,233,16,235,Coring=False) The imported scripts are included in RT_Stats zip. EDIT: The samples=24, line is the default, might want to increase to as big as you can stand, (only samples 24 frames by default, spread evenly throughout clip). EDIT: Also see here: http://forum.doom9.org/showthread.ph...12#post1598112
__________________
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; 29th October 2012 at 05:30. |
29th October 2012, 08:36 | #13 | Link |
Registered User
Join Date: Oct 2008
Posts: 16
|
ok i still need help putting this stuff together. managed to get the 2 .zip, script had an issue at robotlevels line. if there is stuff that is supposed to be in a .avs in the plugins folder i need to know what the names are supposed to be and the contents.
warning: i have problems with complex avs scripts. at one point i tried animeIVTC script. i NEVER got all of that to function even with all the supposed required files. also, what am i supposed to use to run this script? is it supposed to be in a .avs script and if yes what do i use to run it (got the errors in megui trying to preview the vid output) it didnt like this line either: MPEG2Source(VIDOEOFILE) says no function (yay for fresh installed avisynth and no plugins). |
29th October 2012, 10:51 | #14 | Link | ||
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Quote:
Quote:
http://avisynth.org/mediawiki/Ylevels Or HDRAGC, as suggested earlier. |
||
29th October 2012, 15:20 | #15 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
VIDOEOFILE="D:\AVS\AVI\lightarea.demuxed.d2v" where the d2v file is the one output by DGIndex.
RT_Stats, Grunt and GScript dll's need be in plugins dir. Also put the two script from RT_Stats zip either in plugs dir or Import them as in example, obviously edit the directory names. Quote:
EDIT: Or see Manono's suggestions above
__________________
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; 29th October 2012 at 15:25. |
|
29th October 2012, 20:40 | #17 | Link | |
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Quote:
LanczosResize(624,352) ColorYUV(Analyze=True) Limiter(Show="Luma") you get the first picture below left from frame 199. The red dots show values below 16 (and barely below at that). Although it's quite dark, it's not really out of the ordinary for a really dark scene. The second picture below right is with: YLevelsS(0,10.0,255,0,255) Tweak(Bright=-14,Cont=0.93,Coring=False) LanczosResize(624,352) ColorYUV(Analyze=True) Limiter(Show="Luma") In neither of your two samples did I see any blown whites, although maybe they do blow out elsewhere. |
|
30th October 2012, 03:23 | #18 | Link |
Registered User
Join Date: Oct 2008
Posts: 16
|
i watched this on TV using CRT. it wasnt overly dark then. i can watch it that way on this screen but it requires setting brightness to default on drivers (value of 0). doing that washes out EVERYTHING (OS menus, background, any other program used) but the video when it comes to colors.
they did this to the released source as a double censor thing. they already have blurred details on entrails and other body parts. manono that screenshot on 2nd part looks a lot more how it was supposed to be. i dont expect it to ever be perfect but those really dark scenes should at least resemble the "night" scenes in most anime where u can see some stuff, not be pitch freaking black like it essentially is now. i never had any problems with the maximum, just didnt wanna wash out color detail for normal scenes. i'll mess with this a bit later tonight maybe if not tomorrow night. at least having something work properly would be awesome (errors are annoying). side note: i can pm what to search for to prove the complaints about the video being too dark. it isnt just my screen. just ask if u need info. Last edited by B3-bomber; 30th October 2012 at 03:45. Reason: adding info |
30th October 2012, 21:37 | #20 | Link | ||
Moderator
Join Date: Oct 2001
Location: Hawaii
Posts: 7,406
|
Quote:
Quote:
Last edited by manono; 30th October 2012 at 21:43. |
||
|
|