summaryrefslogtreecommitdiffstats
path: root/README.rst
blob: 6c996012a25d151a989528f557cfce336db0d549 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
Overview
========

This is a collection of scripts to make downloading and building mpv, ffmpeg
and libass easier. ffmpeg and libass get special treatment, because they are
essential, and distribution packages are often too old or too broken.

See below for instructions for building Debian packages.

If you are running Mac OSX and using homebrew we provide homebrew-mpv_, an up
to date formula that compiles mpv with sensible dependencies and defaults for
OSX.

Instructions
============

Make sure git is installed. E.g. on Debian or Ubuntu:

    apt-get install git

Also check that the dependencies listed at the end of this file are
installed.

Checkout the build repo:

    git clone https://github.com/mpv-player/mpv-build.git

    cd mpv-build

Get the ffmpeg, libass and mpv sources with the following command:

    ./update

(This is always needed before doing the first build after the initial checkout,
and can be used to update ffmpeg/libass/mpv later.)

Build mpv and ffmpeg/libass with:

    make clean                        # sometimes needed to build successfully

    make

Install mpv with:

    sudo make install

Or if you don't want debugging symbols (smaller binaries):

    sudo make install-strip

mpv doesn't need to be installed. The binary ./mpv/mpv can be used as-is. Note
that libass and ffmpeg will be statically linked with mpv when using the
provided scripts, and no ffmpeg or libass libraries are/need to be installed.

Dependencies
============

Essential dependencies (incomplete list):

- gcc or clang, yasm, git
- X development headers (xlib, X extensions, vdpau, GL, Xv, ...)
- Audio output development headers (libasound, pulseaudio)
- fribidi, freetype, fontconfig development headers (for libass)
- libjpeg
- libquvi if you want to play Youtube videos directly
- libx264 if you want to use encoding (you have to add --enable-libx264 to
  scripts/ffmpeg-config, because ffmpeg doesn't autodetect this library)

Note: most dependencies are optional and autodetected. If they're missing,
these features will be disabled silently. This includes some dependencies
which could be considered essential.

Installing dependencies on Debian or Ubuntu
===========================================

On Debian or Ubuntu systems, you can try to run this command in the
mpv-build directory to install most of the required dependencies:

    sudo apt-get install devscripts

    mk-build-deps -s sudo -ir

This will generate and install a dummy package with the required
dependencies. (mk-build-deps is part of devscripts.)

If you don't want to use sudo, you can also try:

    mk-build-deps

    dpkg -i mpv-build-deps_1.0_all.deb

dpkg -i will require root rights of course.

Building a Debian package
=========================

You can build a full mpv Debian package with the following command:

    debuild -uc -us -b -j4

The .deb file will be created in the parent directory. (4 is the number
of jobs running in parallel - you can change it.)

Forcing master versions of all parts
====================================

The following command can be used to delete all local changes, and to checkout
the current master versions for all parts (libass, ffmpeg, mpv, as well as
mpv-build itself):

    sh ./force-head

All local modifications are overwritten (including changes to the scripts),
and git master versions are checked out. Breakages/bugs are to be expected,
because these are untested bleeding-edge development versions of the code.

Use on your own risk.

Contact
=======

You can find us on IRC in ``#mpv-player`` on ``irc.freenode.net``

Report bugs to the `issues tracker`_ provided by GitHub to send us bug
reports or feature requests.

.. _issues tracker: https://github.com/mpv-player/mpv/issues
.. _homebrew-mpv: https://github.com/mpv-player/homebrew-mpv