Update mplayer submodule (2.0 rc2)
[mplayer-build.git] / README
blobd35813d95bd93ecd882b76e4381b945371193c89
1 This repository contains scripts to help build MPlayer together with
2 some dependencies that many platforms will not have a new enough
3 version of. This makes it easy to compile the player against
4 up-to-date  library versions without needing to manually compile the
5 libraries first. More specifically, the scripts first compile FFmpeg
6 libraries and libass and then build the player statically linked
7 against those.
9 If you downloaded the tarball version of the repository then most
10 of the sections below do not apply. In that case see only the
11 following sections:
12 "Prerequisites"
13 "Basic use" (leave out the "./init" part, the tarball does not need that)
14 "Building"
15 "Giving configure options to MPlayer and FFmpeg".
18 CHANGES FROM EARLIER VERSIONS OF THIS FILE (2010-12-20):
19 FFmpeg-mt is now enabled by default in new installs (updating doesn't
20 change selection), player selects thread count automatically
24 Prerequisites
26 This section lists some system packages you need to have installed in
27 addition to a basic build environment.
29 The libass build system requires autotool packages (autoconf,
30 automake, libtool).
31 FFmpeg needs the Yasm assembler.
33 Compiling with full features requires development files for several
34 external libraries. Below is a list of some important requirements.
35 Libraries specific to particular video output methods
36 (you'll want at least one of VDPAU, GL or Xv):
37  - libvdpau (for VDPAU output, best choice for NVIDIA cards)
38  - libGL (OpenGL output)
39  - libXv (XVideo output)
40 general:
41  - libasound   (ALSA audio output)
42  - various general X development libraries
43  - libfreetype
44  - libfontconfig
48 Basic use
50 Assuming you have required system components installed, the following
51 commands should be enough to build the player:
52 $ ./init --shallow
53 $ make -j 6
54 $ make install
55 You can also run it like "mplayer/mplayer some_file.mkv" without doing
56 the last install step.
57 For more details see below.
61 Initializing the repo
63 First you need to download the actual sources, using either:
65 ./init
67 ./init --shallow
69 The latter form creates only partial git repositories which do not
70 have full history data. This reduces the amount of data you need to
71 download but reduces the development-related functionality of the
72 repositories. If you only want to simply build MPlayer it should
73 usually be enough.
77 Building
79 You can build MPlayer with just 'make'. There is no separate
80 configure step because the MPlayer configure depends on included
81 library sources being configured _and_ built first. If you want to
82 give configuration options see the section below.
86 Enabling or disabling FFmpeg-mt
88 FFmpeg-mt is version of FFmpeg with improved threading support, useful
89 for things like high-bitrate H264. It allows significantly faster
90 decoding on multicore machines. It is now enabled by default.
91 You can disable compilation with FFmpeg-mt decoders using "./disable-mt"
92 and enable it with "./enable-mt". By default MPlayer will try to determine
93 the number of cores available on your machine and use that as the number
94 of decoding threads. If you want to override that and use a different
95 number of threads you can use the "-lavdopts threads=N" option,
96 where N is the number of threads you want to use (a value equal to
97 the number of available cores is normally good).
101 Giving configure options to MPlayer and FFmpeg
103 You can specify extra options that will be passed to MPlayer's
104 configure script by placing them in a file called "mplayer_options" in
105 this directory. There's a corresponding file called "ffmpeg_options"
106 for FFmpeg. Options in file "common_options" will be passed to both
107 MPlayer and FFmpeg; this mainly makes sense for generic options like
108 "-cc=gcc-4.4'. Place each option on its own line without any quoting.
112 Helper scripts included in this repo:
114 ./init
115 Prepare the repository by downloading actual sources. You need to run
116 this at least once before you can build anything. With the --shallow
117 argument creates shallow git repositories that require less bandwidth
118 to download.
120 ./update
121 Download the latest version of the sources.
123 ./clean
124 Remove all generated or extra files from build directories and
125 restore them to their original state. Running this between builds is
126 probably a good idea.
128 ./enable-mt
129 ./disable-mt
130 Enable or disable building with FFmpeg-mt support. Can be run before
131 first ./init or later to switch support on and off. The files
132 'ffmpeg-mt-enabled' and 'ffmpeg-mt-disabled' are created or deleted to
133 indicate whether -mt support is currently active. Note that if you
134 build MPlayer and then switch -mt support on or off, a rebuild is
135 likely to fail unless you remember to run ./clean before the new
136 build.