How to get Mplayer to work properly

For a long time I considered Mplayer the best movie player, especially on Linux. And for a long time it needed no special configuration to work like a charm – fast movie encoding, no sound problems, subtitles handling.

However on last two of my Linux systems (recent Ubuntu derivatives) it worked really bad with default configuration. Movies were played with jerking what was caused by (as I discovered) a sound driver selected. And of course there were some problems with popular Polish subtitles which often come in CP-1250 encoding. Moreover I was not sure if mplayer is making use of hardware acceleration of my graphic card, what would be nice to get smooth video with post processing. On the other hand I observed some problems with screen updates what suggested auto-selected video driver was not efficient.

After hours of experiments I came to this optimal configuration. Below is text which should be put to a file config in directory .mplayer in your home directory under Linux/Unix system:

vo=gl:yuv=2:rectangle=2
dr=1
double="yes"
ontop="1"
stop-xscreensaver=yes
ao=pulse
pp=2
subcp=windows-1250
subpos=100
subfont-text-scale=2

I will not explain what they all mean. Just to mention – this configuration aims to force direct rendering with OpenGL with double buffering.

One thing to notice: if you have problems with smooth movie playing start trying with different ao values. This option tells mplayer what audio driver (ao = audio output) to use. The command below will tell you what are available options for ao:

mplayer -ao help

Advertisements

About krzysztoftomaszewski

I've got M.Sc. in software engineering. I graduated in 2005 at Institute of Computer Science, Warsaw University of Technology, Faculty of Electronics and Information Technology. I'm working on computer software design and engineering continuously since 2004.
This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s