Thanks for the explanations.
Referring to Letterbox(), you wrote that it's not a crop operation, it's a mask... isn't that what I want, to mask the crud at the bottom of the screen?
Back to Crop(), this is what my script looked like:
That came out as 720x472, according to GSpot. I was following your suggestion from post #3, but I modified the Crop() parameters from what you had written, and left the AddBorders() parameters the same as you had suggested. From your explanation it occurs to me that perhaps if the Crop() parameters change, then the AddBorders() parameters need to change as well to obtain (or retain) the standard NTSC resolution of 720x480. Am I understanding this correctly?Code:Crop(0,0,0,-16) AddBorders(0,4,0,4)
+ Reply to Thread
Results 31 to 49 of 49
-
-
-
OK, now I get the connection between Crop() and AddBorders(). Thanks.
I ran this avisynth script and the video came out with nice upper/lower borders, standard 720x480 resolution, and all of the lower edge video crud removed:
Code:AVISource("AuntFlo_04.avi") Trim(0,1683) PixieDust(4) Crop(0,0,0,-16) AddBorders(0,8,0,8) ColorYUV(levels="PC->TV")
I was reading about avisynth noise filters and Dust() seemed like a very popular filter, but I'm wondering if I would have better results with a different filter. Of course, I realize that I will have limited success considering the source video, but I'd be interested in what others feel are good noise filters.
-
Try McTemporalDenoise(). It has several presets as well as many individual parameters you can control. Some words of warning though: it's very slow and hard to get set up the first time.
With VHS you often you want to filter the luma and chroma differently. You can use MergeChroma() to merge chroma from one video with the luma of another (VHS chroma is often much noisier than the luma). For example:
Code:MergeChroma(McTemporalDenoise(settings="low"), McTemporalDenoise(settings="high"))
VHS has very low resolution horizontally leading to colors smearing to the left and right. You can use a filter like aWarpSharp2() to restore some crispness to the chroma without messing up the luma:
Code:MergeChroma(aWarpSharp2(depth=24))
Code:ChromaShift(c=-4) # shift chroma 4 pixels to the left
-
Re: example_a.avi from post #14.
Duplicate frames 165-166, 168-172.
In-camera autogain and autocolor have very nearly ruined this shot. Highlights are blown away. Remedy: turn off everything on amateur cameras that has "auto" in its name.
Last edited by sanlyn; 25th Mar 2014 at 10:15.
-
Something amiss with interlacing in Example_A.avi. Lots of jaggies and combing. Could fix the combing, but smoothing those jaggies destroyed too much of what was left. Fixed the bag frames in the area of frames 165-172. What a hassle. Another hassle: color cast changes and gamma pumping. Cleared most of it, but that kind of trouble is....well, trouble.
-
Yes, I see what you mean by "hard to set up"!
Adding your first code line to my script, VDubMod complains that the video isn't YV12. Do I need to convert with something like ConvertToYV12()?
Trying to add your other code lines causes VDubMod to crash. Is MCTD supported by avisynth 2.5 (the version I'm using)? -
Yes, you'll need to convert to yv12, assuming your video is interlaced: ConvertToYV12(interlaced=true). You'll also need to add the interlaced=true parameter to MCTD.
-
Well the color improvement is obvious. Smoothing out the artifacts does seem to detract a little bit from the sharpness but I don't think it's a bad trade-off considering the results. Very nice, thanks... I'd be interested in knowing your procedure if you're open to sharing.
FYI, this video is one of my personal home videos, unlike the other samples posted. It was shot with a VHS home video camera (Panasonic IIRC) and, yes, probably all of "auto" buttons were engaged. -
-
-
Well that code is cool , and the picture is certainly a bit clearer.
I am going to try the other lines, but I am wondering, since I need to convert to YV12 for the filters, if the destination is an NTSC DVD, do I need to convert back to YUV or YUY, or will it be OK to leave the video YV12? -
I've always capped with huffyuv. If the AVI starts out as YUV, is there somewhere in the process of creating the DVD files where it becomes YV12 (for example, when the mpeg files are created) or does a source YUV create a YUV DVD?
-
??
Doesn't MergeChroma () need a second parameter to "merge" with?
or without MergeChroma:
Code:McTemporalDenoise(settings="low", interlaced=true)
Last edited by TB Player; 16th Jul 2013 at 15:52.
-
If you don't specify a second video the luma from the "last" video is used.
As a general rule in AviSynth, any time you don't specify a named video "last" is used. For example:
Code:AviSource("filename.avi") MergeChroma(McTemporalDenoise(settings="high"))
Code:last = AviSource("filename.avi") last = MergeChroma(last, McTemporalDenoise(last, settings="high")) return(last)
That would apply "low" filter to both the luma and chroma equally. -
Huffyuv is a compressor. YV12, YUY2, RGB, etc., are colorspaces. "YUV" is a wide-ranging term (of which YV12 is only one of many matrices) for data storage stratagems that store luma and chroma separately for each image.
VHS is usually captured to lossless AVI in a YUY2 colorspace because YUY2 more closely resembles the way video data is stored in VHS. There are several compressors that can be used to save AVI file space (huffyuyv, Lagarith, UT, etc.) using several colorspaces, both YUV and RGB.Last edited by sanlyn; 16th Jul 2013 at 19:22.
-
I can't imagine watching a video with so many artifacts from bad interlacing, but the interlace can be kept if desired. Cleaning bad jaggies would soften quite a bit. This is the script I used for Example_A.mkv, with removal of duplicate frames and fix for pumping luma and gamma:
Code:#---Avisynth plugins & scripts: #----QTGMC-3.32.avsi #----AutoLevels.dll #----ReplaceFramesMC2.avs #----LSFmod.avsi #---VirtualDub plugin: VDpath="D:\VirtualDub\plugins\" LoadVirtualDubPlugin(VDpath+"ColorMill.vdf","ColorMill",1) #---- Discard duplicate frames, maintain audio sync ---- #---- (The frames to be discarded are 165,166,168-172) ---- #---- Coded the "long way" but easier to read ---- Xa1=AviSource("path to video\example_a.avi") Xa2=Xa1.Trim(0,164) xa3=Xa1.Trim(167,-1) Xa4=Xa1.Trim(173,0) # ---- Join segments Xa2, Xa3, Xa4 ---- Xa5=Xa2+Xa3+Xa4 Xa5 AutoLevels(filterRadius=30,autogamma=true,midpoint=0.4) # --- correct some mistakes made by AutoLevels ---- ColorYUV(cont_y=-15,off_y=-10,cont_u=-50,gain_u=-20) AssumeTFF().QTGMC(preset="fast") SelectOdd() ReplaceFramesMC2(164,2) ConvertToYV12(interlaced=false) LSFMod(defaults="slow",strength=75) ConvertToRGB32(matrix="rec601",interlaced=false) ColorMill(25190, 25700, 24929, 25701, 25694, 25693, 29041, 27761, 27756, 25700, 24676, 25677, 25700, 1124, 6148) Crop(0,0,0,-10).AddBorders(0,4,0,6) return last #---- Save as Lagarith RGB32 for VDub gradation curve tweaks and encoder ----
Last edited by sanlyn; 17th Jul 2013 at 07:38.
Similar Threads
-
Jerky footage after restoration attempt...
By low-fat-al in forum RestorationReplies: 31Last Post: 25th Apr 2013, 00:27 -
My first attempt to backup a DVD failed...
By Inkognito in forum Newbie / General discussionsReplies: 1Last Post: 8th May 2010, 18:07 -
Cass' Kitchen - an attempt at a new cooking show
By Matt_V in forum EditingReplies: 9Last Post: 25th Nov 2009, 17:08 -
My first attempt at a bluescreen chroma key
By CogoSWSDS in forum EditingReplies: 4Last Post: 16th Apr 2009, 22:11 -
PC shutsdown when I attempt to burn DVD
By steve1040 in forum ComputerReplies: 2Last Post: 21st Oct 2008, 10:10