VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    can someone please create a crop() function in avisynth ?

    i'm pulling my hair out. now matter how many times i have to crop something through avisynth (rare occasions) i can't remember how to set up, calculate, add, subtract, or what the f..k, and its driving me crazy. anyway. i am looking for a crop that works exactly the way virtualdub does it. that is the way i remember always.

    you can explain it all you want to me till the cows come home. i don't use it all the time in avisynth. its rare. i forget, and the logic (someone once told it that is the proper way to crop) i don't care about logic. i only care about how i do it in the way i easily recall..the virtualdub way.

    thank you.
    Quote Quote  
  2. It is the same as VirtualDub except you have to use negative values for the right and bottom. What's so hard about that?

    Click image for larger version

Name:	crop.png
Views:	346
Size:	594.8 KB
ID:	20539
    Code:
    Crop(4,2,-6,-8)
    Last edited by jagabo; 14th Oct 2013 at 22:15.
    Quote Quote  
  3. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    it is too frustrating to get the numbers correct. whenever i have to do it, it is not the same, even or odd number, 2/4/8 bouderies, and so on. from my experience, it takes too many tries to figure it out, by then i just give up and dump the file in virtualdub, crop it in an instant and then frameserve it into avisynth and encode it. it does not have to be perfect. i'm not picky like i used to be. but, nevermind. i gave up again and dump it into virtualdub and took care of it. i can't be bother, yet again. i was trying to do something real quick and i lost my mind, got mad, and...anyway, forget about it, nobody's gonna do it anyway. thanks.
    Quote Quote  
  4. If you want to use odd numbers convert to RGB. That's how VirtualDub does it. What a whiner!
    Quote Quote  
  5. Member vhelp's Avatar
    Join Date
    Mar 2001
    Location
    New York
    Search Comp PM
    whenver i have trouble, i will point to your # 2 post thank you.
    Quote Quote  
  6. The rules are simple to remember:

    YUV 4:2:2 (eg YUY2) requires even values along the width because the chroma planes are half the width of the luma plane -- ie, you can't have half a pixel in the chroma planes.

    YUV 4:2:0 (eg YV12) requires even values along both the width and height because the chroma planes are half the width and height of the luma plane. Again, you can't have half pixels in the chroma planes. In addition, interlaced YUV 4:2:0 requires mod 4 for the height because the chroma planes are 1/4 the height of the luma plane.
    Quote Quote  



Similar Threads