VideoHelp Forum




+ Reply to Thread
Results 1 to 20 of 20
  1. Member
    Join Date
    Jul 2003
    Location
    Aussie
    Search Comp PM
    I have some DV footage shot at 4:3 and want to convert it to 16:9 by cropping 60 from the top and bottom and encode in 16:9.

    I can do this in TMPGEnc easily, however I want to use CCE and AviSynth.
    But every time i add the crop commnand I get scambled video.

    Does anyone know the correct AviSynth method to achieve the above.
    I am using AviSynth2.5.

    Thanks
    Quote Quote  
  2. Letterbox(60,60)
    Don't give in to DVD2ONE, that leads to the dark side.
    Quote Quote  
  3. Letterbox() would add the black bars, so it would still be 4:3

    If you want to crop with avisynth, use crop(0,60,last.width,last.height-120)
    Ejoc's CVD Page:
    DVDDecrypter -> DVD2AVI -> Vobsub -> AVISynth -> TMPGEnc -> VCDEasy

    DVD:
    DVDShrink -> RecordNow DX

    Capture:
    VirualDub -> AVISynth -> QuEnc -> ffmpeggui -> TMPGEnc DVD Author
    Quote Quote  
  4. Originally Posted by Ejoc
    Letterbox() would add the black bars, so it would still be 4:3

    If you want to crop with avisynth, use crop(0,60,last.width,last.height-120)

    opps

    He is correct.

    Avisynth page http://www.avisynth.org/
    Don't give in to DVD2ONE, that leads to the dark side.
    Quote Quote  
  5. Member
    Join Date
    May 2001
    Location
    United States
    Search Comp PM
    Okay, then you'll have to add:

    BILINEARRESIZE(720,480)
    ICBM target coordinates:
    26° 14' 10.16"N -- 80° 16' 0.91"W
    Quote Quote  
  6. Member
    Join Date
    Jul 2003
    Location
    Aussie
    Search Comp PM
    Thanks....will give it a go..
    Quote Quote  
  7. Member
    Join Date
    Mar 2003
    Location
    Uranus
    Search Comp PM
    What is "scrambled" ?
    Makes me think of wrong colorspace
    Quote Quote  
  8. Member
    Join Date
    Jul 2003
    Location
    Aussie
    Search Comp PM
    Ejoc and SLK001...You are GENIOUS's, it worked like a charm.

    Thanks..much appreciated.
    Quote Quote  
  9. Member DJRumpy's Avatar
    Join Date
    Sep 2002
    Location
    Dallas, Texas
    Search Comp PM
    avisynth, use crop(0,60,last.width,last.height-120)
    You example would end up cropping 60 from the top, and 120 pixels from the bottom. The correct script would look like this:

    Crop(0,60,0,60)
    LanczosResize(720,480)

    I would use BicubicResize, or LanczosResize for enlarging. BilinearResize will soften your video too much.
    Impossible to see the future is. The Dark Side clouds everything...
    Quote Quote  
  10. Member
    Join Date
    May 2001
    Location
    United States
    Search Comp PM
    Originally Posted by DJRumpy
    avisynth, use crop(0,60,last.width,last.height-120)
    You example would end up cropping 60 from the top, and 120 pixels from the bottom. The correct script would look like this:

    Crop(0,60,0,60)
    LanczosResize(720,480)

    I would use BicubicResize, or LanczosResize for enlarging. BilinearResize will soften your video too much.
    Actually, with AviSynth 2.52, the correct syntax for crop is (UPPER LEFT X, UPPER LEFT Y, DESIRED NEW X WIDTH, DESIRED NEW Y HEIGHT). So, (0,60,last.width,last.height-120) is correct.
    ICBM target coordinates:
    26° 14' 10.16"N -- 80° 16' 0.91"W
    Quote Quote  
  11. Member DJRumpy's Avatar
    Join Date
    Sep 2002
    Location
    Dallas, Texas
    Search Comp PM
    Actually mine has a typo in it too, which is sad, since I use AVISynth as my only tool for editing . That should be -60 for the last parameter, but I still stand by my statement. Per the AVISynth manaul:

    http://www.avisynth.org/index.php?page=Crop

    Crop(clip clip, int left, int top, int -right, int -bottom)
    Again from the manual:
    # Crop 16 pixels all the way around the picture, regardless of image size:
    Crop(16, 16, -16, -16)
    Note that the last value is the same as the others, because it will crop 16 pixels from the bottom. Although you can specify desired width and desired height for the last two parameters, both values are supposed to be a positive integer for that syntax (since you secified a -120, it will crop 120 pixels from the bottom of the video). If you want to use the old crop syntax (which is what your trying to indicate), you would have to know the existing height of your video. Assuming the input was 640x480 pixels high, and you wanted to crop 60 from top and 60 from bottom, you would write your CROP command like so using the old syntax:

    Crop (0,60,640,360)

    If you want to verify, just throw each into a script, drop it on virtualdub, and look at the FILE | PROPERTIES.

    Version()
    BicubicResize(640,480)
    Crop(0,60,640,360)

    and the second example:

    Version()
    BicubicResize(640,480)
    Crop(0,60,0,-60)

    Both of the above scripts will give you a 640x360 output, cropping 60 from the top and 60 from the bottom. If I used the (-120) as you suggested, I would end up with a 300 vertical, which is not what was needed.

    Using the old syntax, you subtract the amount you remove from the 'top', and the amount your discarding from the bottom, leaving only the image are in the middle that you want to retain.

    60 - Letterbox
    360 - Image Area
    60 - Leterbox

    Since your removing 60 from the top, and you don't want the bottom 60 pixels, the value you woudl use would be 360 ( 480 - 60 - 60 = 360 ). The new syntax is much easier to figure. Just speicfy the amount you want to crop in a negative value for the 'bottom' paramter.
    Impossible to see the future is. The Dark Side clouds everything...
    Quote Quote  
  12. Member
    Join Date
    Mar 2003
    Location
    Uranus
    Search Comp PM
    His last argument wasn't -120 , it was (height-120) which would
    be the desired size with 60 cropped from both top and bottom.
    Quote Quote  
  13. Member
    Join Date
    May 2001
    Location
    United States
    Search Comp PM
    It seems like both FOO and DJ are correct (once we got that "-" inserted). The "negative number" syntax works just as well as specifying the resultant width and height (and might even be easier to use - less calculations!).

    But anyway, ghosty6 got his problem solved, so case closed!
    ICBM target coordinates:
    26° 14' 10.16"N -- 80° 16' 0.91"W
    Quote Quote  
  14. Member DJRumpy's Avatar
    Join Date
    Sep 2002
    Location
    Dallas, Texas
    Search Comp PM
    FOO, because he placed a negative value there, it automatically assumes the new syntax, which tells avisynth to crop 120 pixels from the bottom. In order to use the old syntax, the last parameter must be either 0 or a positive value specifying the desired height to return, after subtracting the TOP value.

    I agree, the new syntax is much easier, both to use, and to describe
    Impossible to see the future is. The Dark Side clouds everything...
    Quote Quote  
  15. Member
    Join Date
    May 2001
    Location
    United States
    Search Comp PM
    Well, FOO wasn't describing the actual syntax with the negative number. He was saying that the new height would be "old height minus 120", or crop 60 from the top, then your "old height minus 120" will result in a crop of 60 on the bottom.
    ICBM target coordinates:
    26° 14' 10.16"N -- 80° 16' 0.91"W
    Quote Quote  
  16. Member DJRumpy's Avatar
    Join Date
    Sep 2002
    Location
    Dallas, Texas
    Search Comp PM
    That makes sense. I was wondering where that value was comming from
    Impossible to see the future is. The Dark Side clouds everything...
    Quote Quote  
  17. Member
    Join Date
    Mar 2003
    Location
    Uranus
    Search Comp PM
    (height-120) IS a positive value.


    .....unless the video is a little small

    FOO, because he placed a negative value there
    He didn't
    Quote Quote  
  18. Member DJRumpy's Avatar
    Join Date
    Sep 2002
    Location
    Dallas, Texas
    Search Comp PM
    I see what your doing now . Since you didn't know what the vertical height value was, you implied it in your example. I wasn't paying enough attention. Your script would work once the height was plugged in and the 120 value was subtracted from the total height. It's just a long expression of the old syntax.
    Impossible to see the future is. The Dark Side clouds everything...
    Quote Quote  
  19. Member
    Join Date
    Mar 2003
    Location
    Uranus
    Search Comp PM
    Avisynth knows what last.height is. It doesn't need to be
    pulgged in. Automatically set to input video height.
    Quote Quote  
  20. Member DJRumpy's Avatar
    Join Date
    Sep 2002
    Location
    Dallas, Texas
    Search Comp PM
    True. You can pull the height and width from the clip properties.

    It's still easier just to tell it to crop 60 from the bottom
    Impossible to see the future is. The Dark Side clouds everything...
    Quote Quote  



Similar Threads

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