Compile and install xmms and mplayer in centos 5.4

Source: Internet
Author: User
Tags gtk

Run this command to find the centos version:

[Samzhang @ rat072 sandbox] $ CAT/etc/RedHat-release

Centos release 5.4 (final)


The system permission settings are depressing. Many directories are read-only and can only be written under the sandbox directory. Therefore, because the player that comes with the system does not have a decoder installed, it cannot play any audio and video files! To install some of your favorite players, you have to download the source code package and compile it to the sandbox directory.


First install xmms:

1. Run the following command under/sandbox/software/howtoinstallmplayer/glib-1.2.8:

$./Configure -- prefix =/sandbox/samzhang/software/glib -- Exec-Prefix =/sandbox/samzhang/software/glib

$ Make & make install


2. Run the following command in/sandbox/software/howtoinstallmplayer/GTK +-1.2.10:

$./Configure -- prefix =/sandbox/samzhang/software/GTK -- Exec-Prefix =/sandbox/samzhang/software/GTK

$ Make & make install


3. Edit ~ /. Bash_profile:

After $ path, add:/sandbox/samzhang/software/glib/bin:/sandbox/samzhang/software/GTK/bin.

Add: Export LD_LIBRARY_PATH =/sandbox/samzhang/software/glib/lib:/sandbox/samzhang/software/GTK/lib at the end of the file.

4. Run the following command in/sandbox/software/howtoinstallmplayer/xmms-1.2.11:

$./Configure -- prefix =/sandbox/samzhang/software/xmms -- Exec-Prefix =/sandbox/samzhang/software/xmms

$ Make & make install

5. Run the following command in/sandbox/samzhang/software/xmms/bin:





Install mplayer:



1. First download and install the related decoding package

[Samzhang @ rat072 sandbox] $ wget

[Samzhang @ rat072 sandbox] $ tar jxvf all-20071007.tar.bz2

[Samzhang @ rat072 sandbox] $ mkdir-P/sandbox/samzhang/software/lib/codecs

[Samzhang @ rat072 sandbox] $ MV all-20071007/*/sandbox/samzhang/software/lib/codecs

[Samzhang @ rat072 sandbox] $ chmod 644/sandbox/samzhang/software/lib/codecs /*

[Samzhang @ rat072 sandbox] $ wget

[Samzhang @ rat072 sandbox] $ unzip

[Samzhang @ rat072 sandbox] $ mkdir-P/sandbox/samzhang/software/lib/wincodecs

[Samzhang @ rat072 sandbox] $ MV windows-all-20071007/*/sandbox/samzhang/software/lib/wincodecs/

[Samzhang @ rat072 sandbox] $ chmod 644/sandbox/samzhang/software/lib/wincodecs /*

[Samzhang @ rat072 sandbox] $ wget

[Samzhang @ rat072 sandbox] $ tar jxvf essential-20071007.tar.bz2

[Samzhang @ rat072 sandbox] $ mkdir-P/sandbox/samzhang/software/lib/realcodecs

[Samzhang @ rat072 sandbox] $ MV essential-20071007/*/sandbox/samzhang/software/lib/realcodecs/

Check whether there are any of these decoding packages in/sandbox/samzhang/software/lib/codecs. Otherwise, mplayer 11 init audio codec error may occur.

2. Download and compile and install mplayer

[Samzhang @ rat072 sandbox] $ wget

[Samzhang @ rat072 sandbox] $ tar jxvf MPlayer-1.0rc2.tar.bz2

[Samzhang @ rat072 sandbox] $ CD MPlayer-1.0rc2

[Samzhang @ rat072 MPlayer-1.0rc2] #./configure-help # view supported Parameters

[Samzhang @ rat072 MPlayer-1.0rc2] #./configure -- prefix =/sandbox/samzhang/software/mplayer //

-- Enable-Gui -- enable-menu -- enable-FreeType/

-- Codecsdir =/sandbox/samzhang/software/lib/codecs //

-- Win32codecsdir =/sandbox/samzhang/software/lib/wincodecs //

-- Xanimcodecsdir =/sandbox/samzhang/software/lib/codecs //

-- Realcodecsdir =/sandbox/samzhang/software/lib/realcodecs //

-- Enable-FreeType -- disable-inet6 -- language = zh_cn, en -- charset = utf8

# I have added GUI support, added codecs to specify the location of the decoded file, added Chinese support, and specified the installation path as/sandbox/samzhang/software/mplayer /.

[Samzhang @ rat072 MPlayer-1.0rc2] # Make & make install

Prompt that the installation is successful !!

[Samzhang @ rat072 MPlayer-1.0rc2] # ln-SF/sandbox/samzhang/software/mplayer/bin/gmplayer/home/samzhang/bin/mplayer

[Samzhang @ rat072 MPlayer-1.0rc2] # ln-SF/sandbox/samzhang/software/mplayer/bin/gmplayer/home/samzhang/desktop/gmplayer

The above command is to create a link for easy operation.

3. Add skin and so on. You have a good introduction to skin notes.

[Samzhang @ rat072 MPlayer-1.0rc2] # CD ../

[Samzhang @ rat072 sandbox] $ wget

[Samzhang @ rat072 sandbox] $ tar jxvf Blue-1.7.tar.bz2

[Samzhang @ rat072 sandbox] $ MV blue/sandbox/samzhang/software/mplayer/share/mplayer/skins/Default

4. install fonts

[Samzhang @ rat072 sandbox] $ CP/usr/share/fonts/Chinese/TrueType/Ukai. TTF ~ /. Mplayer/subfont. TTF

5. Play video files

For example, run the following command to play a video ~ Movies/hyj. rmvb file:

[Samzhang @ rat072 sandbox] $/sandbox/samzhang/software/mplayer/bin/gmplayer ~ Movies/hyj. rmvb



Mplayer troubleshooting

(Reference (reference:

I have installed mplayer but cannot put it. once put it, "error opening/initializing the selected video_out (-vo) device! "


If you are typing commands in the terminal

Mplayer-vo X11 *. ASF

If skin is used (skin must be included)

Modify ~. Mplayer/GUI. conf

Find related options and set this

Vo_driver = "X11"

Run gmplayer




No image, no sound, cannot play rmvb

1. Click the video and the message "error opening/initializing the selected video_out (-vo) device" is displayed ". Click "OK" to play the audio, but there is no image.


Right-click the mplayer main program and select "Preferences". In the pop-up window, select the "video" label. Under "availble drivers", select "X11 X11 (ximage/SHM ), click "OK.

2. When the video is displayed in full screen mode, the image size remains unchanged and the entire screen cannot be filled.

Solution: Open the terminal and run the following command.


Gedit ~ /. Mplayer/config

Write a row in the pop-up file


Zoom = Yes

Save and exit.

4. mplayer flash screen

We recommend that you use this method first. Right-click and choose preferences> video> X11> restart OK.


The following is only an introduction


In fact, most of the playback flags are related to 3D. If 3D is normally disabled, videos are not flushed. However, to co-exist, the gmlive calls mplayer,

Follow the prompts to use gmplayer-vo X11 for normal playback.


Sudo gedit/etc/mplayer. conf

Change Vo = XV in the file to Vo = X11, and the video will be played! However, the subtitles are all horizontal lines.

Run gmplayer on the command line and check again. The error is:

Cannot load bitmap Font:/home/Ray/. mplayer/subfont. TTF

Go to wiki to search for this section:

Ln-SF/usr/share/fonts/TrueType/arphic/uming. TTF ~ /. Mplayer/subfont. TTF

Check the system. The soft link is still in progress, but the file uming. TTF is not found under/usr/share/fonts/TrueType/arphic. Only Ukai. TTC and uming. TTC are supported. Run

Ln-SF/usr/share/fonts/TrueType/arphic/uming. TTC ~ /. Mplayer/subfont. TTF

OK. There are subtitles. However, it cannot be played in full screen.

Find a method on the Internet.

Sudo gedit/etc/mplayer. conf

Find # zoom = yes in it, remove the comment symbol "#", save and exit. OK!

When playing a video in rmvb format with mplayer, the error "cocould not open required DirectShow codec drvc. So" is displayed, but the playback is not affected.

Solution: use the new version to download libstdc ++ 5

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.