Saturday, 21 May 2011

Compile Xine (Video Player) on Linux from Sources

Download the following source tarballs
-
xine-lib-1.1.10.tar.bz2
- xine-ui-0.99.5.tar.gz
from the website http://xinehq.de/index.php/releases
(or)
using either wget utility. To use this utility

Open terminal and issue the following command.

wget http://prdownloads.sourceforge.net/xine/xine-ui-0.99.5.tar.gz
wget http://prdownloads.sourceforge.net/xine/xine-lib-1.1.10.tar.bz2

Above step will download a file called xine-ui-0.99.5.tar.gz to your directory from where you issued wget command

1. Let's assume you downloaded the source tarballs in a directory called /home//xine
where is the non-root user you are using for the Linux Operating System.

2. Issue the following command to uncompress the file for xine library
   bunzip2 -d
xine-lib-1.1.10.tar.bz2
This step will create a file called
xine-lib-1.1.10.tar
Again, issue

    tar -xvf xine-lib-1.1.10.tar
to extract the tar ball
3. Change xine-lib-1.1.10 directory where the tar ball is extracted by issuing cd
Eg.
cd xine-lib-1.1.10
Issue
./configure

If everything goes fine, denoted by all OK's , it would have created the appropriate Makefiles in the respective
subdirectories of the source.

Again issue the following command to compile the sources
make
the If the compilation steps goes fine, you need to change to the "root" user
by issuing

su -
(give root password here when prompted)

cd is present and issue
make install

This step will install the xine library (libxine.so.*) which contains the Xine Engine



Steps to compile the XINE-UI Frontend

Goto folder where you have copied the xine-ui-0.99.5.tar.gz

Issue
tar -zxvf xine-ui-0.99.5.tar.gz

This will create a directory called
xine-ui-0.99.5

Change to the above directory (xine-ui-0.99.5)

Issue
./configure

If everything goes well, you can again issue,
make
to compile the sources

If everything goes well, you could install the xine-ui by doing these steps.

- Again log in as root user (as you did for xine-lib) by issuing su -
and
cd /home//xine/xine-ui-0.99.5
make install

Now, you are ready to launch the xine video player, just log-in back as your regular
user by typing "exit" command
and then type

/usr/local/bin/xine

You could also use the following URL for getting the instructions on how to build xine
http://xinehq.de/index.php/faq#BUILDING

Steps to install the multi-media codes and libdvdcss rpm (for playing encryped dvd's)


vi ~/.xine/config
Add the following lines in blue

# path to Win32 codecs
# string, default: /usr/lib/codecs
decoder.external.win32_codecs_path:/usr/lib/win32

Login as root user (by using su - )
and create a directory like
mkdir -p /usr/lib/win32
cd /tmp
wget http://www4.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
bunzip2 -d essential-20071007.tar.bz2
tar -xvf essential-20071007.tar
cp essential-20071007/* /usr/lib/win32

Install the following rpm for playing encrypted DVD's

Download libdvdcss-1.2.9-1.1.fc3.rf.i386.rpm

rpm -ivh libdvdcss-1.2.9-1.1.fc3.rf.i386.rpm

Now you are ready to enjoy most of the multimedia formats like .mp3, .mp4, .wmv , .mov etc.etc

No need of any other movie player now !!!

To play any file test.wmv say,
xine test.wmv
from the command prompt

To watch DVD/VCD, lauch xine with
xine &
and click on the "DVD" button on the Xine User Interface.


Link to my other blogs