Seems like a cool function that could assist me in this one task. I sometimes get videos that are interlaced and downsized to 480p 432p 384p etc. which screws up the interlacing and makes it hard to properly deinterlace. Usually I resize to a lower vertical resolution like 400 from 480, deinterlace and resize back to 480. Different vertical resolutions change the size of the moire shimmering and a perfect one will stabilize completely.
So anyway, I wanted to use the animate function to resize from 640x2 to 640x480, deinterlace then resize back to original so I can find the sweet spot when I usually do this rather than choosing a rough mod16 approximation.
This is my usual script for this situation:
How would I animate something like this?Code:avisource("C:\video.avi") lanczosresize(640,400) QTGMC(preset="slower") lanczosresize(640,480)
+ Reply to Thread
Results 1 to 8 of 8
-
-
You can only call one function within Animate and you can't change the frame size. But you can call another function that performs multiple functions. Something like this:
Code:Function MyFunction(clip vid, int height) { LanczosResize(vid, vid.width, height) QTGMC() SelectEven() LanczosResize(vid.width, vid.height) Subtitle("Height = " + String(height)) } AviSource("video.avi") ConvertToYV12() Animate(0, 100, "MyFunction", 80, 480)
-
Thanks a lot, that was really useful. This gave me another idea: finding the real resolution of an upscaled video.
Code:Function RealResFinder(clip vid, int width, int height) { LanczosResize(vid, width, height) LanczosResize(vid.width, vid.height) Subtitle("Resolution = " + String(width) + "x" + String(height)) } avisource("C:\video.avi") Animate(0, 632, "RealResFinder", 640,480, 8,8)
-
YV12 must remain at least mod 2. ConvertToRGB() if you want to use mod 1 frame sizes.
-
I know that, I actually used ConverttoYV24 but deleted it when posting the script here because the path to my specific video was several directories.
I guess I don't need Subtract() inside the function when I can use it outside. -
I had no problems with Subtract within the called function:
Code:Function RealResFinder(clip vid, int width, int height) { width = (width / 2) * 2 weight = (height / 2) * 2 LanczosResize(vid, width, height) LanczosResize(vid.width, vid.height) Subtract(vid, last).Levels(112,1,144,0,255) Subtitle("Resolution = " + String(width) + "x" + String(height)) }
-
Oh, I didn't know about "last". What's with the levels()? To amplify the lost details? No need. The first details that appear tend to be aliasing, blocking and other artifacts anyway.
-
Whenever you don't specify a clip name "last" is used as the default. For example:
Code:WhateverSource("filename.ext") Lanczos(320,240)
Code:last = WhateverSource("filename.ext") last = Lanczos(last, 320,240) return(last)
Similar Threads
-
Is there a way to animate without keyframing?
By sdsumike619 in forum Newbie / General discussionsReplies: 21Last Post: 16th Nov 2012, 18:48 -
AviSynth - 'Animate'
By Hungarian in forum EditingReplies: 4Last Post: 6th Aug 2011, 12:04 -
Animate Videos (2D)
By Xaser in forum Newbie / General discussionsReplies: 3Last Post: 12th May 2011, 08:22 -
Animate and Subtitle Script
By sambat in forum Video ConversionReplies: 4Last Post: 18th Jun 2010, 12:17 -
Age old question of VHS to DVD question...I still don't get it.
By saywhat? in forum Newbie / General discussionsReplies: 4Last Post: 10th Oct 2008, 22:43