Fedora Multimedia Installation HOWTO

Eric Steven Raymond

Revision History
Revision 5.12006-03-25Revised by: esr
Simplified and corrected some FC5 instructions.
Revision 5.02006-03-21Revised by: esr
Update for Fedora Core 5. On the one hand, we can get almost everything from livna now, which simplifies life. On the other hand, Totem and Xine are both completely broken.
Revision 4.02005-10-09Revised by: esr
Update for Fedora Core 4. The fedora.us repositories have become Fedora Extras. Adobe Acrobat plugin no longer seems to be necessary, xpdf and evince must have gotten better.
Revision 3.02004-11-07Revised by: esr
Update for Fedora Core 3.
Revision 2.22004-09-07Revised by: esr
Corrections for 2.6.8 kernel and Mozilla 1.7.
Revision 2.12004-08-03Revised by: esr
RealPlayer 10 is out in open source. This changes some things.
Revision 2.02004-07-14Revised by: esr
Updated for FC2. Removed up2date methods, as FC2 update seems to be broken.
Revision 1.22004-02-03Revised by: esr
Typo fixes.
Revision 1.12004-01-31Revised 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.02004-01-30Revised by: esr
Initial release.

How to get various proprietary and restricted multimedia Damned Things (AVI, Flash, Java, MP3, MPEG, QuickTime, RealMedia, Windows Media) working under Fedora Core using your normal package-management tools. Includes Firefox-plugin instructions. Now with coverage of both 32- and 64-bit Intel-architecture systems.

Unfortunately, the news in FC5 is almost all bad. Totem and Xine are both completely broken.


Table of Contents
1. Introduction
1.1. New versions of this document
2. Packages, Tools and Repositories
3. Security considerations and other risks
4. Macromedia Flash
5. gstreamer and ffmpeg support
6. MP3
7. Java
8. RealAudio and RealVideo
9. MPEG, QuickTime, AVI, and DVDs
10. Test pages for Web streaming
11. Related Resources
12. License and Copyright
13. Acknowledgements

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 potatoes, 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 and the Unofficial Fedora FAQ. 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 toolswith an absolute minimum of going to special sites, download source tarballs, or executing 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 believe 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, . 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. Packages, 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 some of these tools and the repositories they get binary packages from.

Fedora packages are called RPMs. Each can be installed or uninstalled as a unit, and provides some application together with any support files it needs. Some packages depend on others — an application, for example, may require specific support libraries. Part of the job a package installation program does is to chase down those dependencies and install them before installing the main package.

Unfortunately, RPMs can clash with each other — for example, by wanting to put incompatible versions of a command or support file in place. A repository maintainer's main job is to make sure that (a) the RPMs in his collection don't clash with each other, and (b) all their dependencies are resolved either within his repository or some 'base' repository that he advertises depending on.

There is one base repository for Fedora Linux maintained by the Fedora project itself, and about half a dozen extension repositories that depend on that base. These extension or "third-party" repositories are where you will get your Damned Things; they are run by volunteers independent of the Fedora Project, often located in places outside the U.S. where they will be less exposed to predatory lawyers.

The extension repositories form cliques defined by who is compatible with who else. There is a lot of turbulence and politics around these cliques which, as an end user, you can largely ignore. The only reason for you to know about this at all is that you have to choose one clique in order to avoid clashes. In early 2006 there are, essentially, three cliques to choose from, as I'll describe later on.

First I need to introduce you to the tools you will need to fetch your Damned Things:

yum

yum (the Yellow Dog Updater, Modified), is a command-line tool that 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.

pirut

This is a GUI wrapper around yum introduced in FC5. It's a slightly kinder, gentler way to use yum.

You also need to know about some repositories. Each is a collection of RPMs, divided into subcollections called 'channels'.

fedora.redhat.com

This is the basic Fedora repository. The RPMs in the 'stable' and 'updates' channels of this repo are what go on a Fedora CD-ROM. Historical note for readers of previous version of this document: the Red Hat repo now includes, in its 'extras' part, equivalents of the stuff that used to be at fedora.us.

RPMForge

A clique formed by all the major third-party RPM sites except livna and ATrpms. These packages are intended to extend the Fedora Core and Extras repositories, and the maintainers are careful not to clash with the Fedora repositories. The consortium includes freshrpms, Dag Wieers's repository, the Dries repository, NewRPMs and PlanetCCRMA. They're working towards merging their repositories, and already build with common source RPMS. Unfortunately, the RPMForge collection is known to have some serious clashes with livna and ATRPMs.

rpm.livna.org

A site, located outside the U.S. and beyond the reach of the DMCA, that specifically dedicated to providing Damned Things that Fedora Core and Extras 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 scumweasels at the DVDCCA, but the livna people track what Fedora does very closely. The livna repositories depend on the Fedora repositories. They clash with the RPMForge repositories.

http://macromedia.mplug.org/

The main source for packaged versions of Macromedia Flash. It's safe to use this RPM with any of the extension-repository cliques.

The three cliques I referred to earlier are RPMForge, livna (all by itself) and ATrpms (all by itself). With FC5 you can get all the multimedia support you theoretically need from livna, rather than using RPMforge as I advised in previous versions of this FAQ. I say 'theoretically' because, in fact, almost none of the video stuff actually works in FC5.

To enable access to livna, do this:


rpm -ivh http://rpm.livna.org/livna-release-5.rpm

This should drop a yum repo configuration file in /etc/yum.repos.d/


3. Security considerations and other risks

All the yum 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; current versions of yum will dowmload one for you. This could be defeated by a man-in-the-middle attack spoofing the repo site and slipping you bogus keys as you set up your configuration; while this possibility is extremely unlikely, you should be aware of it.

A long-term risk that you accept by using the proprietary code referenced 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 Sun Java JDK 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. 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/.

Follow those directions, dropping the Macromedia repository configuration in your /etc/yum.repos.d/ directory. It should look much like this:


[macromedia]
name=Macromedia for i386 Linux
baseurl=http://macromedia.mplug.org/rpm/
enabled=1
gpgcheck=1
gpgkey=http://macromedia.mplug.org/FEDORA-GPG-KEY

Then do the installation:


yum install flash-plugin

Installing this RPM should put the plugin in your Firefox plugin directories (and Mozilla's as well).

You can test your flash support at the official test page. Note that you may have to kill and restart your browser after installing the plugin; I tried the Flash test immediately and it crashed Firefox.

There's a gotcha: The Macromedia plugin works only for 32-bit Intel boxes. It completely fails on an x86_64 running in 64-bit mode (in general, 32-bit plugins won't work in a 64-bit browser). Currently there are three projects addressung this problem:

I think the right stopgap on 64-bit systems might be to build and install gplflash1, but as of 21 Mar 2006 I can't because it needs an X header file I cannot yet find the right RPM for. This may change as the dust settles around FC5.


5. gstreamer and ffmpeg support

FC5 has adopted a project called gstreamer as a common back end for handling video and audio files. Totem, the standalone multimedia player shipped with FC5, uses gstreamer; so does your Firefox plugin, mozplugger.

gstreamer itself uses plugins, one for each multimedia format it supports. Plugins for open-source formats such as Ogg Vorbis ship with FC5. Plugins for proprietary formats don't. To get these, do this:


yum install gstreamer-plugins-ugly ffmpeg

This may also install mpeg2dec, libsidplay, libdvdread, faac, faad2, imlib, and gsm.

The 'ugly' plugins enable gstreamer to handle MP3, MPEG2, and SID formats. The SID format is a historical relic from the Commodore 64. MP3 is the most popular audio format. MPEG2 is an audio/video format used in DVDs.

The ffmpeg library can encode or decode MPEG1 audio and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash.


6. MP3

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

The default music player in FC5 is Rhythmbox. I struggled with Rhythmbox for several hours, but despite its pretty face I found it unusable. It ignores track numbers — or, at least, is not as smart at parsing them out of filenames as xmms is, and doesn't document its import rules anywhere. Trying to beat it into playing MP3s is a nightmare so scarifying that at one point I thought I was going to have to reinstall my entire Linux system just to get the ability to play Oggs back, because I couldn't figure out what piece of undocumented application state had gotten scrambled or how to clear it. The documentation is in general a bad joke — glossy, superficial, and with no useful content about troubleshooting problems. The xmms player may not be as featureful or as nice-looking, but it works better.

To install xmms and make it MP3-capable, start by doing this:


yum install xmms xmms-mp3

To actually enable MP3 playing, you'll need to run xmms and change its configuration. 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. Kill xmms and restart.

On my x86_64 box I encountered the problem that xmms would only play sound as root, exiting immediately when run from a non-root account. There are a number of mundane causes for this; check the permissions on your sound devices. There is one exotic problem which I tripped over; you may have to tell your sound module to grab low-memory DMA buffers and not let go of them.

To enable MP3 streaming through Firefox or Mozilla, install the gstreamer-ugly plugin and ffmpeg as described below. MP3 streams will play through xmms, podcasts through Totem.


7. Java

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

Fedora Core 5 includes an open-source Java implementation for programmers called gcj. You only need to take special action if you want to enable applets in your browser. The Unofficial Fedora FAQ has detailed instructions on how to do this.

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.

You might also want to copy the RPMS you built out of /usr/src/redhat/RPMS/ so you'll have then handy for reinstalls.


8. RealAudio and RealVideo

I don't known anywhere this is accessible via yum, so you'll have to download and install it by hand. Do this first:


yum install compat-libstdc++-33

Then download the RealPlayer10GOLD RPM and install it.

On 32-bit Fedora Core you may need to delete HelixPlayer with

rpm -e HelixPlayer
before the 10GOLD version will work. x86_64 FC5 does not include HelixPlayer.


9. MPEG, QuickTime, AVI, and DVDs

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.

FC5 ships the GNOME project's official video player, totem. Unfortunately, it won't play DVDs. The symptom is an error popup that says "Totem was not able to play this disc. No reason", but the problem is actually a known bug in gstreamer-0.10.

Unfortunately, the alternate front end xine is even more broken. It can be installed this way:


yum install xine xine-lib libdvdcss

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.

The 0.99.4 xine release displays an all-white window and does nothing (at least on my plain-vanilla Opteron machine using a nVidia GeForce2).


10. Test pages for Web streaming

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


11. Related Resources

There is a good walkthrough of a Fedora Core 5 installation procedure, covering some of the same ground as this document, here.

There is a useful Fedora Core 4 Tips and Tricks page.

There is a good tutotial on Firefox multimedia plugins.


12. License and Copyright

© 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.


13. Acknowledgements

Miguel Freitas helped educate me about some of the techicalities of video formats.

mirror server hosted at Truenetwork, Russian Federation.