Tuesday, October 26, 2010

How to setup multimedia on CentOS-5

CentOS ships with basic sound support for audio content encoded with codecs for a variety of sound formats, including .wav and .ogg files. The alsa-utils and sox audio players are included for a cron or TUI environment; xmms is trivial to rebuild SRPMs. The popular full featured xmms player is omitted by the upstream, probably in light of the so-called Fraunhofer restrictions and non-free license requirements to address.
 


For those in jurisdictions not affected by such, the following procedures will describe how to setup multimedia support under CentOS 5. After completing the steps below, you should be able to play dvds on your computer. You'll also be able to view different media formats, for example Xvid, dvix, quicktime etc. You will also have mplayer integrated as a browser plugin which will allow you to view streaming video/audio content from within Firefox.
Some recommendations should be mentioned pertaining to the yum priorities plug-in. This will prevent accidentally overwriting packages from the base repositories. Also note the following needs to be performed as root user in a command line or terminal.


Please consider following the wiki document to assist in setting up the priorities plug-in, due to the fact that we are adding some third party repositories, described in the Priorities article.

Step 1: Add the RPMforge repo for your CentOS version (needed for majority of multimedia files)
 
See the RPMForge article on the wiki on how to do so.






Step 2: Add the Macromedia repo (optionally needed for flash)
 
rpm -Uhv http://linuxdownload.adobe.com/adobe-release/adobe-release-i386-1.0-1.noarch.rpm







 Flash is also installed from RPMforge below if you don't add Macromedia repository.

Step 3: Install multimedia applications (command line to install required packages)

 
The following steps will use the yum package manager to install all the binaries needed to have full multimedia support. Note there will be a lot of dependencies
 
yum install libdvdcss libdvdread libdvdplay libdvdnav lsdvd mplayerplug-in mplayer mplayer-gui compat-libstdc++-33 flash-plugin gstreamer-plugins-bad gstreamer-plugins-ugly gstreamer-ffmpeg libquicktime

Step 4: Installing w32Codecs (required for xvid and other proprietary formats)
 
wget www1.mplayerhq.hu/MPlayer/releases/codecs/mplayer-codecs-20061022-1.i386.rpm ; rpm -ivh mplayer-codecs-20061022-1.i386.rpm
wget www1.mplayerhq.hu/MPlayer/releases/codecs/mplayer-codecs-extra-20061022-1.i386.rpm; rpm -ivh mplayer-codecs-extra-20061022-1.i386.rpm

You should now have full multimedia and video support for most popular formats.
If you happen to have problems with playing video's (eg. the player crashes or you have no image), try to disable System > Preferences > Desktop Effects (Compiz) and see if that fixes your problems.

No comments:

Post a Comment