Prepare your environment
VLC uses gcc, automake, autoconf and friends for compilation. Make sure they are up to date and usable for your system.
Get the source
If your are using the release, download source code and extract the archive and go into your VLC directory.
If you are using the Git version, start by bootstrapping your VLC.
cd /path/to/your/vlc/folder/ ./bootstrap
Get the 3rd party libs
Now you can start to configure VLC. Remember to first take a look at ./configure --help. Take a good look at that enormous list of options.
It is very important that you install and enable all the 3rd party libraries that you will be needing and let me tell you that that are a lot. If you don't install them you will end up with an application that well..... essentially doesn't do anything. See here for a complete list.
There are some very important dependencies: gettext (nls) for international support (required), libdvbpsi for mpeg files and streams support, libmad for mp3 decoding, libmpeg2 for mpeg 1 and 2 video support, ffmpeg for support of mpeg4 and many other types of video, liba52 for dolby (AC3) sound, alsa for proper audio output, xvideo for proper video output, wxWidgets (wxGTK) for proper GUI support and libdvd* for DVD support.
Be careful! Some of the libraries are better not to be installed (at all, beware of old installations) and should be linked to directly. These are mostly ffmpeg and liveMedia.
There are also some libraries that are no longer being maintained and which we advise not to use. These include the gtk, gnome and kde GUIs, the glide and mga modules.
There are a few ways to get those libs. You should use only one method at a time:
- Using your distribution or portage system, in order to get all the needed libs (this is the preferred way):
For example on Debian or Ubuntu:
# sudo apt-get build-dep vlc
- Using the contribs system in VLC's sources
% cd extras/contrib; % ./bootstrap; % make;
This should download and build a lot of those libs for you.
- Read the list, download them and build by hand.
You need to tweak your configure line.
./configure is used to check whether your system is able to compile VLC. Also you choose the functionalities of your build.
% ./configure --help
will show you the various options
Use --with-ffmpeg-tree=path/to/ffmpeg/source/tree and --with-livedotcom-path=path/to/livemedia/source/tree in connection with --enable-ffmpeg and --enable-livedotcom. For ffmpeg it is also important to tell VLC if you compiled ffmpeg with faac and/or lame support. Use the --with-ffmpeg-faac and --with-ffmpeg-mp3lame configure flags.
If you want to install VLC into another directory, run
% ./configure --prefix=/path/to/install/folder/
This is an example of a typical VLC configure line:
% ./configure --enable-x11 --enable-xvideo --disable-gtk --enable-sdl --enable-ffmpeg --with-ffmpeg-mp3lame --enable-mad --enable-libdvbpsi --enable-a52 --enable-libmpeg2 --enable-dvdnav --enable-faad --enable-vorbis --enable-ogg --enable-theora --enable-faac --enable-mkv --enable-freetype --enable-fribidi --enable-speex --enable-flac --enable-live555 --with-live555-tree=/usr/lib/live --enable-caca --enable-skins --enable-skins2 --enable-alsa --disable-kde --enable-qt --enable-wxwindows --enable-ncurses --enable-release
Here is another.
As root (type "su" to change to root account):
# make install
To remove files created during the compile (optional) type:
% make clean
Compiling on Cygwin may be broken from time to time.
Debian users who want to compile VLC should install the packages below. Note: If you just want to use VLC media player then simply install the package vlc (sudo apt-get install vlc) - the unstable version is normally very up-to-date (and stable is, er, stable ;-)
This HOWTO has been originally written by Derk-Jan Hartman.
It has been modified and updated by Jean-Baptiste Kempf.
It was spelled-checked and sudoed by materthron.