[MPlayer-users] How to fit video, in mplayer, to full screen keeping aspect ratio and adding the black bars - without stretching

Etienne Buira etienne.buira.lists at free.fr
Wed Feb 2 20:26:53 CET 2011


On Wed, Feb 02, 2011 at 02:15:28PM -0500, film123 at gmail.com wrote:
> Thanks, but I want it to run from a Ubuntu bash script without using a
> keyboard.
> 
> Something like:
> 
> DISPLAY=:0 mplayer -fs -slave -quiet -idle -loop 0 -playlist
> /home/barry/playlist1.txt -shuffle -input file=/home/barry/pipe &
> 
> This works except it stretches the image to fit the screen in both
> directions.
> 
> Thanks, Barry
> 
> 
> 
> On Wed, Feb 2, 2011 at 2:01 PM, Murray Colpman <muzerakascooby at gmail.com>wrote:
> 
> > On 02/02/11 19:04, film123 at gmail.com wrote:
> > > Hello.
> > > Anyone know the command line to play a video in mplayer so that it fits
> > the
> > > full screen (16:9) and automatically adds black bars top and bottom if
> > > required or right and left side if required.
> > > What I do now is add padding to each frame with  ffmpeg.
> > > Thanks, Barry
> > >
> > press "f" - if you're using a decent video output driver (eg xv)

Hi.

Don't know exactly what is your problem (pressing 'f' will do the same
as -fs option).

The first I see is your vo might not be able to scale, try figure out
which one you currently use, and which one you might be able to use. At
least xv is preferable, but if not, you can do software scaling (heavy
on CPU) using -zoom option. (you can find what vo you use reading at
mplayer's output).

Second is if your video carries wrong aspect information, try playing
with -aspect option.

The third is if mplayer does not figure out what your display look like
('regular' screens are 4/3, wide screends are 16/10), in this case, play
with -monitoraspect option.


More information about the MPlayer-users mailing list