Update mplayer submodule
[mplayer-build.git] / README
blobbbadf7c9b16aa40863262e45830b857216c49ec4
1 This repository contains scripts to help build mplayer2 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 Libav
6 and libass and then build the player statically linked against those.
8 If you downloaded the tarball version of the repository then most
9 of the sections below do not apply. In that case see only the
10 following sections:
11 "Prerequisites"
12 "Basic use" (leave out the "./init" part, the tarball does not need that)
13 "Building"
14 "Giving configure options to mplayer2 and Libav".
16 CHANGES FROM EARLIER VERSIONS OF THIS FILE (2011-08-30):
17 Changed mentions of FFmpeg-mt/FFmpeg to Libav and removed the separate
18 documentation of threading. Libav has the threading support developed in
19 FFmpeg-mt, and mplayer2 uses a number of threads equal to CPU cores by
20 default.
21 (2010-12-20):
22 FFmpeg-mt is now enabled by default in new installs (updating doesn't
23 change selection), player selects thread count automatically
27 Prerequisites
29 This section lists some system packages you need to have installed in
30 addition to a basic build environment.
32 The libass build system uses autotool packages (autoconf, automake, libtool).
33 If you compile from git you must have those installed; tarball exports
34 contain pregenerated files and those are not necessary.
35 Libav needs the Yasm assembler.
37 Compiling with full features requires development files for several
38 external libraries. Below is a list of some important requirements.
39 Libraries specific to particular video output methods
40 (you'll want at least one of VDPAU, GL or Xv):
41  - libvdpau (for VDPAU output, best choice for NVIDIA cards)
42  - libGL (OpenGL output)
43  - libXv (XVideo output)
44 general:
45  - libasound   (ALSA audio output)
46  - various general X development libraries
47  - libfreetype
48  - libfontconfig
52 Basic use
54 Assuming you have required system components installed, the following
55 commands should be enough to build the player:
56 $ ./init --shallow
57 $ make -j 6
58 $ make install
59 You can also run it like "mplayer/mplayer some_file.mkv" without doing
60 the last install step.
61 For more details see below.
65 Initializing the repo
67 First you need to download the actual sources, using either:
69 ./init
71 ./init --shallow
73 The latter form creates only partial git repositories which do not
74 have full history data. This reduces the amount of data you need to
75 download but reduces the development-related functionality of the
76 repositories. If you only want to simply build mplayer2 it should
77 usually be enough.
81 Building
83 You can build mplayer2 with just 'make'. There is no separate
84 configure step because the mplayer2 configure depends on included
85 library sources being configured _and_ built first. If you want to
86 give configuration options see the section below.
90 Giving configure options to mplayer2 and Libav
92 You can specify extra options that will be passed to mplayer2's
93 configure script by placing them in a file called "mplayer_options" in
94 this directory. There's a corresponding file called "libav_options"
95 for Libav. Options in file "common_options" will be passed to both
96 mplayer2 and Libav; this mainly makes sense for generic options like
97 "-cc=gcc-4.4'. Place each option on its own line without any quoting.
101 Helper scripts included in this repo:
103 ./init
104 Prepare the repository by downloading actual sources. You need to run
105 this at least once before you can build anything. With the --shallow
106 argument creates shallow git repositories that require less bandwidth
107 to download.
109 ./update
110 Download the latest version of the sources.
112 ./clean
113 Remove all generated or extra files from build directories and
114 restore them to their original state. Running this between builds is
115 probably a good idea.