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. |
|
|
Thread Tools | Search this Thread | Display Modes |
15th August 2013, 18:15 | #21 | Link | |
Registered User
Join Date: Jul 2013
Posts: 7
|
Here's what I think I'm going to end up using unless anyone here can suggest further improvements.
Quote:
I had a go both with undot and deadpixelremove but neither the job. I think the camera has a several dead pixels adjacent to one another or else the h264 is spreading the effect around. I'm got rid of the dead pixels with a virtualdub filter. The delogo filter can be loaded into avisynth like this http://forum.doom9.org/showpost.php?...09&postcount=4 I'm indebted you Johnmeyer for your excellent video tutorial http://www.youtube.com/watch?v=Z12Tu...el_video_title I'm amazed how much better I made bad video look with a bit of work and a lot of help from on here. This was my first thread on doom9 and I'm hugely grateful for the input of all the folks on this site. Code:
LoadPlugin("c:....DGDecode.dll") loadplugin("c:...SmoothAdjust.dll") LoadPlugin("c:...ffms2.dll") Load_Stdcall_plugin("c:...yadif.dll") mpeg2source("f:....d2v") LoadVirtualDubPlugin("C:...delogo.vdf","DeLogo") ConvertToRGB32 delogo(1, "", "", "", "", "C:....bmp", 15, 40, 0, 0) ConvertToYV12() QTGMC( Preset="ultra fast",FPSDivisor=2) orig = last ScriptClip(PointResize(1280,720), """ x = current_frame #time dependant variable av = 0.0000000364 #constants for fixing vertical motion bv = 0.00176 cv = -10.6 dv = 110 #number of pixels to crop off the top of the 1080 frame to reframe shot. ah = 0.00000000952 #constants for fixing horizontal motion bh = 0.000477 ch = -0.3 dh = 320 #number of pixels to crop off the left edge of the 1920 frame to recentre frame pd = av*x*x+bv*x+cv #number of pixels to crop off the top of the 1080 frame to remove accidental tilt (increasing quadratic) pdown = pd + dv #number of pixels to crop off the top of the 1080 frame to remove accidental tilt and reframe.(value = 110 at frame zero then increasing quadratic) pl = ah*x*x+bh*x+ch #number of pixels to ADD to left edge of the 1920 frame to remove accidental pan (increasing quadratic) pleft = dh - pl #number of pixels to SUBTRACT from left edge of the 1920 frame to remove accidental pan and recentre. (value = 320 at frame zero then decreasing) orig.Spline36Resize(1280, 720, pleft, pdown, 1280, 720) """) SmoothLevels(9,1,170,0,255,show=false,Lmode=3).SmoothTweak(0,1,0.9,0,3) vid=last aCam=FFaudiosource("F:....mp3") #audio from camera #aMic=wavsource("F:....wav") #audio from microphone audiodub(vid,aCam).trim(4000,52903).FadeIn(30).FadeOut(90) |
|
15th August 2013, 21:04 | #22 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 11,018
|
Quote:
Code:
SmoothLevels(9,1,170,16,235,show=false,Lmode=3) http://forum.doom9.org/showthread.php?t=154971 Might also like to try Autogain by same author : http://forum.doom9.org/showthread.php?t=167573 Or you might like to try this in future (rather than vdub). {requires recent RT_Stats and GScript}: RoboLevels.avs Code:
Function RoboLevels(clip c,float "Strength",int "Samples",float "Ignore",Bool "ALQBC",Bool "QBC",Float "QBC_Thresh",int "X",int "Y",int "W",int "H", \ int "Matrix",bool "PC",bool "DEBUG",bool "Laced", Int "WMod",Int "HMod",bool "Show") { # Samples a number of frames from source clip and using minimum and maximum luma levels from those samples, auto levels clip. # Default temporarily auto crop borders and samples the area remaining, or if both ALQBC and QBC == false then samples X,Y,W,H coords instead. # Can optionally return border cropped clip when QBC==true. # # Args: # Strength, default 0.95 (0.0 -> 1.0). Auto levelling strength. # Samples, default 32. Number of frames sampled from source clip c. # Ignore, default 0.2 (0.0 -> 100%). Percentage of dark pixels to ignore when ascertaining YPlaneMin, YPlaneMax (noise). # ALQBC, default=true. Use temp auto cropped clip coords for auto levels sampling. # QBC, default false. If true then returns border cropped clip else non cropped. # QBC_Thresh, default -32.0. Threshold used for border detection. See RT_QueryBorderCrop. # NOTE, RT_QueryBorderCrop 'massages' DEFAULT THRESH (exactly -32.0) if low samples count or if short clip. Reason being to avoid # overcropping when insufficient data available for reliable cropping. It is considered better to not crop enough or at all, than # to overcrop. You can override by simply setting an explicit threshold (+ve) of eg 40.0, or setting a NON-DEFAULT auto thresh (-ve) # eg -16.0 or -32.1, where YPlaneMin is established for the sampled frames and then abs(thresh) is added to that value which is # then used as an explicit thresh. # X,Y,W,H. All default 0, ie full frame. Coords for luma sampling, only used if both ALQBC and QBC are both false. # Matrix default= 2(PC601) if clip width<720 else 3(PC709). # Conversion matrix for conversion of RGB to YUV-Y Luma. 0=REC601 : 1=REC709 : 2 = PC601 : 3 = PC709: YUV not used # DO NOT USE Matrix of 0 or 1. # PC default = false. If YUV and PC == true then auto level PC Levels 0->255 instead of TV levels 16->235. RGB always 0->255 # Debug default false. If true then send info the DebugView. # Recommended, DebugView: http://technet.microsoft.com/en-gb/sysinternals/bb545027 # Laced, default = true. Alters Interlaced default for HMod, HMod doubled if true. # WMod, default = the natural cropping WMod for clip c colorspace (eg 2 for YV12 and YUY2, 1 for RGB). # HMod, default = the natural cropping HMod for clip c colorspace (eg 2 for YV12 and 1 for YUY2 and RGB), but doubled if Laced==true. # NOTE, WMod, HMod, If overridden must all be multiples of natural cropping WMod and HMod for clip c colorspace. # NOTE, VirtualDubMod and some players, may not like any colorspace WMOD less than 4 (Vdub latest, OK). # NOTE, If eg VDMod show blank frame, OR eg player halts saying eg "No combination of filters cound be found to render frame" # then set WMod to a multiple of 4. We do not do this by default as Current VDub and some player/encoders may work just fine. # If you dont care about possibility of losing a couple of pixels then always supply WMod=4 to avoid display problems. # Show, default false. If true, shows Levels() used on frame. # myName="RoboLevels: " c Frames=FrameCount Strength=Float(Default(Strength,0.95)) Samples=(!Defined(Samples)) ? 32 : (Samples > Frames) ? Frames : (Samples < 1) ? 1 : Samples Ignore=Float(Default(Ignore,0.2)) ALQBC=Default(ALQBC,True) QBC=Default(QBC,False) QBC_Thresh=Float(Default(QBC_Thresh,-32.0)) Matrix = Default(Matrix,(width <= 720) ? 2 : 3) PC=Default(PC,False) DEBUG=Default(DEBUG,False) SHOW=Default(Show,false) QBCropXP = Default(X,0) QBCropYP = Default(Y,0) QBCropWP = Default(W,0) QBCropHP = Default(H,0) # prep Assert(Strength>0.0 && Strength <=1.0, myName + "0.0 < Strength <= 1.0") GScript(""" if(ALQBC || QBC) { QBCS=RT_QueryBorderCrop(samples=Samples,thresh=QBC_Thresh,debug=DEBUG,ignore=Ignore,matrix=Matrix,laced=laced,wmod=WMod,hmod=HMod) Eval(QBCS) } QLMMS=RT_QueryLumaMinMax(c,samples=Samples,ignore=Ignore,x=QBCropXP,y=QBCropYP,W=QBCropWP,H=QBCropHP,debug=DEBUG,matrix=Matrix) 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 if(QBC) { CropS="Crop("+String(QBCropXM)+","+String(QBCropYM)+","+String(QBCropWM)+","+String(QBCropHM)+")" (DEBUG)?RT_Debug(MyName,CropS,false):NOP Crop(QBCropXM,QBCropYM,QBCropWM,QBCropHM) (SHOW) ?RT_SubTitle(CropS,y=20):NOP # NOTE, After Cropping } LevelsS="Levels("+String(ALMin)+",1.0,"+String(AlMax)+","+String(CSMin)+","+String(CSMax)+",Coring=False)" (DEBUG)? RT_Debug(MyName,LevelsS,false):NOP (SHOW) ? RT_Subtitle(LevelsS,y=0):NOP Levels(ALMin,1.0,ALMax,CSMin,CSMax,Coring=False) # DO NOT use Coring """) return Last } Code:
Import("RoboLevels.avs") VideoFile = "D:\TESTVOBS\PAL_I_Top_169_P-JurassicPark.d2v" Mpeg2Source(VideoFile) ################## WMOD = RT_Undefined() # Use script Default #WMOD = 4 # If player or eg VDubMod gives problem QBC=false # Dont border crop SHOW=True # Show Levels() used on frame RoboLevels(qbc=QBC,WMod=WMOD,show=SHOW)
__________________
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; 15th August 2013 at 21:30. |
|
Tags |
animate, avslib array, canon dng, crop |
Thread Tools | Search this Thread |
Display Modes | |
|
|