Hi - i've tried for hours to make sense of how this command works, including using megui script creator, but i am just too thick.
All i want to do is get rid of the top and bottom bars in a 16:9 HD recording of a 2.35 AR movie. Put another way, I want to resize 1920 x 1080 to 1280x544 and lose the black bars at the same time. I've managed to work out that the resize instruction (presumably) is LanczosResize(1280,720). But i've tried various crop commands [crop(x, x, x, x)] and none of them seems to work.
I'd settle for just the script, but if anyone can explain the numbers - in words that a mere IQ of 130 (last time i looked) can understand - I'd be most grateful.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 10 of 10
Thread
-
-
1st "to resize 1920 x 1080 to 1280x544 and lose the black bars at the same time."
LanczosResize(1280,720)
crop(0, 88, 1280, 544)
2nd there are multiple ways op use crop: http://avisynth.org/mediawiki/Crop
3rd ' crop(0, 88, 1280, 544)' 0 since you don't want to change the width 88 since you want to change the height by 720-544 = 176 and 176/2 is 88, 1280 since you don't want to change the width, 544 since you want this to be the output height.
4nd alternatively you could use the 'Crop(int left, int top, int -right, int -bottom)' syntax, which would give you
Crop(88, 0, 88, 0)
first number = crop from the left side
second number = crop from top side
third number = crop from right side
forth number = crop from bottom side
Cu Selur -
Thanks Selur. I followed the link, but could not make head or tails of the numbers in the second example, maybe because i didn't understand the Reduceby2 command. Anyway, i digress.
I DO understand your first example and the explanation of the figures you have used although it seems very complicated.
I thought i'd already tried Crop(88, 0, 88, 0) and it didn't work. However, i have been using the crop command before the resize command, and possibly i used Crop(0, 88, 88, 0). It seemed megui script creator preferred this order.
After sheer trial and error, i found that
crop(0, 138, 0, -138)
LanczosResize(1280,544)
seems to work.
Out of interest, is there a best method for this example? -
After sheer trial and error, i found that
crop(0, 138, 0, -138)
LanczosResize(1280,544)
seems to work.
It depends what you want to do first: crop or resize
before I used first resize and than crop since you said you wanted to " resize 1920 x 1080 to 1280x544 and lose the black bars at the same time" and not loose the black bars and than resize to 1280x544.
Personally I would crop first (which ever syntax you prefer) and then resize, but it really should normally not make much of a difference.
(+ I don't like LanczosResize, I prefer GaussResize ) -
Right, i thought perhaps mod 16 factors might affect which method to use. (I have no idea what i mean by that)
Is GaussResize a simple alternative command, i.e. a direct replacement for LanczosResize or does it need other parameters? -
GraussResize has the same syntax as LanczosResize, see: http://avisynth.org/mediawiki/Resize
-
For reasons which you discovered later on, right? The second pair, when resizing that way, has to be negative (except for any zeros). Also, your '88s' in that example refer to the left and right crops, not top and bottom. It should be:
Crop(0,88,0,-88)
crop(0, 138, 0, -138)
LanczosResize(1280,544)
If you'd like a video picture to guide you in doing the cropping and resizing, I open the basic script in Gordian Knot (or a D2V if it's a DVD) and crop and resize in there. It even gives you the script for the crop and resize operation when you're done. It's quite simple actually. Also, you can get the right crop values (but not the resize) in VDub by adding the Null Transform filter, followed by the Crop filter. Again, you'll have the video to guide you as you crop. -
Crop first, then resize. Because a sharpening resize filter like Lanczos will create a row of brighter pixels between the black border and the picture.
Similar Threads
-
to crop, or not to crop, that is the question...
By GrandPixel in forum Blu-ray RippingReplies: 2Last Post: 11th Nov 2010, 15:17 -
Are my audio commands are right?
By php111 in forum AudioReplies: 0Last Post: 13th Mar 2010, 13:11 -
Gordian Knot Avisynth script commands
By Fire Foxer in forum EditingReplies: 6Last Post: 18th Aug 2009, 07:12 -
crop in avisynth causing tearing ?
By davexnet in forum Video ConversionReplies: 13Last Post: 2nd Mar 2009, 16:17 -
DVD VM Commands
By TonitoDJ in forum Authoring (DVD)Replies: 1Last Post: 24th Nov 2008, 10:55