VideoHelp Forum
+ Reply to Thread
Results 1 to 10 of 10
Thread
  1. I have some 720x480 (4:3) captured video that I want to remove 2 pixels off of the left and 20 off of the right then add black borders to compensate. I used to know how to do this with Avisynth, but haven't played with this stuff in years and can't remember how to do it right. I did some searches and tried some of the suggestions in various archived posts but haven't had any success. If anyone can help I would appriciate it. Thanks.
    Quote Quote  
  2. Member
    Join Date
    Feb 2004
    Location
    Pleasant Hill, CA
    Search Comp PM
    Crop and AddBorders are probably the filters you are looking for (names are clickable links to the AviSynth Wiki pages).

    Hopefully that'll jog your memory.
    Quote Quote  
  3. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Crop(2,20,0,0) - crop wiki page
    AddBorders(2,20,0,0) - Addborders wiki page

    avisynth script could look something like:
    Code:
    mpeg2source("video.d2v") # - need to index file with DGindex
    crop(2,20,0,0)
    addborders(2,20,0,0)
    Quote Quote  
  4. What format did you capture in?

    Be careful, if it's interlaced YV12, crop needs to be multiple of 4. If it's interlaced YUY2, then crop multiple of 2 is ok
    Quote Quote  
  5. He said 2 from the left and 20 from the right, so even if interlaced YV12, Mod 2 should be OK, shouldn't it? So:

    Crop(2,0,-20,0)
    AddBorders(10,0,12,0)#to distribute the black more evenly.
    Quote Quote  
  6. ^ yes you are correct manono . According to that wiki , cropping width by 2 is ok for interlaced yv12, and only height has the mod4 restriction . My bad.
    Quote Quote  
  7. Problem solved.

    This worked out really well.
    Originally Posted by manono View Post
    Crop(2,0,-20,0)
    AddBorders(10,0,12,0)#to distribute the black more evenly.

    Thanks everyone for the help.
    Quote Quote  
  8. I would add keep the left border mod 8 in size for better compression and less artifacts.

    Crop(2,0,-20,0)
    AddBorders(8,0,14,0)#to distribute the black more evenly

    At least one edge falls on a mod 8 boundary this way.
    Quote Quote  
  9. Member
    Join Date
    Jan 2009
    Location
    United States
    Search Comp PM
    Originally Posted by manono View Post
    He said 2 from the left and 20 from the right, so even if interlaced YV12, Mod 2 should be OK, shouldn't it? So:

    Crop(2,0,-20,0)
    AddBorders(10,0,12,0)#to distribute the black more evenly.
    Oops. Guess I should have read the page better myself.
    Quote Quote  
  10. Member 2Bdecided's Avatar
    Join Date
    Nov 2007
    Location
    United Kingdom
    Search Comp PM
    Seems a waste of time padding it to 720 - just encode 704x480 e.g.

    Crop(2,0,-20,0)
    addborders(2,0,4,0)

    or even just
    crop(0,0,-16,0)

    (same result, just keeps the original black and probably original soft edges which will encode slightly more easily without ringing artefacts)

    Cheers,
    David.
    Quote Quote  



Similar Threads

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