Install MPlayer in CentOS 6.x and CentOS 7
CentOS 6.x
Smplayer exists in the repo of CentOS 6. x of RPMforge (now called RepoForge), so install yum directly.
$ Yum install smplayer -- enablerepo = rpmforge
CentOS 7
The smplayer of CentOS 7 is not found in the repo of RPMforge (now called RepoForge), so source code installation is required.
MPlayer installation usually requires the following three things:
Source code (source code tarball file)
Binary codecs (a bunch of binary decoder files)
A skin (skin)
Download the source code from the official website.
$./Configure -- enable-gui -- language = zh_CN -- enable-gui tells configure that the graphic interface is required to run MPlayer in the future, not only from command line.
-- Language = zh_CN tells configure to install the Chinese environment.
Configure usually fails because it requires some dependencies. It tells me what is missing and I will install it.
If yasm is missing, go to the yasm official website to download the source code tarball. A simple three-step process:
$./Configure
$ Make
$ Make install lack X11, yum install gtk2-devel, note to install gtk2-devel, gtk3-devel does not work.
$ Yum install gtk2-develconfigure
Pass, and then
$ Make
$ Make install
OK. The installation is complete. Running the mplayer media file name in command line can generally be played.
Download binary codecs from the official website. It is a tarball. decompress it and get a bunch of decoder files. Put these decoder files in/usr/local/lib/codecs. If there is no codecs folder under/usr/local/lib/, create one manually.
Download the skin file from the official website. It is a tarball, decompress it, and get a folder. Put the folder in/usr/local/share/mplayer/skins/and create a symbolic link named default, point to the skin folder.
$ Ln-s <folder Name> default. You can also change the folder name to default.
If no sound is played, do the following:
$ Yum install * alsa *
I have installed a bunch of alsa related things. I don't know what to do or what to use. I searched the internet.
Done! Pai_^
Install MPlayer in CentOS 7.0
Install and use Mplayer in CentOS 5.5
Install Mplayer in Ubuntu 8.04 to watch wonderful movies.