VideoHelp Forum




+ Reply to Thread
Results 1 to 8 of 8
  1. 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:
    Code:
    avisource("C:\video.avi")
    lanczosresize(640,400)
    QTGMC(preset="slower")
    lanczosresize(640,480)
    How would I animate something like this?
    Quote Quote  
  2. 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)
    Quote Quote  
  3. 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)
    I wanna subtract the resized frame from the source frame but it's not letting me do the usual a=source b=source(resize) routine.
    Quote Quote  
  4. YV12 must remain at least mod 2. ConvertToRGB() if you want to use mod 1 frame sizes.
    Quote Quote  
  5. 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.
    Quote Quote  
  6. 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))
    }
    That should work with RGB, YV12, YV24, etc.
    Quote Quote  
  7. 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.
    Quote Quote  
  8. Originally Posted by Mephesto View Post
    Oh, I didn't know about "last".
    Whenever you don't specify a clip name "last" is used as the default. For example:

    Code:
    WhateverSource("filename.ext")
    Lanczos(320,240)
    is the same as:

    Code:
    last = WhateverSource("filename.ext")
    last = Lanczos(last, 320,240)
    return(last)
    Originally Posted by Mephesto View Post
    What's with the levels()? To amplify the lost details?
    Yes.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!