Difference between revisions of "Linux Video Playback"
(You and your spelling mistakes. =P)
|Line 51:||Line 51:|
Revision as of 00:19, 19 June 2009
This article explains the best video playback options for Linux and provides installation instructions.
- 1 List of recommended players
- 2 MPlayer
- 3 SMPlayer
List of recommended players
Perform the one of the following commands as root, depending on your distribution.
Debian based distributions (Includes Ubuntu)
aptitude install mplayer
zypper in mplayer
Fedora/Red Hat based distributions
yum install mplayer
pacman -S mplayer
emerge -ptva mplayer
Not all distributions include the full set of mplayer codecs in their repositories. To install the full set follow these easy steps.
1. Download: http://www4.mplayerhq.hu/MPlayer/releases/codecs/all-20071007.tar.bz2
2. Extract with: tar xvf all-20071007.tar.bz2
3. Copy the codecs (but not the directory) to the MPlayer codec directory. Default is /usr/lib/win32
1. Visit http://debian-multimedia.org/ and add it as a package repository using the instructions in the red boxes.
2. sudo aptitude update && sudo aptitude install mplayer w32codecs
These are some sample configuration files tailored for specific preferences. The MPlayer configuration file can be found at: (~/.mplayer/config)
For English audio preference, then Spanish, with 4 audio channels for surround sound files.
vo=xv ao=alsa channels=4 alang=en,es
For Japanese audio preference, subtitles on. SDL A/V output for performence.
ao=sdl vo=sdl #Note: SDL video output does not work well with xinerama. Those wishing to watch video on a TV or other display should use "vo=xv" alang=jpn,Japanese #Not all files use the correct tags, so sometimes it will be necessary to switch audio streams manually or from the command line with "-aid x", where "x" is the number of the audio stream. sid=0 subfont-autoscale=1 ass=1
MPLayer has a huge collection of filters included. Some of them are magical.
- View styled subs, even if you only have plain subs:
- mplayer -ass -embeddedfonts myvideo.ext
- View external subs:
- mplayer -ass -sub mysubs.srt myvideo.ext
- 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
MPlayer by itself is fine but SMPlayer provides an easy to use interface to MPlayer so it is a better choice for most. It contains a couple of nice features, including autosaving the playback position so you can continue watching your anime the next time you start it (this feature can be disabled of course).
If you are using Debian Lenny/Sid or Ubuntu Intrepid Ibex (8.10), then you can simply
sudo apt-get install smplayer
Otherwise, you have 2 options:
- 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
You can find .rpm's via the search page.
Build from source. See below.
pacman -S smplayer
emerge -ptva 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'll need to configure it a little: 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. With this you can see the subtitle's colors and fonts (Note: the used fonts must be installed on the system for this).
If you see a black screen at playing, or the colors doesn't seems to be right, or the playing is too slow or wrong 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.