Hack16.Get MP3 Libraries for Red HatBased Distributions


Hack 16. Get MP3 Libraries for Red HatBased Distributions

Enable MP3 support on Red Hatbased distributions with a simple addition to yum.

Software licenses, particularly licenses for multimedia libraries, have always been a touchy point for Linux. There are a number of proprietary media formats out there competing for our eye and ear. Many of these media formats have restrictions in their licensing that require either the user or, more often, the developer of multimedia software to pay a licensing fee to use their library. One such media format is MP3.

Many people consider MP3 to be a "free" format simply because it doesn't have DRM functionality built-in but, in fact, the company Fraunhofer Gesellschaft owns a number of patents on parts of the technology that creates MP3s and requires that MP3 encoders and possibly MP3 decoders pay licensing fees. Most Linux distributions manage the MP3 encoder licensing simply by not including MP3 encoding libraries directly into their distribution. Instead you must download the encoder from a third-party source to limit the distribution's liability ([Hack #24] will provide more information about MP3 encoders under Linux). For the most part, Linux distributions have historically ignored the liability for shipping MP3 decoding librariesthat is, until Red Hat 8. Starting with this version, Red Hat dstopped shipping MP3 libraries with the OS (http://www.redhat.com/advice/speaks_80mm.html). As a result, if you use Red Hat or a derivative such as Fedora or CentOS, you will need to go through an additional step to install MP3 support.

To install MP3 support on Red Hatbased systems, you will first need to add a third-party package repository to your package manager. Although there are several repositories that provide the package you need, for this example, I use the Dag software repository (http://dag.wieers.com/home-made/apt) for everything.

The first step is to add the Dag GPG key to RPM's list of keys. To do this, open a console, become root, and type the following:

 # rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt 

2.5.1. Use Yum

The next step is to add the Dag repository. How you add the Dag repository depends on whether you use yum or up2date to install packages. Fedora and CentOSboth have Yum installed by default for upgrades, while RHEL uses up2date by default. If you use Yum for upgrades, you edit /etc/yum.conf. Below are lines to add to /etc/yum.conf for Fedora, CentOS, and RHEL (if yum is installed):

Add this line if you use Fedora:

 [dag] name=Dag RPM Repository for Fedora Core baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag gpgcheck=1 enabled=1 

Add this line if you use RHEL or CentOS:

 [dag] name=Dag RPM Repository for Red Hat Enterprise Linux and CentOS baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag gpgcheck=1 enabled=1 

Add this line for an older version of Red Hat Linux such as RH8.x and RH9.x:

 [dag] name=Dag RPM Repository for older Red Hat Linux baseurl=http://apt.sw.be/redhat/$releasever/en/$basearch/dagy gpgcheck=1 enabled=1 

After you have edited yum.conf, save your changes, update the list of yum packages, and then install the xmms-mp3 package to get MP3 support:

 # yum update    # yum install xmms-mp3 

2.5.2. Use up2date

If you use up2date for upgrades, then you must edit /etc/sysconfig/rhn/sources instead. For RHEL4 or CentOS4, add this line:

 yum dag http://apt.sw.be/redhat/el4/en/$ARCH/dag 

If you use RHEL3 or CentOS3, replace el4 in the above line with el3. If you use Fedora, add this line to /etc/sysconfig/rhn/sources:

 yum dag http://apt.sw.be/fedora/4/en/$ARCH/dag 

Replace 4 with 3, 2, or 1, if you use Fedora Core 3, Fedora Core 2, or Fedora Core 1, respectively.

Now you can install the xmms-mp3 package from up2date:

 # up2date xmms-mp3 




Linux Multimedia Hacks
Linux Multimedia Hacks
ISBN: 596100760
EAN: N/A
Year: 2005
Pages: 156

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net