PART 1 ==================================================== My input is NTSC-RGB video 720x480. Bottom 8 lines is sync junk. Will the following: (a) Snip off the bottom 8 lines, and (b) Resize the Frame back to 720x480 LanczosResize(480, 720, 0, 0, 0, -8) PART 2 ==================================================== I want to add the LancosResize into the following script. Where do I best add the Resize statement? ConvertToYUY2(interlaced=true) SeparateFields() odd=SelectOdd.Convolution3D(1, 16, 32, 16, 24, 2.8, 0) evn=SelectEven.Convolution3D(1, 16, 32, 16, 24, 2.8, 0) Interleave(evn,odd) Weave() DoubleWeave.SelectOdd() ====================================================
--------------------- Bryan K. 1988 ///M3 1997 E36 ///M3 Project Texas A&M Formula SAE
The following seems to work just fine. The only problem I have is that when I create a DVD and play it at 480i there are ripples in some parts of the video. For example, when a person is nodding their head up and down, while moving it to the left or right. I wonder if this is a biproduct of using this resize filter in conjunction with interlaced video. Its never a problem when I play it on my PC monitor. If anyone has a clue why this is happening then I would be extremely grateful!!! AVISYNTH LANCZOS SCRIPT FOR FRAME SERVING CCE: LoadPlugin("H:\STYLE\convolution3d.dll") AviSource("H:\STYLE\STYLE.AVI") ConvertToYUY2(interlaced=true) CropBottom(8).LanczosResize(720, 480) SeparateFields() odd=SelectOdd.Convolution3D(1, 16, 32, 16, 24, 2.8, 0) evn=SelectEven.Convolution3D(1, 16, 32, 16, 24, 2.8, 0) Interleave(evn,odd) Weave() DoubleWeave.SelectOdd() ___________________________________________________________________ I also made up the following script, as a backup in case the resize script and its ripple anomaly is a problem on a wide number of DVD players. I feel that deleting the bottom 8 noisy sync lines and adding 4 black lines to the top and bottom is a good alternative solution. AVISYNTH ADD BORDER SCRIPT FOR FRAME SERVING CCE: LoadPlugin("H:\STYLE\convolution3d.dll") AviSource("H:\STYLE\STYLE.AVI") ConvertToYUY2(interlaced=true) CropBottom(8).AddBorders(0, 4, 0, 4) SeparateFields() odd=SelectOdd.Convolution3D(1, 16, 32, 16, 24, 2.8, 0) evn=SelectEven.Convolution3D(1, 16, 32, 16, 24, 2.8, 0) Interleave(evn,odd) Weave() DoubleWeave.SelectOdd() ___________________________________________________________________
I think you've got there by yourself :) If the source is interlaced and your going to watch it on a normal TV (which is interlaced playback devices) then you always need to make sure that any given line keeps its evenness or oddness. So source line 4 must end up on line2,4,6,8 etc and line 7 must end up on line 1,3,5,7,9 etc. So your crop and addborders works OK because you keep to the above rule. However, the rule is a bit softer than that :) LoadPlugin("H:\STYLE\convolution3d.dll") AviSource("H:\STYLE\STYLE.AVI") ConvertToYUY2(interlaced=true) CropBottom(8) SeparateFields() odd=SelectOdd.Convolution3D(1, 16, 32, 16, 24, 2.8, 0) odd=LancosResize(odd,720,240) evn=SelectEven.Convolution3D(1, 16, 32, 16, 24, 2.8, 0) evn=LancosResize(evn,720,240) Interleave(evn,odd) Weave() DoubleWeave.SelectOdd() will also work because the information in both fields is being kept separate during the resize - the even line info is spread over just the even lines and same for the odd. regards Simon
Excellent and IT WORKS!!!!!!!!!!!!!!!!!!!!!! For the record I somehow backed my way into the same solution. This is the script change I made late last night: LoadPlugin("H:\STYLE\convolution3d.dll") AviSource("H:\STYLE\STYLE.AVI") ConvertToYUY2(interlaced=true) CropBottom(8) SeparateFields() odd=SelectOdd.LanczosResize(720, 240).Convolution3D(1, 16, 32, 16, 24, 2.8, 0) evn=SelectEven.LanczosResize(720, 240).Convolution3D(1, 16, 32, 16, 24, 2.8, 0) Interleave(evn,odd) Weave() DoubleWeave.SelectOdd() _________________________________________________________________ After asking questions on multiple forums, I finally did several Google searches and unearthed this gem. It shows the answer at this web address on Doom9. And even though his example is for a BicubicResize, it applies to the Lanczos filter as well. Actually, I also got a clue when I was testing with VirtualDub and it says that up sizing on Interleaved video is not advised. I think it would be a good thing for a specific guide addressing this issue and various ways to handle it. AviSynth is perfect but perhaps VirtualDub is also capable of chaining filters to accomplish the same end result. Please Go To Paragraph: 4.2.1 PROCESSING INTERLACED VIDEO _________________________________________________________________ The above script that I tried last night is close to your recommendation. Is the one I made up acceptable or should I be doing the resize after the C3D filter? Also, being a little shaky about AVS scripting and syntax, is it ok to DOT separate the filters like I did?
--------------------- Active Autowerke-> AA track pipe
I'd resize after denoising but YMMV. I actually never resize vertically - I just use my BorderControl filter to smear over the VHS headswitching rubbish or just put 16pixel high black borders top and bottom on my SVCD/CVD encodes. Due to the overscan on my TV - I can't even see them.:) I might have a problem in future when I get a 16:9 TV but you can't future proof much in life so I find it best not to bother :) regards Simon