# Fedora Multimedia Installation HOWTO

### Eric Steven Raymond

Thyrsus Enterprises

Revision History
Revision 1.2 | 2004-02-03 | Revised by: esr
Typo fixes.
Revision 1.1 | 2004-01-31 | Revised by: esr
Dag Wieers's repository is yum-enabled, so drop apt-get out of the picture. Add mozilla-acroread installation. Add some attack-lawyer repellant.
Revision 1.0 | 2004-01-30 | Revised by: esr
Initial release.

How to get various proprietary and restricted multimedia Damned Things (Flash, MP3, Java, MPEG, AVI, RealMedia, Windows Media, Adobe Acrobat) working under Fedora Core using your normal package-management tools. Includes Mozilla-plugin instructions.

# 1. Introduction

There are some Damned Things like enabling Java and Flash in Mozilla, playing MP3 files, playing Quicktime/AVI/RealMedia/Windows Media streams, and playing encrypted DVDs that the Fedora distro folks won't tell you how to do, either because they're afraid of being sued under the DMCA or for various other esthetic and political reasons.

This HOWTO collects the relevant information in one place. It is not a general multimedia-on-Linux HOWTO; if it were, there are hundreds of nifty tools and packages it would list (starting with the GIMP and all its kindred and forks and symbiotes). The packages we'll cover here are just the legal and political hot potatos, the stuff that threatens monopolies and worries lawyers.

Good background information on souping up your Fedora system can also be found at the FedoraNEWS website. Mauriat Miranda's Personal Fedora Core 1 Installation Guide is also useful. One assumption that distinguishes this document from these other sources is that you are as lazy as I am — you want to install your Damned Things (and, later, update them) with your normal package-management tools rather than having to go to special sites, download source tarballs, or execute unique build procedures.

Legal note: No source code or locations of source code of any software alleged to be covered by the DMCA is disclosed on this page, you will have to look on my personal website for that. The DMCA is a bad law rammed down our throats by fools and villains and the use of it to suppress free speech about software is a disgrace, but in order to ensure that this HOWTO gets maximum distribution I have remained in compliance with it here.

One reason I am doing this is that I think I'm a harder target for the attack lawyers than most hackers; public fame and a reputation for truth-telling are helpful here. If you are an attack lawyer, be warned that I invariably respond to attempts at intimidation by fighting back, that I am legally savvy and very good at working the press, and that I will exert all my considerable ability to make your and your client's name a public disgrace if you try to suppress my speech. You have been warned.

## 1.1. New versions of this document

You can also view the latest version of this HOWTO on the World Wide Web via the URL http://tldp.org/HOWTO/Fedora-Multimedia-Installation-HOWTO.html.

Feel free to mail any comments about this HOWTO, or additions or bug fixes, to Eric S. Raymond, `<esr@snark.thyrsus.com>`. But please don't ask me to troubleshoot your multimedia or plugin configuration problems; if you do, I'll just ignore you. Everything I know about this subject is already here.

# 2. Tools and Repositories

Modern Linuxes are rapidly moving towards a world in which physical media are used for OS installation only, with updates being fetched and installed by tools querying Internet repositories. You'll need to know a bit about three of these tools:

apt-get

  Grandaddy of the network package installers. Originally from Debian, later ported to RPM-based distributions. Not shipped with Fedora Core, but sometimes useful to have around because some repositories don't support the other tools. The procedures in this HOWTO no longer require you to use apt-get, but you should know it's there.

yum

  yim (the Yellow Dog Updater, Modified), comes installed with Fedora Core. It will help you download updates from the Fedora repository, and from other repositories that carry Damned Things that Fedora won't. I like it a bit better than apt-get (a s), as it seems to grab package list updates automatically that apt makes you do manually.

up2date

  This is a shell around yum/apt (it can also query a local directory on your hard drive). Most convenient of the three; watching it is informative.

You also need to know about some repositories:

rpm.livna.org

  A site, located outside the U.S. and beyond the reach of the DMCA, that is dedicated to providing Damned Things that Fedora Core won't carry. There is no official connection, and in fact the Fedora people won't mention livna in their web pages or documentation for fear of being slammed with a speech-suppressing lawsuit by the evil shitheads at the DVDCCA, but the livna people track what Fedora does very closely. Accessible via both yum and apt.

FreshRPMs

  Best known of the alternate-RPMs sites. Carries a lot of stuff that hasn't yet made it into Fedora Core, but also supports older Red Hat distros as well. The main source for apt-get. Accessible via both yum and apt. Unfortunately, it's known to have some serious library clashes with livna and I do not recommend mixing the two.

http://macromedia.mplug.org/

  The main source for packaged versions of Macromedia Flash. Accessible via both yum and apt.

http://dag.wieers.com/apt/

  The only place I've found pre-cooked Java and Java plugin RPMs. Accessible via both yum and apt.

To set up your tools, you need to do the following steps:

1. To enable up2date, add the following to `/etc/sysconfig/rhn/sources`:

       yum fedora-us-stable-fc1 http://download.fedora.us/fedora/fedora/1/i386/yum/stable
       yum fedora-us-testing-fc1 http://download.fedora.us/fedora/fedora/1/i386/yum/testing
       yum livna-stable-fc1 http://rpm.livna.org/fedora/1/i386/yum/stable
       yum flash-plugin http://macromedia.mplug.org/apt/fedora/1
       yum dag http://apt.sw.be/redhat/fc1/en/i386/dag

   You might have to change "1" to the latest Fedora Core version number, if that's 2 or more.

2. To enable yum, add the following to `/etc/yum.conf`:

       [livna-stable]
       name=Livna.org Fedora Compatible Packages (stable)
       baseurl= http://rpm.livna.org/fedora/$releasever/$basearch/yum/stable
       gpgcheck=1

       [livna-unstable]
       name=Livna.org Fedora Compatible Packages (unstable)
       baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/yum/unstable
       gpgcheck=1

       [livna-testing]
       name=Livna.org Fedora Compatible Packages (testing)
       baseurl=http://rpm.livna.org/fedora/$releasever/$basearch/yum/testing
       gpgcheck=1

       [flash-plugin]
       name=Macromedia flash-plugin site
       baseurl=http://macromedia.mplug.org/apt/fedora/$releasever

       [dag]
       name=Fedora Core 1 Dag Wieers' repository
       baseurl=http://apt.sw.be/redhat/fc$releasever/en/i386/dag

# 3. Security considerations and other risks

All the yum and up2date commands I give in this HOWTO have to be run from the root prompt so the packages they fetch can be installed in your system space. This means there is a risk that your system could be compromised by a Trojan Horse RPM, either one inserted in one of the repositories you query or one slipped to you by a man-in-the-middle attack getting between you and a repository.

To control the latter risk, many repositories cryptographically sign their RPMs. You need to have a local copy of each repository's public key in order to integrity-check incoming packages. Therefore, be sure to do this:

    rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY
    rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt

If you use freshrpms (which none of my recipes do, because I'm told you can get in trouble with library-version classes when mixing it with livna) you'll want to add this:

    rpm --import http://freshrpms.net/packages/RPM-GPG-KEY.txt

You already have the Fedora public key as part of your Fedora Core installation.

A long-term risk that you accept by using any of the packages in this HOWTO is that of becoming dependent on the whims of a proprietary software vendor. It isn't necessary to have that old-time Free Software religion to see that this is a problem. Some of the software we'll cover here (the Adobe Acrobat plugin is a good example) is distributed as closed-source freeware — which is all very well, but what happens if the vendor changes its mind in the future? You could be stranded.

It's unsafe to be dependent on proprietary software and proprietary formats. When you allow yourself to be dependent, you also harm others by helping vendors maintain an unhealthy monopoly lock on their market segment. So, if you must buy into these tools, please find some way to support open-source replacements — donate coding time or cash, or spend effort pressuring vendors to open up. Rip your CDs to Ogg Vorbis rather than MP3. Write a letter to your legislator urging repeal of the DMCA. The freedom you save will be your own.

# 4. The multiple-repository problem

You have just set up yum access to four different repositories. Before you go further, you need to know that mixing RPMs from multiple repositories can be a chancy business; sometimes they can conflict with each other, or have different and incompatible dependencies.

The livna.org people take particular pains to track what Fedora is doing, so you should be safe there. The MPLUG site is also pretty safe; they only supply one piece of software which depends mainly on the rather stable Mozilla plugin interface, and downloading an out-of-sync version of flash-plugin probably can't do anything worse than stop you being exposed to Flash animations (many people would actually consider this a feature).

The FreshRPMs repository, Dag Wieers's site, and any other "outside" sites are potential trouble. Their maintainers work hard at providing a useful service, but for various technical and political reasons they don't coordinate with Fedora as closely as one might wish. To avoid problems, I recommend the following precautions:

1. Installing or updating particular named packages with apt-get is OK, but don't do a general upgrade using it. Use yum or up2date instead. (None of the procedures in this HOWTO use apt-get.)

2. Disable apt-get access to any site that you have yum or up2date access to. This may help avoid database inconsistencies. (None of the procedures in this HOWTO use apt-get.)

# 5. Software Installation

For a fast start after you have gone through the configuration procedure described above, do this:

    up2date flash-plugin xmms-mp3 xine totem mozilla-j2re mozilla-acroread

will install Flash, MP3, mpeg/AVI/DVD-reading capability (including DeCSS for encrypted DVDs), and a better plugin for PDFs. If up2date aborts complaining that RPMs are missing GPG signatures, you can do the following, assuming you trust your net connection is not being compromised by a man-in-the-middle attack:

    up2date --nosig flash-plugin xmms-mp3 xine mozilla-j2re mozilla-acroread

This won't give you RealMedia; for that, you need to do a little more dancing. What follows is information about how to install individual multimedia packages, including Java.

## 5.1. Macromedia Flash

Fedora won't distribute from their site because Macromedia's license doesn't permit it, but there are no other legal barriers to using the RPMs at http://macromedia.mplug.org/.

With the up2date preparation described above, you can install Flash by typing:

    up2date flash-plugin

## 5.2. MP3

Fedora won't ship MP3-capable software because the Fraunhofer Institute's patent license terms are not compatible with the GPL.

Note: If your Fedora distribution is fresh out of the box, you will probably have to make `/dev/dsp` be owned by yourself before you can play any sounds at all.

Assuming you've got your yum configuration pointed at livna.org the command

    up2date xmms-mp3

should make your XMMS program mp3-capable.

Installing xmms-mp3 will probably install an ALSA library, which you can ignore if using a pre-2.6, non-ALSA configuration. To actually enable MP3 playing, you'll need to run xmms. Select Options > Preferences > Audio I/O Plugins from the menu; this will pop up a window listing plugins. Select "MPEG Layer 1/2/3 Placeholder Plugin" and uncheck [ ] Enable Plugin. With this placeholder gone, xmms will plug in xmms-mp3 automatically.

If you want simple MP3 sound editing, I'm a big fan of Audacity (but be aare that some newer Audacity releases, after about 9.1, have known problems with ALSA and with the AC97-compatible sound chips now built into many motherboards). The command

    up2date audacity

will grab and install both Audacity (a very nifty multi-format audio editor) and the lame library that it needs as a plugin to do MP3s. Audacity has no IP-law problems in itself; lame is affected by the Fraunhofer Institute patents.

## 5.3. Java

Java is downloadable and redistributable from Sun, but only for personal and not-for-profit use. Sun's Javs license is non-open-source, so Fedora and most other Linux distributions won't carry it.

Assuming your yum configuration points at Dag Wieers's repository, the following command will Java-enable your browser:

    yum install mozilla-j2re

You can test your Java plugin at Sun's Applets page. Note that some of these applets (Escher and Starfield, when I checked) appear to be broken. BouncingHeads makes a good test.

## 5.4. Adobe Acrobat

You may have noticed that PDF pages downloaded off the Web often display as blank pages in Mozilla, though they look fine when viewed locally with xpdf. I don't know why this is, but in several cases I've been told by the creator that they were made with Adobe Acrobat. It is therefore a good bet that Adobe's official Acrobat plugin will help. Install it with

    yum install mozilla-acroread

Adobe's Acrobat plugin is proprietary, so Fedora and other distributions won't carry it. But there is no known legal problem with the RPM.

## 5.5. Local MPEG and AVI

MPEG (the format used on DVDs) represents itself as an open standard, but most Linux distributions won't ship software that read it because of blocking patents held by MPEGLA. AVI and Apple QuickTime have proprietary codecs covered by patents, so most Linux distributions won't ship software that decodes them, either. But with the setup we've described, this command

    up2date xine

will install or update the xine player that can handle these formats. Doing this will also install a number of support libraries, including the libdvdcss plugin that the xine people won't talk about on their site because they are too frightened of the DVDCCA's attack lawyers.

Test this on any DVD. Remember that you have to either link `/dev/dvd` with your physical DVD device or go through xine's impenetrable configuration dialogue. Also remember that the physical device has to be readable by you.

xine has an elaborate GUI of its own, but most of the guts of the program are in a callable library and there are several other front ends for it floating around (none of them shipped with FC1). One of these is gxine, a Gnome front end which as of January 2004 doesn't have an active maintainer. Another (which I haven't seen but have been told good things about) is the kaffeine front end for KDE. Both of these are carried at livna.org. But the best of the front ends is probably totem, available from livna.org. This is a nice clean interface that doesn't confuse the eye by trying to look like expensive stereo equipment.

## 5.6. Streaming Web audio and video

Here are some test locations to try streaming audio and video clips from:

- AVI

- QuickTime

- Windows Media

- MPEG

- RealPlayer

The Netscape folks have a Plug-in Manager web page that's handy for checking which plugins you have available and which MIME types they interpret (the "Show Details" link below each plugin takes you to the associated MIME type list).

The rest of this section describes several almost complete failures, mainly so that you will know that they are not due to a misconfiguration on your part. Linux multimedia streaming is still very, very broken.

### 5.6.1. Web audio streams via RealPlayer

RealMedia uses a proprietary codec covered by patents, though RealNetworks ships source code of a reference implementation under a non-open-source license. Because this license is proprietary, most Linux distributions do not ship a RealPlayer client.

The Daily xine builds has potentially valuable bits on it. One of the good bits is a RealPlayer 9 RPM, something I have been unable to find in any apt or yum repository.

This works under Fedora, even though the Netscape plugin manager page doesn't detect when it's installed. You will have to fill out a small pop-up form the first time it runs; beware that the permission-to-spam-you button defaults to on and you must toggle it off. Because RealNetworks does not have a clean record when it comes to spam, I recommend giving them a bogus address just to be on the safe side. Images do not appear within the page, instead the plugin launches an external program in a separate window.

### 5.6.2. Web video streams via mplayer-plugin

The command

    up2date mplayerplug-in

should in theory give your Mozilla the ability to stream AVI, QuickTime, Windows Media, and MPEG audio/video files. As of January 2004 (mplayer-0.92, mplayerplug-in-1.0, mozilla-1.4.1), however, AVI and QuickTime don't work at all. Results vary from a hang through putting an unkillable blank window on the screen to crashing Mozilla. Windows Media works sometimes (watch for the legend "cache fill" and an increasing percentage in the display window before the video itself plays) but occasionally it crashes Mozilla. MPEG audio files load but don't play. MPEG video tests without audio seem to work.

The failure pattern seems to finger mplayerplug-in, as mplayer appears to handle these file types OK when they're local.

### 5.6.3. Web video streams via gxine

The command

    up2date gxine

should also in theory give your Mozilla the ability to stream AVI, QuickTime, Windows Media, and MPEG audio/video files throgh gxine. As of January 2004 (xine-0.9.22, gxine-0.3.3, mozilla-1.4.1), this works about as well as mplayerplug-in, which is to say not at all well. I've seen some success with MPEG files, but often with audio dropouts.

The failure pattern seems to finger the gxine plugin, as xine handles its file types OK when they're local.

### 5.6.4. Web video streams via the experimental xine plugin

One potentially valuable bit on the Daily xine builds site is the experimental xine plugin to display streamed video through a xine window placed within the browser frame. This is currently pre-release software, and I could not get it to load because of a xine library problem. Here's hoping it will work someday.

# 6. Other Approaches

To turn your Fedora Core 1 machine into a low-latency audio workstation, see Planet CCRMA. At present their repository is apt-get enabled but not yum-enabled. If you don't have apt-get,

    up2date apt

will fix that.

# 7. License and Copyright

Copyright (c) 2004, Eric S. Raymond.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is located at www.gnu.org/copyleft/fdl.html.

# 8. Acknowledgements

Miguel Freitas helped educate me about some of the techicalities of video formats. Dag Wieers contributed the solution to the Acrobat problem.