Tuesday, 24 March 2009

How-To: Compile and Install VLC 0.9.8 from Source in Debian Lenny


VLC (VideoLAN Client) is one of the most popular video players on Linux, together with players like SMPlayer or Kaffeine. It plays many audio and video formats (including Xvid, DivX, H.264, Theora, WMV, Real Video, Ogg, MP3, FLAC, APE, AC3, WAV) together with DVDs and DVD ISO images.

The version which comes included in the Debian Lenny repositories is 0.8.6h, which uses the wxWidgets kit and it is kind of outdated now. The latest release of VLC is 0.9.8a, which is now built in Qt 4 and includes several improvements over the 0.8.x series.

VLC 0.9.8a running in Debian Lenny

To compile this release from source you can follow the steps below:

1. Install the tools needed for compilation
As root, type:

apt-get install build-essential

build-essential is a meta package which includes tools like gcc or make, needed to compile source code.

2. Install the dependencies
The following command will install the development libraries which are needed for the compilation:

apt-get install libqt4-dev libpostproc-dev libavformat-dev libavcodec-dev libavutil-dev libmad0-dev liba52-0.7.4-dev libhal-dev libdbus-1-dev libfribidi-dev libgcrypt11-dev

3. Fetch the source tarball
Download the VLC 0.9.8a source tarball from here, then uncompress it:

tar -xjf vlc-0.9.8a.tar.bz2

4. Compile and install VLC
To compile VLC, just change the working directory to vlc-0.9.8a and issue the following commands:

./configure --disable-swscale
make
make install

The last one as root.

Configuration

You can also install VLC as normal user by specifying a prefix, i.e.:

./configure --prefix=/home/USER/usr/ --disable-swscale

In this case you can issue make install as normal user. Also make sure to include /home/USER/usr/bin in your $PATH.

7 comments:

Daniel Keane said...

Thanks for the guide.

I also needed to install the following libs: liba52-0.7.4-dev, libhal-dev, libdbus-1-dev, libfribidi-dev, libgcrypt11-dev.

Thanks

Craciun Dan said...

I probably had those installed at the time and did not notice they are needed. Thanks for sharing these, I think I'll add those libraries too.

Anonymous said...

Wouldn't it be sensible to make a .deb and install that instead?

Anonymous said...

I agree. It would make more sense to build a DEB. In fact, I already did.

See: http://forums.debian.net/viewtopic.php?t=37420

Anonymous said...

You can obtain a tarball of the unsigned DEBs that I built to install VLC 0.9.8 on Debian Lenny at:

http://files.filefront.com/VLC+Debian+Lennytargz/;13547163;/fileinfo.html

This is Free Software and comes with ABSOLUTELY NO WARRANTY.

I have done my best to produce a set of DEBs that will enable you to easily install VLC 0.9.8 on Debian Lenny. I have tested them on two different machines and I believe that they are safe, but I cannot not provide any guarantee that they will work for you. If these DEBs break your system, you get to keep the pieces.

Enjoy!

Loris said...

Hello,

I cannot access your VLC debs, Filefront says: File is Unavailable

Squeeze's and Sid's VLC versions now require libc6 >= 2.8 and lenny's version is 2.7. I guess backporting libc6 2.8 to lenny is nearly impossible, so I think its not possible anymore to build nice DEBS of VLC for Lenny as you did.

Could you please make them accessible again somewhere?

Thanks!

Loris said...

and of course I realized right after posting that you are not the one who posted the DEBs, so its not the right place for my previous comment!

so nevermind!