[MPlayer-users] seeking explanation of -1 and -2 in -vop scale

SMuelas smuelas at mecanica.upm.es
Wed Sep 18 15:33:01 CEST 2002


The order is:  -vop scale=x:y,crop=x':y':x'':y''

Nevertheless there is a wonderful tool for mencoder that is not so
known. Many people ask about automatic crop-detection, but I prefer to
use the instruction:    -vop rectangle=x:y:x':y'
With that, you play the original before encoding and you see exactly
what will be cropped. So, "rectangle" just draw a rectangle over the
whole picture and lets you see what will be your final crop. Then, once
obtained your ideal format/area, you change "rectangle" by "crop" and
that's all. Your film will be the inner part of the rectangle.
Another point -just referring to your question- is related with the way
the image is cropped. Your instruction: crop=720:436:4:740 is just
impossible, as the two first numbers are the size of the image once
cropped, and the two seconds the point origin where the rectangle just
defined by the two first will place its upper-left corner. The
coordinates begin from the left -for X- and from top -for Y. Your last
"740" is outside any known height of a film.
For the scale, my advice is to forget about this "-1" or "-2" story.
Just write the size that you want for the final screen, but don't forget
that, according to Arpi -as long as I remember- the quality is worst if
you scale inside the encoder process, and will be better if you scale
with "xv" at seeing time.
Regards,
Santiago Muelas

 

On Wed, 2002-09-18 at 14:15, Chris Phillips wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> hi, can someone briefly state precisely what -2 and -1 actually DO mean in 
> the -vop scale filter? i know they preserve aspect ratios (scale=640:-2) 
> but their behaviour seems confusing? what is the difference? how does 
> cropping an image before scaling (scale=640:-2,crop=720:436:4:740) affect 
> this -2 or -1 status? 
> 
> Also is it better to crop then scale or scale then crop? for a perl script 
> i'm writing i really want to scale afterwards, but have found that many 
> times i've tried to scale a cropped image it has been scaled relative to 
> the original dimensions and aspect information, not the new size.
> 
> any information greatly recieved
> 
> thanks
> 
> chris
> xxxx
> 
> _______________________________________________
> RTFM!!!  http://www.MPlayerHQ.hu/DOCS
> Search:  http://www.MPlayerHQ.hu/cgi-bin/htsearch
> http://mplayerhq.hu/mailman/listinfo/mplayer-users
> 
-- 




More information about the MPlayer-users mailing list