Installing MPlayer in the Linux (CentOS 6.4) system

Source: Internet
Author: User
Tags file copy win32 gstreamer

The whole morning finally put MPlayer installed, my system is CentOS 6.4, it is not easy ah!

First, the preparatory work

Required installation packages and:
1. MPlayer Source code package (mplayer-1.0rc4.tar.bz2) Download: http://www.mplayerhq.hu/MPlayer/releases/
2. Decoder installation package (all-20110131.tar.bz2) Download: http://www.mplayerhq.hu/MPlayer/releases/codecs/
3. Win32 Decoder installation package (windows-all-20071007.zip) Download: http://www.mplayerhq.hu/MPlayer/releases/codecs/
4, Skin installation package (blue-1.8.tar.bz2) Download: http://www.mplayerhq.hu/MPlayer/skins/

My Download Center also has all the above packages: http://down.51cto.com/data/976838

MPlayer encoding package should be installed by default in/usr/local/lib/codecs/, Win32 encoding is installed by default in/usr/local/lib/win32, if installed in a different directory, when loading MPlayer. Configure parameter to indicate path, parameter is--codecsdir= "path of package",--win32libdir= "package path".

Unzip the MPlayer decoder:
# TAR-JXVF ALL-20110131.TAR.BZ2
# mkdir/usr/local/lib/codecs/
# mv-f all-20110131/*/usr/local/lib/codecs/

Note: Copy all of the files in the all-20110131 to/usr/loc-al/lib/codecs, not the folder, or you will not be able to play them after compilation.

Unzip the Win32 decoder:
# Unzip Windows-all-20071007.zip
# Mkdir/usr/local/lib/win32
# MV window-all-20071007/*/usr/local/lib/win32

Second, installation MPlayer

All the packages here are downloaded to the directory/usr/local/, and the specific directories are defined according to their own circumstances.

To install the theme file:
# TAR-JXVF MPLAYER-1.0RC4.TAR.BZ2
# CD MPLAYER-1.0RC4
#./configure--prefix=/usr--codecsdir=/usr/local/lib/codecs--enable-gui--enable-largefiles--enable-menu-- Language=zh_cn,en--confdir=/usr/local/mplayer

Explain the parameters:
--enable-gui is to open the graphical interface, which I think is generally needed.
--enalbe-largefiles allow playback of large files over 2g
--enable-menu Allow menu
--PREFIX=/USR If you add this sentence, Mplayer,gmplayer placed in the/usr/bin/directory, without this sentence, under the installation directory/bin
--confdir=/usr/local/mplayer This is MPlayer's installation directory.
--disable-gcc-checking does not check for GCC versions. Not here, Mplayer-1.0rc1 needs gcc4.1, and CentOS 5 is gcc4.1.
--LANGUAGE=ZH_CN Install the Chinese interface.

If the compilation does not have an error then execute:
# make
# make Install

Third, install the skin:

The default installation path is the/usr/share/mplayer/skins/directory, the default skin directory
# TAR-JXVF BLUE-1.8.TAR.BZ2
# Cd/usr/share/mplayer/skins
# mkdir Default
# CD Blue
# CP./*/usr/share/mplayer/skins/default

Here installed the just blue skin and set it as the default, after installation you can also find a variety of mplayer skin, without decompression directly placed under the/usr/share/mplayer/skin/can be in the MPlayer interface to modify the skin.

Fourth step: Place the MPlayer icon

You can then place a mplayer icon on the desktop, right-click the Launcher (for GNOME) on the desktop, name MPlayer, command/usr/bin/gmplayer, and MPlayer's default icon position in/usr/share/pixmaps /MPLAYER-DESKTOP.XPM or with a command # cp/usr/share/pixmaps/mplayer-desktop.xpm/root/desktop/

Once the installation is complete, you can start MPlayer.

If the following error occurs when you start MPlayer:

./mplayer:error while loading shared libraries:libiconv.so.2:cannot open Shared object file:no such file or directory

The workaround is to add a line at the end of the/etc/ld.so.conf file:/usr/local/lib can handle it.

This article is from the "I am it migrant workers" blog, please be sure to keep this source http://lfliangli.blog.51cto.com/2853536/1309128

Finally, no sound, I looked for information from the Internet

1. Installation steps:


To install the theme file:


#tar-JXVF mplayer-1.0rc4.tar.bz2


#cd MPLAYER-1.0RC4


#./configure--codecsdir=/usr/local/lib/codecs--enable-gui--enable-largefiles--enable-menu--language=zh_CN,en-- Charset=utf8


Explain the parameters.


--enable-gui is to open the graphical interface, which I think is generally needed.
--enalbe-largefiles allow playback of large files over 2g
--enable-menu Allow menu
--PREFIX=/USR If you add this sentence, Mplayer,gmplayer placed in the/usr/bin/directory, without this sentence, under the installation directory/bin
--confdir=/usr/local/mplayer This is MPlayer's installation directory.
In addition, there are a few parameters to explain, perhaps useful.
--disable-gcc-checking does not check for GCC versions. Not here, Mplayer-1.0rc1 needs gcc4.1, and CentOS 5 is gcc4.1.
--LANGUAGE=ZH_CN Install the Chinese interface.



If the compilation does not have an error then execute:


#make
#make Install


Install skin:


The default installation path is the/usr/local/share/mplayer/skins/directory, the default skin directory


I downloaded the clearlooks-1.2.tar.bz2.


#tar-JXVF clearlooks-1.2.tar.bz2


#cd/usr/local/share/mplayer/skins


#mkdir Default


#cd Clearlooks


#cp./*/usr/local/mplayer/share/mplayer/skins/default


This step completes you can have the graphical interface, hehe ... You can enter the/usr/local/bin directory to execute Gmplayer or MPlayer to open the player.


Third, uninstall the program:
Oh, the installation of the difficulty, uninstall pity ah.
#cd Mplayer-1.0rc1
#make Uninstall
Delete the other related files. 2008-07-19 05:56
MPlayer compiling installation To resolve DTS audio no sound issues
Originally on the centos5.2 can be yum install MPlayer, installed also can not play with DTS avi file, no sound. (Ubuntu I also use sudo apt-get install MPlayer installed to support RMVB) but the totem of CentOS is not playing AVI files,
After installing the GStreamer plug-in, www.it165.net
Installed a
GStreamer
gstreamer-plugins-ugly
Gstreamer-plugins-base
Gstreamer-plugins-bad
Gstreamer-plugins-good
Gstreamer-ffmpeg
All the way yum install here
Most of the files can be played with Totem, RMVB not yet. Play rmvb on MPlayer.
But with totem play AVI file, there is no sound, who told me to put the AVI file with DTS audio, totem inside can not find audio, like Ubuntu inside the Totem Ah, play the file when the lack of decoder, a little bit on the GStreamer plug-in, With DTS audio avi like to do, this I do not know in the CentOS installed what plug-ins, and later check is said Gstreamer-ffmpeg now default DTS support, do not know the original Ubuntu missing DTS decoding when automatically installed what plug-in, Now see a lot of decoder plug-in dizzy.


I play audio files on the totem can also play the video effect is very poor, there is a lot of granular sense, for the lower resolution is more serious, later only to know that is the ATI graphics card driver caused by the problem, this has no way, who is called ATI graphics card driver or so garbage, it is better to use Radeon Drive, MPlayer does not exist, the former reaplayer is also the problem, but now the update, playing a lot better, slowly close to Windows Reaplayer video effect.


For DTS audio file Gstreamer-ffmpeg is not supported, the only solution is to install LIBDCA does not recommend yum install LIBDCA so down, inside DTS decoder is not complete, almost no, or use the source installation, MPlayer compile time also need LIBDCA support, LIBDCA formerly called Libdts, it is responsible for DTS decoding, Libdts is good old, I found a use on the Redhat 3, it is a long history, it is not good to find, basically now do not have it, It's useless to find an install, I've experimented with it, it's no use to me.
LIBDCA Source Recommended Use
http://download.videolan.org/pub/videolan/libdca/0.0.5/libdca-0.0.5.tar.bz2
This is on my computer, I can solve DTS.
You can also find a libdca.src.rpm package, release the RPM package and get the source package. It's not the same effect.
Decompression after the classic source installation three steps
./configure
Make
Make install
After compiling the installation
You can find a few of its library files in the/usr/local/lib, and you can find the DTS header file in the/usr/local/include. These two parts are needed. Very important


Then the source is installed MPlayer


You must have these several source packages before installation:


MPLAYER-1.0RC2.TAR.BZ2 MPlayer Installing the main file
clearplayer-0.8.tar.bz2 MPlayer Skin File
Font-arial-cp1250.zip mplayer font File
ALL-20071007.TAR.BZ2 MPlayer Linux Decoder
Windows-all-20071007.zip MPlayer Win32 Decoder
These things are on the official website of http://www.mplayerhq.hu/design7/dload.html, you can download it yourself!
Some can not find in Baidu search.


Mkdir/usr/lib/codecs to build a directory for decoding files, I like to build him a, win32codes directory I just don't bother to build, I like to put all the decoding files to put a piece, in order to be simple.


TAR-XJVF mplayer-1.0rc2.tar.bz2


TAR-XJVF clearplayer-0.8.tar.bz2


Unzip Font-arial-cp1250.zip


TAR-XJVF all-20071007.tar.bz2


Unzip Windows-all-20071007.zip


Then is the CP copy decompression all-20071007.tar.bz2 and Windows-all-20071007.zip produce all the files in the directory to the Mkdir/usr/lib/codecs exist replace, replace is, want is the and.


CD into the MPlayer source directory
./configure--prefix=/usr/local/mplayer/--enable-gui--enable-menu--codecsdir=/usr/lib/codecs/--win32codecsdir=/ usr/lib/codecs/


Generate Makefile File


/* Here is an explanation of the./configure command, not an execution command.
--prefix=/usr/local/mplayer/specifying the MPlayer installation path
--enable-gui Open GUI interface
--codecsdir=/usr/lib/codecs/specifying mplayer Linux Decoder directory
--win32codecsdir=/usr/lib/codecs/specifying MPlayer WIN32 Decoder Directory
--LANGUAGE=ZH_CN Specify MPlayer GUI interface language here for can be set to Chinese, I did not add this option, because the MPlayer Chinese code for GB2312 and system zh-cn.utf-8 inconsistent, lest garbled or not display Chinese, simply do not add, How good in English
EXPLANATION is over! Here is the Execute installation command! */


Make


Make install


Configure MPlayer


cd/usr/local/mplayer/bin/


The./mplayer generates the/.mplayer/directory under the user, because this directory is automatically created the first time the MPlayer is run, which is the MPlayer configuration directory
CP */usr/bin/


CP */usr/bin/the MPlayer Master file copy to the system execution Environment directory, or in the terminal knocking MPlayer Gmplayer system do not know the two commands, will say you did not install MPlayer, mainly considering the use of the future, no one likes to play with the mplayer when the knock/ Usr/local/mplayer/bin/mplayer and/usr/local/mplayer/bin/gmplayer so long to open mplayer. This is also the source code to install other software after making a link to/usr/bin easy to use. Skill, save time and effort.


To move the extracted clearplayer-0.8.tar.bz2 clearplayer skin file to/usr/local/mplayer/share/mplayer/skins/, implement the following command
MV clearplayer//usr/local/mplayer/share/mplayer/skins/


Go to Skin Catalogue
cd/usr/local/mplayer/share/mplayer/skins/


Set the Clearplayer as the default skin
Ln-s Clearplayer/default


Copy the font-arial-cp1250.zip extracted font file font-arial-cp1250 to./mplayer/fonts


CD font-arial-cp1250/
CP font-arial-14-cp1250//root/.mplayer/font-raf


Gedit/root/.mplayer/config
Add Zoom=yes to zoom in, otherwise full screen mplayer play like not fullscreen
There is the video output and the actual computer length and width correction. You can join Monitoraspect=4:3 or monitoraspect=16:10 according to the actual situation.


Save the exit, basically no problem.
Unable to open audio device/dev/dsp:no such file or directory


You can enter gmplayer directly into the terminal to start the MPlayer GUI interface.
Or build a launcher on the desktop
MPlayer installation is complete. The last thing to do is, for the default opener of the video file, let's get it done by ourselves.
#linux学习
MKNOD/DEV/DSP C 14 3


#chmod 666/DEV/DSP


This is normal!

I did not sound after the test, then I installed the sudo aptitude install Libpulse-dev Libasound2-dev after the re-compilation on the line

Related Article

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: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.