To teach you how to compile and install MPlayer

Source: Internet
Author: User
Tags bz2 unsupported versions win32

This article allows free reprint, but please specify the source (http://imhow.donews.net/imhow) and author name (imhow), thank you

Here is the compilation and installation method of Mplayer1.0pre3. However, most of these steps should apply to other versions.
My system is RH9, the kernel is 2.4.20-8, development Baoqianxian.

Step 1 downloading

Go to the official site (http://www.mplayerhq.hu/homepage/design6/dload.html) to download the required packages, including:

Mplayer-1.0pre3
Codecs Package (two of the official offers, if you want to see RM)
Default Skin Package

Download the font packs you need for subtitles in the Linux commune to see DVDRip. Download address (registration is required to download):
http://www.linuxfans.org/nuke/modules.php?name=Site_Downloads&op=geninfo&did=192

Step 2 Coping Files

Extract each package using the TAR command, and then copy the downloaded decoder, font, and skin file to the appropriate directory:

I copied the fonts and skin files to the/usr/share/mplayer directory, the decoder was copied to/usr/local/lib/codecs, and the real decoder was copied to/USR/LOCAL/LIB/CODECS/RP.

Of course, you can copy them to any directory, but note that the font directory and skin directory in the same directory, font directory name to Font,skin directory name for skin (case note), and the interface required picture files to be under Skin/default
, or you will be prompted to not find skin when you start the MPlayer graphical interface.

Step 3 modifing

Sometimes "not audio/video stream or unsupported!" appears when you open an RM file , but click OK after the normal playback, in order to remove this annoying dialog box, we modify the source file (open source Advantage, hehe).

Open the Demux_real.c file in the MPlayer source directory with either text editor (such as Kedit,gedit):
Mplayer-1.0pre3/libmpdemux/demux_real.c

Add//To comment out this line of code before line 1298th. (Note: Corresponds to the mplayer1.0pre3 version.) Other versions may have different lines, but basic information is the same. Exit after saving. The details of the code are as follows:

Mp_msg (Msgt_demux, Msgl_err, "not audio/video stream or unsupported!/n");

Step 4 Configuration & Make

And then we can start configure. In terminal mode, run the following command under the source code directory: (More options please run./configure--help to view)

$./configure--enable-gui--datadir=/usr/share/mplayer--libdir=/usr/local/lib/codecs--language=en-- WITH-REALLIBDIR=/USR/LOCAL/LIB/CODECS/RP--with-win32libdir=/usr/local/lib/codecs/win32

The following explains the meaning of each option:

--enable-gui: Enables MPlayer to use the graphical interface

--datadir=/usr/share/mplayer: Set the font and skin directory, depending on the directory you just copied

--libdir=/usr/local/lib/codecs: Set the directory where the decoder resides

--language=en: Set MPlayer interface language for English, also can be set to en to display Chinese.

--WITH-REALLIBDIR=/USR/LOCAL/LIB/CODECS/RP: Set the real file decoder directory

--WITH-WIN32LIBDIR=/USR/LOCAL/LIB/CODECS/WIN32: Sets the Win32 decoder directory. Note that the Win32 decoder is not required, but it is necessary to set this directory, otherwise if you set the Libdir, but do not set the Win32 directory, mplayer in the Configure will be prompted an error.

When the Configure is over, the following is simple, direct make (this step takes a bit longer), then make install. So the MPlayer is installed in the system.

Step 5 Run MPlayer

You can run MPlayer or Gmplayer commands at the terminal or "Start"-"Run Programs". Where Gmplayer is the boot with the graphical interface of the MPlayer, of course, you have to configure when the Enable-gui option enabled and your skin installed correctly.

The first step after the first run is to set the font, which is used to display dvdrip Chinese subtitles. Right-click on the MPlayer main window, select Settings (Preferences), and fill in the location of the Font.desc in your font file directory on the font (font) tab. For example, mine is/usr/share/mplayer/font/font.desc. Then select "Unicode subtitles" in the subtitle/osd (subtitles/osd) tab. Other options you can set according to your needs.

If you add the parameter-forceidx after the MPlayer or Gmplayer command, you can drag the RM file, but you cannot use the progress bar on the interface, you must use shortcut keys, such as the top and bottom direction keys, also very convenient.

Start with the parameter-vo x11, you can use any screen interception software to intercept the MPlayer played video screen.

More options Please use man mplayer to view

To teach you how to compile and install Mplayer-1.0pre5
To teach you how to compile and install Mplayer-1.0pre5

MPLAYER-1.0PRE5 has been officially released, some changes have been made, some defects have been repaired and functions have been further strengthened. MPlayer's name changes--don't worry, MPlayer is still mplayer, just the Movie player, not the Movie player for Linux.
For more information, please see:
Http://www4.mplayerhq.hu/homepage/design7/news.html

What are the functions that have been strengthened? For example: From now on, you play the Rm/rmvb file with MPlayer, you do not need to add-FORCEIDX option, directly support drag and drop, starting speed and other formats are not different. There are a lot of them, you slowly understand it.

1, Prepare for work:
Download source packages, decoders, and fonts from the MPlayer official site (download to your home directory by default):
Mplayer-1.0pre5 Source Pack: http://www4.mplayerhq.hu/homepage/design7/dload.html
Essential codecs:http://www4.mplayerhq.hu/homepage/design7/codecs.html
Font fonts:http://www4.mplayerhq.hu/homepage/design7/dload.html
Skin: http://ftp5.mplayerhq.hu/mplayer/Sk...ron-1.5.tar.bz2

2, unzip the installation decoder:
Tar xjvf essential-20040704.tar.bz2
MV essential-20040704//usr/lib/codecs//Move all decoded files to the/usr/lib/codecs directory

3, compile and install MPlayer:
Tar jxvf mplayer-1.0pre5.tar.bz2
CD Mplayer-1.0pre5
./configure--enable-gui--with-codecsdir=/usr/lib/codecs--with-win32libdir=/usr/lib/codecs--with-reallibdir=/ Usr/lib/codecs--with-xanimlibdir=/usr/lib/codecs--disable-inet6--LANGUAGE=ZH_CN
Make
Make install
CD etc/
CP codecs.conf gui.conf input.conf sample.conf ~/.mplayer/
MV ~/.mplayer/sample.conf ~/.mplayer/config

Simple description: Because the default does not support the GUI, so to use a graphical interface, need to--enable-gui; Before said, the decoder is installed to the/usr/lib/codecs, the configuration point of the path; because in most cases IPv6 is useless, So to--disable-inet6, but in some cases, such as the campus network uses IPv6, then do not add the item;--language Select the default language. In addition, because live support is built into the mplayer, online playback does not require-enable-live, and if you want this support, view the Live.com Web site. Copy several conf files to the ~/.mplayer directory, after users modify their own configuration, directly change these files.

4, install the font:
Tar xjvf font-arial-cp1250.tar.bz2
Tar xjvf font-arial-iso-8859-1.tar.bz2
Tar xjvf font-arial-iso-8859-2.tar.bz2
Tar xjvf font-arial-iso-8859-7.tar.bz2
Move the unpacked directory to the/usr/local/share/mplayer/font/directory
MV Font-arial-cp1250//usr/locale/share/mplayer/font/
...
Ln-s/usr/share/fonts/zh_cn/truetype/gbsn001p.ttf Subfont.ttf//set Chinese subtitles font

5, install skin:
CD ~
Tar xjvf neutron-1.5.tar.bz2
MV neutron/default/
MV default//usr/local/share/mplayer/skin 6, run Mplayer/gmplayer
When using MPlayer, the terminal input mplayer is a text interface player, Gmplayer opens the graphical interface.

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.