Subscribe to the RSS Feed

 

Onedot.nl Services

Now including a free temporary website!

Mplayer Enhancements

Mplayer simply works. Nevertheless, there’s quite something to improve. Not only its performance or quality, but a few nifty things can make it work even more like you want it.

I’m definitely not the only one who has been stuffing the config file with completely random options, and there’s barely any self-explaining config on the web. Therefore, a description of my .mplayer/config.

After the stuffing of my .mplayer/config with some randomly selected, i decided to walk through the mplayer manpage, and put the options categorized in the config the same way the manpage lists them.

# general options. I don’t need to know all mplayer shows me, opening a media file from the command line. Verbosity seems to show more interesting stuff though, so why not combine?

really-quiet=yes
v=yes

# mplayer options. Some general enhancements. Found out about the rtc and autosync on the Freshmeat tutorial Fine-tuning MPlayer. identify gives us more usefull information when playing DVD’s, and framedrop, well, why not.

autosync=30
framedrop=yes
identify=yes
rtc=yes

# demuxer/stream options. My notebook only has stereo sound, and i prefer the English language if its on a DVD.

alang=en
channels=2

# osd/subtitle options. I’m dutch, so i prefer Dutch subtitles, or English if Dutch is not available. My system is setup with a unicode/utf8 locale, and so do i want mplayer.

slang=nl,en
unicode=yes
utf8=yes

# audio output options. My crappy sound card support, ‘tis too new. I want everything to use the Master level mixer.

mixer-channel=Master

# audio output drivers. No comments needed.

ao=alsa

# video output options. This is interesting. If you’re having trouble getting full screen video completely on top, play with the fstype. I have a 1680×1050 resolution, which boils down to a monitoraspect of 1.6. The video should be on top and nothing (like a message from your IM client, yawn!) should pop-up. And stop the screensaver, so you don’t get a black screen ever X minutes. I left rootwin commented, cause thats mainly fun using -rootwin -fs on the commandline, try it out ;)

fstype=netwm,fullscreen,above,stay_on_top
monitoraspect=1.6
ontop=yes
#rootwin=yes
stop-xscreensaver=yes

# video output drivers. No comments needed.

vo=xv

# video filters. Even more interesting! Remember the monitoraspect we set above? I wanted subtitles displayed in the black bars below, instead having them on top of the video itself: expand=::::0:1.6. And since my cpu was still bored, post processing: ac which is a high quality pp filter combination, fd deinterlacing (no idea which one would be the best), and no -al autolevels, cause i want my movie’s colors exactly the way they are.

vf=expand=::::0:1.6,pp=ac/fd/-al

# -profile xvmc. I don’t have XvMC working yet, even though i own an Nvidia card, didn’t do much research on it yet. But i turned it into a profile, which can be used with mplayer -profile xvmc <video>.

[xvmc]
profile-desc="Nvidia XvMC output."
vo=xvmc
vc=ffmpeg12mc

Putting these settings in the same config file and default profile, may result in mplayerplug-in problems for example. The creation of profiles is gonna save you loads of time, and by doing so, why not put them in separate files?

.mplayer/config will hold your general configuration. The settings every video gets no matter which profile you’re using.

.mplayer/profile-shared could hold profiles which are collections of settings, which in turn can be used in specific profiles. This way there’s no need to specify things more then once in the collection of config files, and they all get linked. Put the following in your .mplayer/config.

include=.mplayer/profile-shared

.mplayer/profile-dvdv for DVD Video, could result in the following.

# -profile dvdv
[dvdv]
profile-desc="Digital Versatile Disc Video."
dvd-device=/dev/sr0
profile=shared-movie

And again, we include this one, after the shared profile, into the .mplayer/config.

include=.mplayer/profile-dvdv

Whenever we wish to view a DVD movie, it’s simply mplayer -profile dvdv .. :)


Comments

Leave a Comment

Add your comment. Preview then Submit.


Hidden


Textile Help