Linux MPlayer compile, install and configure __linux

Source: Internet
Author: User
Tags bz2
With the totem player with Ubuntu I never released a movie, every time to see the film to go to XP, Linux could have played a few things, to solve the entertainment problem, download the MPlayer file, and then compile their own. At the same time the online collection of relevant content to sum up together.

MPlayer is a very powerful movie player under Linux, and it can also play mp3,wma and other sound format files.
Root permissions are required during installation, such as copying files and make install installation to/usr/... Directory.
Have to install LIBC6-DEV,LIBPNG,LIBPNG-DEV,GTK Dev Package (Libgtk2.0-dev), not installed configure will prompt error. (I'm all loaded, so I don't know if it's still necessary)

1, download the installation MPlayer needs of various software (http://www.mplayerhq.hu/)
(1) Main program: MPLAYER-1.0RC2.TAR.BZ2
(2) Font file: font-arial-iso-8859-1.tar.bz2
(3) Skin file (support GUI): plastic-2.0.tar.bz2 of course can also download other skin files
(4) Download the necessary Code:windows-all-20071007.zip support AVI and other W32 multimedia format Plug-ins
all-20071007.tar.bz2
ESSENTIAL-20071007.TAR.BZ2 supports multimedia format plug-ins such as Realplay (Rm,ram, etc.)
If you are only running under the console (text), the skin file does not need to be downloaded.

2. To install

(1) Decompression (code)
Be sure to do this first, and the directory must note that if you have installed Realplay8 or Realplay9 also can not be copied into the Realplay support library, only the following run configure to pay attention to its directory.
Tar jxvf all-20071007.tar.bz2 Other files are decompressed in a similar way
MV All-20071007/usr/lib/codecs
MV Windows-all-20071007/usr/lib/codecs/wincodecs20071007
MV Essential-20040704/usr/lib/codecs/essential-20071007
Actually I was in the download location to organize a codecs directory and then move directly to the/usr/lib

(2) Installation MPlayer
Tar jxvf mplayer-1.0rc2.tar.bz2
CD MPLAYER-1.0RC2
./configure--prefix=/usr/local/mplayer--enable-gui--enable-freetype--codecsdir=/usr/lib/codecs/- win32codecsdir=/usr/lib/codecs/wincodecs20071007/--realcodecsdir=/usr/lib/codecs/essential-20071007/--language =zh_cn

Description
--prefix=/usr/local/mplayer is the installation path
--enable-gui installation of graphical user interface
--enable-freetype Adjust Font
--codecsdir=/usr/lib/codecs/decoding location, decoding the location of the option name and the previous online description of the difference, you can./configure--help view
--win32codecsdir=/usr/lib/codecs/wincodecs20071007/decoding location (AVI, etc.)
--realcodecsdir=/usr/lib/codecs/essential-20071007/Specify the directory where the Realplay support library is located, if you have installed Realplay can be modified according to the actual
--LANGUAGE=ZH_CN specifies that the MPlayer font is Chinese
#--CONFDIR=/ETC/MPLAYER Specifies the configuration file

Then
Make
Make install

(3) Install skin and fonts

Tar jxvf plastic-2.0.tar.bz2
MV Plastic/usr/local/mplayer/share/mplayer/skins/default the plastic to a provincial face (as if it could be moved to a $HOME/.mplayer/ (Some articles specifically refer to the skins at the beginning of the S is uppercase, but I am here lowercase)

Font
MV font-arial-iso-8859-1/font-arial-14-iso-8859-1/* ~/.mplayer/font
Run MPlayer prompt Subfont.ttf does not exist
Cp/usr/share/fonts/truetype/arphic/uming.ttf $HOME/.mplayer/subfont.ttf A font or a link.

(4) test
You can create a launcher to run MPlayer, and the initiator command is set to/usr/local/mplayer/bin/gmplayer. (Run MPlayer under the console to start character playback mode)
Open a file play try
Subtitles for garbled, subtitle files must be the same as the movie name, can not be similar. CHS.SRT name

(5) Modify the configuration file, display subtitles
Copy Simhei.ttf to $home/.mplayer from the Windows font directory, and then modify the configuration file ~/.mplayer/config (gui.conf appears to be automatically modified according to config when playing)
# Write your default config options here!
# Video output in XV mode, enable video acceleration
Vo=xv
# subtitle Font file
Font = $HOME/.mplayer/simhei.ttf
# subtitle encoding (used when using TTF fonts)
SUBCP = cp936
# 0 does not automatically scale; 1 zoom by movie height 2 by width; 3 by diagonal
Subfont-autoscale = 1
# Marquee Font Size
Subfont-text-scale = 4
# Set the automatic Bloom factor for the OSD element
Subfont-osd-scale = 6
$HOME/.mplayer/simhei.ttf
subcp=cp936
Subfont-autoscale=1 #这是控制自动装载字幕的, 2 and 0 are not automatic
subfont-text-scale=7# Font Size

Sometimes the command line does not have subtitles, you can try the shortcut key "V", and "B"
Using the command line character set do not use Unicode, gb2312 or cp936.

If there is a problem, please try to modify the config file in the SUB_CP = "Cp936″, replace cp936 with other such as gb,gbk,gb2312,gb18030 and so on."

Other problems that occur to others:
NO SOUND!!!!! Error:
[AO OSS] audio_setup:can ' t open audio device/dev/dsp:device or resource busy
Ao_nas:init (): Can ' t open NAS audio server-> Nosound
Again depressed, carefully checked, Ubuntu desktop environment using GNOME, the default is the use of ESD (Enlightenment Sound Daemon), rather than our usual use of alsa or older OSS. The function of ESD is to be responsible for the background sound of GNOME, and it has the ability of multiple sound source simultaneous audible. MPlayer by default is using OSS, resulting in an X will be prompted "/DEV/DSP occupied" error messages and not normal use,/DEV/DSP is the ESD occupied. Uncomfortable, how can not unify it.
Turn off the ESD: in System > Preferences > Sound Preferences, the reverse Enable Sound server startup and Sounds for events, the result is all normal, is gnom E's background sound is missing.
This will listen to music, see the film is no problem, finally can rest ...

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.