Install mplayer with source code compilation on Windows

Source: Internet
Author: User
Author: Mood Garden 1. This article follows the GPL/lgpl protocol. You are welcome to reprint it freely, but please indicate the author's source.

2. This Article is the first winner. Because I was asked a few questions about mplayer there, I checked it online and found that there are few articles about Windows mplayer, even the official Chinese Document (http://www.mplayerhq.hu/DOCS/HTML/zh/documentation.html ), it also focuses on the installation and use of the Linux platform. Therefore, I wrote a post about using the source code to compile mplayer on the Windows platform based on my experience. At the end of this article, I briefly introduced the mplayer command line and GUI usage. Laugh.

3. For a period of time, mplayer has been the leader of media playing software on the Linux platform. Its windows porting version is equally outstanding. However, mplayer has been quite awkward recently. First, on the Linux (KDE) platform, the Media Player's new and expensive kaffeine went viral, and then, together with its own sub-project FFMPEG, it provoked an inexplicable copyright lawsuit. (Http://www.mplayerhq.hu/homepage/index.html) although the current mplayer development work is still normal, but the future is still unknown. As a loyal supporter of mplayer, I can only pray silently that it will go well!

4. The main reference documents: http://www4.mplayerhq.hu/MPlayer/releases/...MinGW-Howto.txt
5. My machine is Sai Yang 2.0 and WINXP SP2 of Northwood. During the compilation process, the U of Vendor A should be similar to that of other Windows operating systems.

6. Time is too short and mistakes are inevitable. Please correct your criticism. Thank you!

  1. Generally, mplayer is used on Windows platforms by selecting the KK compiling version, which is an outstanding and useful version. Why does it take time and effort to compile and install mplayer from the source code? Hey, I want to have a few reasons:

1. Execute mplayer.exe in the command line and you will find that mplayer Windows releases only compile () the MMX and mmx2 instruction sets by default, and its source code also supports SSE, sse2, and 3 dnow! And 3dnow-dsp! Instruction Set. If you have a newer CPU, you can add support for the preceding instruction sets by compiling the source code to achieve better results and lower resource usage, it is a great thing.

    2. Self-compiled mplayer can customize some performance options. For example, the default mplayer does not support a single file larger than 2 GB, which is why some people use mplayer to play an HDTV video. You can add support for it through your own compilation.

3. Every day, mplayer releases a complete CVS source code package based on the previous day's work, you can compile the latest version every day-you can taste the latest performance of mplayer-of course, it may also include the latest bug

4. Through compilation and installation, you can learn more about computer knowledge in addition to creating software suitable for your own machine.

5. Fun.

If the above five reasons do not impress you, then you should not compile and install it. Honestly downloading the aforementioned KK version is also quite useful.

  2. Preparations before installation

1. Don't look at how to compile and install mplayer in windows, but win does not provide related tools. We also need to install two software, go to the http://www.mingw.org/download.shtml login, first double install mingw-3.2.0-rc-3.exe, this and General WIN program installation is no difference, one way to next can be done; then double click to install msys-1.0.10.exe, after the installation is complete, the dialog box "Do you wish to continue with the Post install? [YN] "After selecting Y, a" do you have mingw installed? [YN] "select y, and then let you provide the mingw installation path. If it is the default, enter C:/mingw (note that"/"instead of" \ "). after the installation is complete, an msys icon is generated on the desktop. You can double-click it.

What is mingw and msys used? I have always understood them as part of the Linux tool software and the Windows porting version of the library + shell command line. In order to write this article, I searched for this article. The original mingw refers to the compiling environment for generating pure Win32 executable files using only free software. It is the alias of minimalist GNU on Windows. -- What you can see is that it is a Unix/Linux-like command-line software compiling environment.

2. Download The dx7 header file (http://www.mplayerhq.hu/MPlayer/releases/w.../dx7headers.tgz)
Decompress the package and copy all the files to (C: \ mingw \ include)

The attachment is my own latest DX9 headers. There is no big difference in the effect. You can try it if you like it-but it cannot guarantee quality. The usage is the same as the header file of dx7. (Either of them can be selected)

Additional File
Dx9cheaders.rar (351.5 K) 3. Start to download and install the software and lib that mplayer compilation depends on.

1. FreeType (for OSD subtitles)

Home: http://www.gnu.org/software/libiconv/

Files required: libiconv-1.9.1.tar.gz

This file and the file mentioned below can be decompressed using WinRAR in windows. Unzip the libiconv-1.9.1 directory, for example, drive C, and double-click to open msys, enter

C: \ libiconv-1.9.1

Note: Open the libiconv-1.9.1 directory, you can also specify other directories as needed (the same below ). Press enter and enter:

./Configure -- prefix = C:/mingw -- disable-shared

Note: configure the code command, where -- prefix = C:/mingw indicates the specified directory command, and -- disable-shared indicates canceling the sharing. Press enter. After the execution is complete, enter:

Make

Note: Compile the command. Press enter. After the execution is complete, enter:

Make install

Note: Compile and install commands.

If everything goes well after the execution is completed, no error is reported. So far, the installation of a software is complete. Similar to the steps below, I will write a little simpler.

  2. FreeType2
Home: http://sourceforge.net/project/showfiles.php? Group_id = 3157
Files required: freetype-2.1.9.tar.bz2
Same as above, decompress and then
CD freetype-2.1.9
Make note: this software is not required./configure
Make install

3. zlib
Home: http://www.gzip.org/zlib/
Files required: zlib-1.2.2.tar.bz2
Extract
CD zlib-1.2.1
Make
Make install

4. libpng
Home: http://sourceforge.net/project/showfiles.php? Group_id = 5624
Required documents: libpng-1.2.8-config.tar.gz
Extract
CD libpng-1.2.8-config
./Configure -- prefix = C:/mingw -- disable-shared
Make
Make install

5. libjpeg
Home: http://www.ijg.org/
Required file: jpegsrc.v6b.tar.gz
Extract
CD jpeg-6b
./Configure -- prefix =/mingw/-- enable-static
Make
CP. libs/libjpeg. a c:/mingw/lib/
CP export Lib. h jconfig. h jmorecfg. h c:/mingw/include/

6. libregif
Home: http://armory.nicewarrior.org/projects/libregif/
Required files: libregif 4.1.6
Extract
CD libregif-4.1.5
./Configure -- prefix = C:/mingw
Make
Make install

7. NASM
Home: http://sourceforge.net/project/showfiles.php? Group_id = 6208
Required documents: nasm-0.98.39.tar.bz2
Extract
CD nasm-0.98.38
./Configure -- prefix = C:/mingw
Make
Mkdir C:/mingw/man/Man1
Make install

8. Lame
Home: http://lame.sourceforge.net/download/download.html
Required files: lame3.96.1.tar.gz
Extract
CD lame-3.96.1
./Configure -- prefix = C:/mingw -- disable-shared -- disable-decoder
Make
Make install

9. XviD
Home: http://www.xvid.org/downloads.html
Files required: xvidcore-1.0.3.tar.bz2 (http://downloads.xvid.org/downloads)
The latest version 1.1beta of this software is running on my machine. It seems that the compatibility of the original version is a bit problematic. You should use the old version 1.0.3.
Extract
CD xvidcore-1.0.3/build/generic
./Configure -- prefix = C:/mingw -- disable-shared
Make
Make install
Mv c:/mingw/lib/xvidcore. a c:/mingw/lib/libxvidcore.

10. x264
Home: http://subversion.tigris.org/servlets/Proj...ist? Folderid = 91
Required documents: svn-win32-1.1.4.zip
Decompress the package and copy all the files in the \ bin folder to the C: \ mingw \ bin folder.

11. Live
: Http://www.live.com/liveMedia/public/
Required documents: live-latest.tar.gz
Extract
CD live
Genmakefiles mingw
Make

12. realcodecs

Download the file in the attachment (volume already exists) and decompress it to a path for backup.

So far, the configuration and installation of dependent software and library files are complete.

Realcodecs.part1.rar (351.56 K)Realcodecs.part2.rar (350.26 K) 4. Compile and install mplayer

1. Download the source code package

First go to The http://www.mplayerhq.hu/homepage/design7/dload.html to download mplayer source code package, according to your personal preferences, you can download the official release of the source code version, such as mplayer v1.0pre6a source, you can also download the daily update of CVS version.

Then go to the http://www4.mplayerhq.hu/homepage/design7/codecs.html to download the decoder package named Windows ALL.

2. Decompress both packages

3. Run the CD command to enter the mplayer source code directory.

4../configure -- Help

Note: If you perform this step, you can obtain additional./configure conditions supported by the Software. You can select one based on your own machine conditions.

Some of these conditions are supported by default, such as sse2 and 3 dnow! Such as automatic detection/support of instruction sets, support for real and Win32 media files, and support for streaming media. You can ignore them in additional conditions. (Sometimes, some conditions may not be able to be monitored. You can pay attention to the execution output after the./configure statement in the next step. It contains all the execution information of the condition. If you do not recognize it, You can manually specify it .)

5. The following is the./configure step. This is my configuration. You can change it as needed.

. /Configure -- prefix = D:/mplayer -- enable-win32 -- enable-real -- enable-live -- enable-DirectX -- enable-dshow -- With-codecsdir = D: /mplayer/codecs -- with-win32libdir = D:/mplayer/codecs -- With-reallibdir = D:/mplayer/realcodec -- With-livelibdir = D: /mplayer/codecs -- enable-static -- enable-largefiles -- disable-mencoder
Where:
-- Prefix = D:/mplayerr is the installation path of the custom mplayer.
-- With-codecsdir = D:/mplayer/codecs I decompress the downloaded/Windows-all-20050115 decoding package to D:/mplayer/codecs, this command specifies its path. (The Win32 below also points to this path)
-- With-reallibdir = D:/mplayer/realcodec do you remember the realcodecs we decompressed in step 1 above? Specify its path here.
-- With-livelibdir = D:/mplayer/live the path of the live file we compiled in step 1 above.
-- Enable-largefiles supports a single file larger than 2 GB-this is vital for HDTV enthusiasts.
-- Enable-DirectX and -- enable-dshow are actually "automatically monitored", but once I did not recognize them on my machine, I should write it down.
-- Enable-static is required. Pay attention to it.
-- Disable-mencoder: I can't use it anymore. It's disable.
Note: If you want to run the compiled mplayer.exe on different machines, you can add the -- enable-runtime-cpudetection option. If it is only used on your own machine and system, do not add this.

Note the output results after./configure. You may find the areas to be improved next time.

6. Make

If you have a CPU of less than 1.0g, you can take a nap later. It takes a long time.

7. make install

All right, all done. Go to D: \ mplayer. you can find mplayer.exe under the binfolder.

V. Use of mplayer

1. Command Line

The compiled mplayer.exe is a command line application. In fact, the official windows realse is also a command line version. This can be run in the Windows Command Prompt. Fortunately, the Windows Command Prompt supports drag, so we do not need to enter a single character.

Is the identifier of the mplayer.exe file. There is a space key between the mplayer.exe and the media file path. For detailed usage and control keys, refer to the official documentation mentioned above.

    2. graphical interface.
Software writers around the world have compiled a large number of guis for mplayer, and there are also a large number of Windows platforms. Here you can find their list: http://www.mplayerhq.hu/homepage/design7/projects.html

Among them, the outstanding ones are:

(1) winmplauncher (http://chameleon.gazellevillage.com /~ Twerp...mplauncher.html)

I have been using this, which is simple to use, powerful, and almost negligible in resource usage. The disadvantage is that there is no progress bar or broadcast control button .. Usage: Decompress the package, double-click winmplauncher.exe, and choose our mplayer.exeversions. After confirming, you can use the player as the frontend to use mplayer.exe to play the file.

(2) mplgui
Http://www.mplayerhq.hu/homepage/design7/projects.html)

This graphic interface has all functions, including skin, drag, progress bar, basic graphic control buttons, and list playback. But I found only one way to open the file -- drag, and there is no URL control. The usage is similar to the one above. I will not go into details.

(3) mplayerwin (http://www.chronix.org/projects/mplayerwin)

There are a lot of performance options, you can also.

(4) mplayer interface (http://home.freeuk.com/tom.nealon/mplayer.html)

In general, 1st, 3, and 4 are basically similar-simple GUI, but they are still the first to be more comprehensive.

(5) mpui (http://www-user.tu-chemnitz.de /~ Mfie/index. php? Software = mpui)

The best thing is to stay at the end. This graphic interface features the most comprehensive, but it also occupies the most resources. After downloading, you can only extract the following mpui.exeand autorun.infs to your mplayerdirectory, and double-click mpui.exe.

There are many other things that will not be listed one by one. You can try and select what you like.

It is a self-compiled mplayer that uses the winmplauncher interface to play screenshots of MMS streaming media. However, the image played by mplayer cannot be captured. Which of the following prawns knows how to capture the image? Thank you!Resource usage of the compiled version:

10 94kbps Xvid video (plug-in sub subtitles) connected to three GUI processes (in 9 ~ Between 21% ):

    Mplayer is still my favorite. The previous open-source project model is still brilliant today. Let's say that: May mplayer be well along the way!

Full text

  Note: The libavcodec of mplayer only supports Decoding of realvideo 1.0. For realvideo 2.0, 3.0, 4.0 decoding requires calling the Lib of RealPlayer -- that is, the significance of mplayer Compilation -- in fact, I did the same in Linux, however, the official documentation does not mention the problems in the mingw environment, but just mentions cygwin and mingw. I have already succeeded in this article, that is, the realcodec in this article.

(However, FFMPEG, the cute sub-project of mplayer, already supports realvideo2.0-this is more about patent issues than technical issues-who calls mplayer a European developer ?) Try again. Partition _ Partition ︿_︿

Article reference from: http://forums.mozine.org/index.php? Showtopic = 124 & pid = 753 & mode = threaded & show = & St = entry753

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.