Difference between revisions of "UnixCompile"

From VideoLAN Wiki
Jump to navigation Jump to search
Line 1: Line 1:
Download source code and extract the archive and go into your VLC directory
+
==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==
 +
Start by [[GetTheSource| getting the source]], using FTP for releases, or using [[Subversion| SVN]] for development.
 +
 
 +
If your are using the release, download source code and extract the archive and go into your VLC directory.
 +
cd /path/to/your/vlc/folder/
 +
 
 +
If you are using the [[SVN]] version, start by debootstraping your VLC.
 
  cd /path/to/your/vlc/folder/
 
  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.
 +
 +
=== General info ===
 +
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 a thing.
 +
You can have the full list [[Contrib_Status|here]].
 +
 +
There are some very important dependancies. 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.
 +
 +
===Get'em===
 +
There are a few ways to get those libs:
 +
* Contribs
 +
  % cd extras/contrib;
 +
  % ./bootstrap;
 +
  % make;
 +
 +
This should download and build a lot of those libs for you.
 +
 +
* Using a debian like system, in order to get all the needed libs:
 +
# apt-get build-dep vlc;
 +
 +
* Read the [[Contrib_Status|list]], then and do it by hand.
 +
 +
== Configuration ==
 +
 +
You need to tweak your configure line.
 +
 
As with most compilations, you need to run ./configure to get information about your computer, so it can be compiled correctly.
 
As with most compilations, you need to run ./configure to get information about your computer, so it can be compiled correctly.
  ./[[configure]]
+
  ./configure
 +
 
 +
===ffmpeg ===
 +
Use --with-ffmpeg-tree=path/to/ffmpeg/source/tree and --with-livedotcom-path=path/to/livemedia/source/tree icw. --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.
 +
 
 +
=== Final configuration ===
 
If you want to install VLC into another directory, run
 
If you want to install VLC into another directory, run
 
  ./configure --prefix=/path/to/install/folder/
 
  ./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-dts --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-livedotcom --with-livedotcom-tree=/usr/lib/live --enable-caca --enable-skins --enable-skins2
 +
--enable-alsa --disable-kde --enable-qt --enable-wxwindows --enable-ncurses --enable-release
 +
 +
[[User:J-b#My VLC|Here]] is another.
 +
 +
== Compilation ==
 
Compile VLC:
 
Compile VLC:
  [[make]]
+
  % make
  
 
As root (type "su" to change to root account):
 
As root (type "su" to change to root account):
  make install
+
  # make install
  
 
To remove files created during the compile (optional) type:
 
To remove files created during the compile (optional) type:
  make clean
+
  % make clean
  
== SVN ==
 
If you download code using [[SVN]], then you need to additionally call
 
./[[bootstrap]]
 
before ./configure.
 
  
 
== Notes ==
 
== Notes ==
 
=== Cygwin ===
 
=== Cygwin ===
Compiling on [[Cygwin]] may be broken. It's possibly better to use 0.8.4a.
+
Compiling on [[W32CompileCygwin]] may be broken. It's possibly better to use 0.8.4a.
  
 
=== Debian ===
 
=== Debian ===
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 (apt-get install vlc) - the unstable version is normally very up-to-date (and stable is, er, stable ;-)
+
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 (apt-get install vlc) - the unstable version is normally very up-to-date (and stable is, er, stable ;-)
 
* [http://packages.debian.org/unstable/libdevel/libavcodec-dev libavcodec-dev]
 
* [http://packages.debian.org/unstable/libdevel/libavcodec-dev libavcodec-dev]
 
* [http://packages.debian.org/unstable/libdevel/libpostproc-dev libpostproc-dev]
 
* [http://packages.debian.org/unstable/libdevel/libpostproc-dev libpostproc-dev]
 
* [http://packages.debian.org/unstable/libdevel/libmpeg2-4-dev libmpeg2-4-dev]
 
* [http://packages.debian.org/unstable/libdevel/libmpeg2-4-dev libmpeg2-4-dev]
 +
 +
== Version ==
 +
This HOWTO has been originally written by [mailto:hartman_at_videolan_dot_org Derk-Jan Hartman].
 +
It has been modified and updated by [[User:J-b| Jean-Baptiste Kempf]]
  
 
== See also ==
 
== See also ==
* http://developers.videolan.org/vlc/nix-compile.html
 
 
* http://www.slacky.it/repository/slackware/slackware-11.0/multimedia/vlc/0.8.6a/src/vlc.SlackBuild
 
* http://www.slacky.it/repository/slackware/slackware-11.0/multimedia/vlc/0.8.6a/src/vlc.SlackBuild
 
[[Category:Building]]
 
[[Category:Building]]

Revision as of 23:00, 22 January 2007

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

Start by getting the source, using FTP for releases, or using SVN for development.

If your are using the release, download source code and extract the archive and go into your VLC directory.

cd /path/to/your/vlc/folder/

If you are using the SVN version, start by debootstraping 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.

General info

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 a thing. You can have the full list here.

There are some very important dependancies. 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.

Get'em

There are a few ways to get those libs:

  • Contribs
 % cd extras/contrib;
 % ./bootstrap;
 % make;

This should download and build a lot of those libs for you.

  • Using a debian like system, in order to get all the needed libs:
# apt-get build-dep vlc;
  • Read the list, then and do it by hand.

Configuration

You need to tweak your configure line.

As with most compilations, you need to run ./configure to get information about your computer, so it can be compiled correctly.

./configure

ffmpeg

Use --with-ffmpeg-tree=path/to/ffmpeg/source/tree and --with-livedotcom-path=path/to/livemedia/source/tree icw. --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.

Final configuration

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-dts --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-livedotcom --with-livedotcom-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.

Compilation

Compile VLC:

% make

As root (type "su" to change to root account):

# make install

To remove files created during the compile (optional) type:

% make clean


Notes

Cygwin

Compiling on W32CompileCygwin may be broken. It's possibly better to use 0.8.4a.

Debian

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 (apt-get install vlc) - the unstable version is normally very up-to-date (and stable is, er, stable ;-)

Version

This HOWTO has been originally written by Derk-Jan Hartman. It has been modified and updated by Jean-Baptiste Kempf

See also