Linux Video Playback
- 1 Recommended Media Players
- 2 MPlayer
- 3 SMPlayer
- 4 MPlayer2
Recommended Media Players
Perform one of the following commands as root, depending on your distribution. If you do not find information pertaining to the distribution you use, refer to your distributions documentation.
Debian Based Distributions
mplayer is packaged for Debian. As root:
apt-get install mplayer
However, this is often not the newest release (especially if you are running Debian stable) and does not contain support for all codecs. In particular, those older builds may not have 10-bit support. Almost all users will want to install newer packages:
- Visit http://debian-multimedia.org/ and add it as a package repository using the instructions in the red boxes.
- As root,
apt-get update && apt-get install mplayer debian-multimedia-keyring
apt-get will warn you about unsigned packages the first time you run this; allow them. Installing the keyring package will eliminate those warnings for future upgrades.
For RealVideo support, also install the packages w32codecs (32-bit OS) or w64codecs (64-bit OS).
The MPlayer version in the default Ubuntu repositories is usually outdated. The Medibuntu repository has the latest version of MPlayer as well as the extra codecs.
To add the Mediabuntu repository, paste the following into a terminal (from the Mediabuntu wiki)
sudo wget --output-document=/etc/apt/sources.list.d/medibuntu.list http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list && sudo apt-get --quiet update && sudo apt-get --yes --quiet --allow-unauthenticated install medibuntu-keyring && sudo apt-get --quiet update
After that install MPlayer and the codec pack:
sudo apt-get install mplayer w32codecs
sudo apt-get install mplayer w64codecs
Since mplayer is a command-line application, it might be useful to install a GUI front-end like gnome-mplayer like so:
sudo apt-get install gnome-mplayer
zypper in mplayer
Red Hat Based Distributions (Including Fedora)
MPlayer is not in the official Fedora repositories. You will have to add and enable the RPM Fusion third-party repositories before being able to install MPlayer.
yum install mplayer
pacman -S mplayer
emerge -ptva mplayer
Not all distributions include the full set of MPlayer codecs in their repositories, although these are often not needed except for Real or Quicktime videos. To install the full set follow these easy steps.
- Download: http://www4.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2
- Extract with: tar xvf all-20071007.tar.bz2
- Copy the codecs (but not the directory) to the MPlayer codec directory. Default is /usr/lib/win32
If you use an NVIDIA GPU be sure to install their latest binary drivers as they offer a feature that enables offloading video decoding from the CPU to GPU which may provide smoother video playback, especially for h264 encoded videos, while keeping CPU usage at low levels. Check your MPlayer configuration to use both the VDPAU video option (-vc) and video output (-vo). Type "mplayer -vo help" to list available outputs.
- Debian, Ubuntu users: Install the drivers with apt-get install nvidia-glx nvidia-kernel-dkms
The open source video driver provides hardware accelerated video decoding for R600+ based GPUs.
- Debian, Ubuntu users: Install the drivers with apt-get install fglrx-glx fglrx-modules-dkms
This is a sample configuration file tailored for specific preferences. The MPlayer configuration file can be found at: ~/.mplayer/config. All of the options are documented in the manual.
# If no GPU-specific video output driver is available, xv is the best choice, # followed by x11 (which doesn't not do software zooming unless passed "-zoom" or "zoom=1") vo=xv ao=alsa # 4 audio channels for surround sound files channels=4 # Default audio and subtitle tracks. (Not all files use the correct tags, # so sometimes it will be necessary to switch streams manually with '#' and 'j' # or from the command line with "-aid x" and "-sid x") alang=jp,jpn, slang=en,eng, # Find ASS subs and use the fonts provided in the file if possible ass=1 embeddedfonts=1 fontconfig=1 # The highest level of subtitle anti-aliasing spuaa=4 # Less stdout text quiet=1
MPlayer has a large collection of video filters included. You may use them to achieve different results.
- Play interlaced video without combing:
mplayer -vf pullup myvideo.ext
- Increase saturation and contrast:
mplayer -vf eq2=0.8 myvideo.ext
- Remove "mosquito" noise:
mplayer -vf hqdn3d myvideo.ext
- Make crappy video look good:
mplayer -vf pp7 myvideo.ext
mplayer -ass -embeddedfonts -vf pullup,eq2=0.8,unsharp=l3x3:0.2,hqdn3d myvideo.ext
SMPlayer provides a QT based front-end to MPlayer. It contains useful features such as saving the video position allowing you to continue watching the video from that point at a later date.
Debian Based Distributions (Including Ubuntu)
sudo apt-get install smplayer
You can also:
- Download the .deb file from the SMPlayer website or
- Add the SMPlayer repository to your /etc/apt/sources.list.
deb http://ppa.launchpad.net/rvm/ubuntu hardy main
deb http://ppa.launchpad.net/rvm/ubuntu intrepid main
pacman -S smplayer
emerge -ptva smplayer
Red Hat Based Distributions (Including Fedora)
You will need to enable the RPM Fusion third-party repositories to be able to install SMplayer.
yum install smplayer
Building from Source (Compiling)
Grab the tarball from the SMPlayer download page. Decompress it, cd into the directory, and run
./configure make sudo make install
If you don't have sudo installed/configured, then the last step will be instead
su make install
After installation you may want to configure SMPlayer. Start SMPlayer, open the options (Ctrl + P), go to the subtitles section, within the section go to the SSA/ASS library tab and check the check box for using SSA/ASS library.
If you see a black screen at playing, the colors don't seem to be right, or playback is too slow, you may need to change the video rendering mode. To do this go to the Options > general section > general tab > output drivers > Video, and set it to x11 - this will use software rendering. Alternatively you can use xv for XVideo rendering or either gl or gl2 for OpenGL rendering. In general you should try these options in the following order for best quality and performance: xv, gl2, gl and finally x11.
A fork of the original MPlayer project. Although it was the first *nix player to add 10bit support, MPlayer added it later as well; for playback purposes, there is not currently a strong reason to use one over the other besides personal preference.
The following installation works for Debian 6 Squeeze stable. It should work for the other Debian releases. It might work for Ubuntu, but I have not tested this. It will not work for a distribution that does not use DEBs.
Add the following Debian-multimedia repositories to your sources. You can do this in Synaptic or by adding a line to your /etc/apt/sources.list.
deb ftp://ftp.debian-multimedia.org stable main non-free deb ftp://ftp.debian-multimedia.org testing main non-free
sudo apt-get update
sudo apt-get install mplayer2
After the installation you might need to upgrade your system for the updated codecs.