Update mplayer submodule
[mplayer-build.git] / README
blob6f5f1ce750c412c6f4ae7032cb04aa8c18db164d
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 uses autotool packages (autoconf, automake, libtool).
30 If you compile from git you must have those installed; tarball exports
31 contain pregenerated files and those are not necessary.
32 FFmpeg needs the Yasm assembler.
34 Compiling with full features requires development files for several
35 external libraries. Below is a list of some important requirements.
36 Libraries specific to particular video output methods
37 (you'll want at least one of VDPAU, GL or Xv):
38  - libvdpau (for VDPAU output, best choice for NVIDIA cards)
39  - libGL (OpenGL output)
40  - libXv (XVideo output)
41 general:
42  - libasound   (ALSA audio output)
43  - various general X development libraries
44  - libfreetype
45  - libfontconfig
49 Basic use
51 Assuming you have required system components installed, the following
52 commands should be enough to build the player:
53 $ ./init --shallow
54 $ make -j 6
55 $ make install
56 You can also run it like "mplayer/mplayer some_file.mkv" without doing
57 the last install step.
58 For more details see below.
62 Initializing the repo
64 First you need to download the actual sources, using either:
66 ./init
68 ./init --shallow
70 The latter form creates only partial git repositories which do not
71 have full history data. This reduces the amount of data you need to
72 download but reduces the development-related functionality of the
73 repositories. If you only want to simply build MPlayer it should
74 usually be enough.
78 Building
80 You can build MPlayer with just 'make'. There is no separate
81 configure step because the MPlayer configure depends on included
82 library sources being configured _and_ built first. If you want to
83 give configuration options see the section below.
87 Enabling or disabling FFmpeg-mt
89 FFmpeg-mt is version of FFmpeg with improved threading support, useful
90 for things like high-bitrate H264. It allows significantly faster
91 decoding on multicore machines. It is now enabled by default.
92 You can disable compilation with FFmpeg-mt decoders using "./disable-mt"
93 and enable it with "./enable-mt". By default MPlayer will try to determine
94 the number of cores available on your machine and use that as the number
95 of decoding threads. If you want to override that and use a different
96 number of threads you can use the "-lavdopts threads=N" option,
97 where N is the number of threads you want to use (a value equal to
98 the number of available cores is normally good).
102 Giving configure options to MPlayer and FFmpeg
104 You can specify extra options that will be passed to MPlayer's
105 configure script by placing them in a file called "mplayer_options" in
106 this directory. There's a corresponding file called "ffmpeg_options"
107 for FFmpeg. Options in file "common_options" will be passed to both
108 MPlayer and FFmpeg; this mainly makes sense for generic options like
109 "-cc=gcc-4.4'. Place each option on its own line without any quoting.
113 Helper scripts included in this repo:
115 ./init
116 Prepare the repository by downloading actual sources. You need to run
117 this at least once before you can build anything. With the --shallow
118 argument creates shallow git repositories that require less bandwidth
119 to download.
121 ./update
122 Download the latest version of the sources.
124 ./clean
125 Remove all generated or extra files from build directories and
126 restore them to their original state. Running this between builds is
127 probably a good idea.
129 ./enable-mt
130 ./disable-mt
131 Enable or disable building with FFmpeg-mt support. Can be run before
132 first ./init or later to switch support on and off. The files
133 'ffmpeg-mt-enabled' and 'ffmpeg-mt-disabled' are created or deleted to
134 indicate whether -mt support is currently active. Note that if you
135 build MPlayer and then switch -mt support on or off, a rebuild is
136 likely to fail unless you remember to run ./clean before the new
137 build.