[MPlayer-users] why does scale ignore the command line??

D Richard Felker III dalias at aerifal.cx
Wed Nov 5 02:41:43 CET 2003


On Tue, Nov 04, 2003 at 11:21:48PM +0000, Chris Phillips wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> > > hi,
> > > 
> > > if i do this:
> > > 
> > > mplayer -vf scale=264:227 dvd://1
> > > 
> > > mplayer does this:
> > > 
> > > Opening video filter: [scale w=264 h=227]
> > > 
> > > but then does this:
> > > 
> > > VO: [xv] 264x227 => 403x227 Planar YV12
> > > 
> > > why does mplayer rescale the movie? what erm.. "rite" does it have to do 
> > > this? if i say I want those scale values surely it should enforce that!
> > > 
> > > i've tried also adding -noaspect but that then simply enforces the default 
> > > 720x576 ratio!
> > 
> > The scale filter preserves the aspect because this is normally the
> > correct thing to do. Why are you using the scale filter at all if you
> > have hardware scaling?? Just use -x and -y to set the size you want it
> > to be hardware-scaled to, or use -vf dsize=w:h to control this. Or use
> > -aspect.
> 
> well as i do want to be able to set an automatic scaling if needed, e.g. 
> scale=560:-2. I did used to use -xy 560 in my program but there was a 
> really possibly good reason i changed it to -vf yesterday, although i 
> can't quite remeber all of it.... scale= is just so much easier!

Hm? I'm not talking about the scale=560:-2 thing, but the output
aspect that gets passed on and ultimately used by the overlay scaler.

> > Also keep in mind that odd width or height values are _invalid_ for
> > 4:2:0 video (you will probably see glitched lines at the edges!).
> 
> well everyone get's lazy sometimes....!
>  
> well i can't say i understand the justification for it, but i'll let it 
> slide...

4:2:0 means lines (and columns) come in pairs. One line of chroma
(color) goes with two lines of luma (roughly speaking, brightness).
It's nonsense to cut to odd sizes/offsets because there's no such
thing as half a line.

Rich



More information about the MPlayer-users mailing list