Mplayer Configuration in Debian

What is Mplayer?

MPlayer is a movie and animation player that supports a wide range of codecs and file formats, including MPEG 1/2/4, DivX 3/4/5, Windows Media 7/8/9, RealAudio/Video up to 9, Quicktime 5/6, and Vivo 1/2. It has many MMX/SSE(2)/3Dnow(Ex) optimized native audio and video codecs, but allows using XAnim's and RealPlayer's binary codec plugins, and Win32 codec DLLs. It has basic VCD/DVD playback functionality, including DVD subtitles, but supports many text-based subtitle formats too. For video output, nearly every existing interface is supported. It's also able to convert any supported files to raw/divx/mpeg4 AVI (pcm/mp3 audio), and even video grabbing from V4L devices.

Requirements and Features

If you want know the requirements and Features check here

Download Mplayer

If you want to download Mplayer

Direct from Mplayer download site

Mplayer unofficial packages for Debian

Mplayer installation Debian or Debian Sarge

Before installing Mplayer you need to install these packages

#apt-get install ffmpeg xlibs-dev libpng-dev libjpeg-dev libavifile-0.7-dev libavifile-0.7c102

Now Download Mplayer source latest version from the above Mplayer download site and required codec also

You can download your source code in to /usr/local/src and codecs in same location

Compile and install mplayer in Debian

#./configure --prefix=/usr/local/src/mplayer/mplayer-1.0pre7 \
--with-win32libdir=/usr/local/src/mplayer/codecs \


#make install

Set up mplayer so it's in your $PATH

#cd /usr/local/src/mplayer && ln -s mplayer-1.0pre7 current

#cd /usr/local/bin && ln -s /usr/local/src/mplayer/current/bin/mplayer

Testing your Mplayer

#mplayer test.avi

Using Mplayer

# mplayer mms:// \
-nocache -ao pcm:file=xstream.wav -vo null -vc dummy

# sox xstream.wav xstream.ogg

If you want to know more about maplyer how to use and more options check mplayer man page

If you want Mplayer documentation click here

If you want Mplayer Fonts click here

If you want Mplayer Skins click here

Fine Tuning  Mplayer

Smooth playback

The defaults of MPlayer's A-V sync parameters aren't fine-tuned for perfect files. They are set to match most (average) files. If you have high-quality videos, you may want to limit A-V sync correction in order to get smoother playback. The most important A-V sync parameter is "-mc". It means "max A-V time correction per frame", and defaults to 0.01. For good input, you can go down even to 0.0001, but 0.001 is enough for most cases. Note that smaller values make playback smoother but slow reaction time to fix A-V desynchronization (broken/skipped frames, etc.).

When looking at timing in such detail, you should take care of video timers, too. Be sure that the hardware RTC timer is used (check MPlayer's output). Note that it requires "root" access with older kernels. With 2.4.19pre8 and above, you can enable it for normal users as well:

#echo 1024 > /proc/sys/dev/rtc/max-user-freq (Also note that it has to be enabled in your kernel configuration.)

If your sound card/driver is not perfect (I haven't seen a perfect one yet...), you should also smooth its timer a bit; try -autosync 30 for a start. Higher values mean more smoothing, but avoid using numbers too high, as they will cause independent timing from the sound card and may result in an A-V desync.

Video quality/Filtering

If your video source is imperfect (noisy, interlaced, blocky artifacts...) and you have a few percentages of idle CPU, try some of MPlayer's filters.

For interlaced video (when there are fast movements, you can see every second line of the image displaced, creating a comb effect), you should try -vop pp=0x20000. If that's not satisfactory, try 0x10000, 0x40000, and 0x80000. For badly-converted NTSC movies, try -vop dint or FFmpeg's adaptive filter, -vop pp=fd:c or -vop lavcdeint. If you're lacking CPU time (deinterlacing is a CPU-consuming process), try one of the "cheap" deinterlacers, -vop halfpack or -vop field.

For blocky video (most common with low-bitrate DivX/WMV or poor-quality (S)VCD), enable the deblocking and (optionally) deringing postprocess filters. For deblocking only, use -vop pp=0x33; for deblock+dering, try -vop pp=0x77. Note that you can combine flags for deblocking and deinterlacing (-vop pp=0x20077, useful for some SVCDs) and get both filters at the same time. If you don't like binary arithmetic, you can use more human-readable flags for -vop pp; see "mplayer -pphelp" for details.

For noisy video (even some older DVD releases are very noisy), try -vop denoise3d. The defaults (4:3:6) aren't the best for every kind of video; you'll probably want to increase/decrease the spatial and temporal amounts, depending on the noise level. The first parameter is the luma spatial coefficient (higher means a smoother but blurry image; it's comparable to the smartblur filter); the second is the same for chroma. I recommend using half of luma for the chroma for MPEG video. The last number is the temporal filtering. It's more efficient on noisy video without blurring/smoothing the image, but values too high (>15) make fast movements jerky and sometimes cause a motion blur effect. If you still have idle CPU time, try -vop hqdn3d, the high-precision version of this filter