VideoHelp Forum
+ Reply to Thread
Results 1 to 7 of 7
Thread
  1. Hi,

    I am looking to do 2 things.....

    1. Is it possible in avisyth to custom crop a video clip on a frame by frame basis? (in parts of the video the black bars are bigger then in others so a single crop fits all wont do)

    2 I know it is possible in avisyth to grab a frame and turn it on to an image. But is it possible to grab sections of the image (like tiles if you will) and move them around?

    if avisyth is not the thing to use, what can I use?

    thank you for your time.
    Quote Quote  
  2. Originally Posted by ZenMystic View Post
    1. Is it possible in avisyth to custom crop a video clip on a frame by frame basis?
    Yes, as long as they're then resized to all the same resolution.

    2. Yes, but probably not a whole lot of fun to do. You'd crop down to the section you want and then overlay it where you want.
    Quote Quote  
  3. For example:

    Code:
    function circular(clip bg, clip ovr, clip alpha, int ang)
    {
    	x = int(cos(ang*2*3.14159/360.0) * bg.height/2)
    	y = int(sin(ang*2*3.14159/360.0) * bg.height/2)
    
    	ovr = ovr.Rotate(ang)
    	alpha = alpha.Rotate(ang).ColorYUV(cont_y=34)
    
    	Overlay(bg, ovr, bg.width/2-ovr.width/2+x, bg.height/2-ovr.height/2+y, mask=alpha)
    }
    
    
    function linear(clip bg, clip ovr, clip alpha, int xpos, int ypos)
    {
    	xpos = (xpos/2)*2
    	ypos = (ypos/2)*2
    	Overlay(bg, ovr, mask=alpha, x=xpos, y=ypos)
    }
    
    ColorBars(width=1280, height=720).ConvertToYV12().Trim(0,99)
    
    block = Crop(150,450,128,128)
    alpha = Crop(250,560,128,128).AddBorders(16,16,16,16).BilinearResize(16,16).BicubicResize(128,128).ColorYUV(gain_y=150, off_y=-90)
    
    Animate(0,100, "circular",  last,block,alpha,0,  last,block,alpha,360)
    Animate(0,100, "linear",  last,block,alpha,-100,-100,  last,block,alpha,width+100,height+100)
    Image Attached Files
    Quote Quote  
  4. I am wording if anyone can help me... As I have no idea how to clip black bars from a video clip. The bars are of different thinkness... Same frames have more black bar in them than others. In fact some frames have no blacks bars at all.

    How do you get avisyth to crop all the black bars?

    I have tried using the plagins AutoCrop() and RoboCrop() with no luck.

    I'd like to write my own script but no idea how.

    Can anyone help?
    Quote Quote  
  5. You have to break the video into segments, crop them individually, then join the back together. But remember, all parts have to have the same size on output. Say you have a 720x480 frame:

    Code:
    WhateverSource("filename.ext")
    
    part1 = Trim(0, 999).Crop(0, 60, -0, -60) # leaves 720x360
    part2 = Trim(1000, 1999).Crop(0,120,-0,-0) # also leaves 720x360
    part3 = Trim(2000, 0).Crop(8,40,-8,-40).Spline36Resize(part1.width, part1.height) # cropping and resize to match others
    
    part1++part2++part3
    Quote Quote  
  6. Member Cornucopia's Avatar
    Join Date
    Oct 2001
    Location
    Deep in the Heart of Texas
    Search PM
    If they are different thicknesses like you say, doing such as you intend is going to give you a quite disturbingly jumpy picture. May need to keep your changes limited to ~ every 3 seconds minimum.

    Scott
    Quote Quote  



Similar Threads

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