This commit is contained in:
gferg 2004-01-30 20:04:00 +00:00
parent 2f5717da33
commit 105b161273
1 changed files with 510 additions and 0 deletions

View File

@ -0,0 +1,510 @@
<?xml version="1.0"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
<!ENTITY howto "http://www.tldp.org/HOWTO/">
<!ENTITY mini-howto "http://www.tldp.org/HOWTO/mini/">
<!ENTITY home "http://www.catb.org/~esr/">
]>
<article id="index">
<articleinfo>
<title>Fedora Multimedia Installation HOWTO</title>
<author>
<firstname>Eric</firstname>
<othername>Steven</othername>
<surname>Raymond</surname>
<affiliation>
<orgname><ulink url="&home;">Thyrsus Enterprises</ulink></orgname>
</affiliation>
</author>
<revhistory>
<revision>
<revnumber>1.0</revnumber>
<date>2004-01-30</date>
<authorinitials>esr</authorinitials>
<revremark>
Initial release.
</revremark>
</revision>
</revhistory>
<abstract>
<para>How to get various proprietary and restricted multimedia Damned
Things (Flash, MP3, Java, mpeg, avi, Real Media, Windows Media) working
under Fedora Core using your normal package-management tools.</para>
</abstract>
</articleinfo>
<sect1 id="introduction"><title>Introduction</title>
<para>There are some Damned Things like enabling Java and Flash in Mozilla,
playing MP3 files, playing Quictime/AVI/RealMedia 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.</para>
<para>Good background information on souping up your Fedora system can also
be found at the <ulink url="http://fedoranews.org/">FedoraNEWS</ulink>
website. Mauriat Miranda's <ulink
url='http://www.mjmwired.net/resources/mjm-fedora-fc1.html'>Personal Fedora
Core 1 Installation Guide</ulink> is also useful.</para>
<para>The assumption that distinguishes this document from these other
sources is that you are as lazy as I am &mdash; 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.</para>
<para>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, but in order to ensure that
this HOWTO gets maximum distribution I have remained in compliance with it
here.</para>
<sect2 id="newversions"><title>New versions of this document</title>
<para>You can also view the latest version of this HOWTO on the World Wide
Web via the URL <ulink url="&howto;Fedora-Multimedia-Installation-HOWTO.html">
&howto;Fedora-Multimedia-Installation-HOWTO.html</ulink>.</para>
<para>Feel free to mail any comments about this HOWTO, or additions or bug
fixes, to Eric S. Raymond, <email>esr@snark.thyrsus.com</email>. 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.</para>
</sect2>
</sect1>
<sect1><title>Tools and Repositories</title>
<para>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:</para>
<variablelist>
<varlistentry>
<term>apt-get</term>
<listitem><para>Grandaddy of the network package installers. Originally
from Debian, later ported to RPM-based distributions. Not shipped with
Fedora Core, but useful to have around because some repositories don't
support the other tools.</para></listitem>
</varlistentry>
<varlistentry>
<term>yum</term>
<listitem><para>The Yellow Dog Update Manager, 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.</para></listitem>
</varlistentry>
<varlistentry>
<term>up2date</term>
<listitem><para>This is a shell around yum/apt (it can also
query a local directory on your hard drive). Most convenient of the
three.</para></listitem>
</varlistentry>
</variablelist>
<para>You also need to know about some repositories:</para>
<variablelist>
<varlistentry>
<term><ulink url="http://rpm.livna.org">rpm.livna.org</ulink></term>
<listitem><para>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 apt and yum.</para></listitem>
</varlistentry>
<varlistentry>
<term><ulink url="http://freshrpms.net/">FreshRPMs</ulink></term>
<listitem><para>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 apt and yum.</para></listitem>
</varlistentry>
<varlistentry>
<term><ulink url="http://macromedia.mplug.org/">http://macromedia.mplug.org/</ulink></term>
<listitem><para>The main source for packaged versions of Macromedia
Flash. Accessible via both apt and yum.</para></listitem>
</varlistentry>
<varlistentry>
<term><ulink url="http://dag.wieers.com/">http://dag.wieers.com/</ulink></term>
<listitem><para>The only place I've found pre-cooked Java and Java plugin
RPMs. Accessible via apt <emphasis>only</emphasis>; this is why you need
apt-get.</para></listitem>
</varlistentry>
</variablelist>
<para>To set up your tools, you need to do the following steps:</para>
<procedure>
<step>
<para>To enable up2date, add the following to
<filename>/etc/sysconfig/rhn/sources</filename>:</para>
<programlisting>
yum flash-plugin http://macromedia.mplug.org/apt/fedora/1
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
</programlisting>
<para>You might have to change <quote>1</quote> to the latest Fedora Core
version number, if that's 2 or more. After this, the command</para>
</step>
<step>
<para>To enable yum, add the following to
<filename>/etc/sysconfig/rhn/sources</filename>:</para>
<programlisting>
[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
[freshrpms]
name=Fedora Linux $releasever - $basearch - freshrpms
baseurl=http://ayo.freshrpms.net/fedora/linux/$releasever/$basearch/freshrpms
[flash-plugin]
name=Macromedia flash-plugin site
baseurl=http://macromedia.mplug.org/apt/fedora/$releasever
</programlisting>
<para>Also be sure to do this:</para>
<programlisting>
rpm --import http://rpm.livna.org/RPM-LIVNA-GPG-KEY
</programlisting>
</step>
<step>
<para>Install apt-get with the command <command>yum install apt</command>
run from root. You will get a version from FreshRPMs that points you at
FreshRPMS for apt fetches. Go to <filename>/etc/apt/sources.list</filename>
and comment out the freshrpms.net lines; you already have access to FreshRPMs
from up2date and yum, and leaving apt fetching enabled might increase your
odds of having problems with repository conflicts.</para>
</step>
<step>
<para>Add this line to your <filename>/etc/apt/sources.list</filename>:</para>
<programlisting>
rpm http://apt.sw.be redhat/fc1/en/i386 dag
</programlisting>
<para>This will give you access to Dag Wieers's repository.</para>
</step>
</procedure>
</sect1>
<sect1><title>The Multiple-Repository Problem</title>
<para>You have just set up yum access to three different repositories
and apt access to a fourth. 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.</para>
<para>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).</para>
<para>The FreshRPMs repository, Dag Wieers's site, and any other
<quote>outside</quote> 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:</para>
<orderedlist>
<listitem><para>List the Fedora and livna.org sites before other
outside sites, so they'll get checked first.</para></listitem>
<listitem><para>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.</para></listitem>
<listitem><para>Disable apt-get access to any site that you have yum or
up2date access to. This may help avoid database
inconsistencies</para></listitem>
</orderedlist>
</sect1>
<sect1><title>Software Installation</title>
<para>For a fast start after you have gone through the configuration
procedure described above, do this from root:</para>
<programlisting>
up2date flash-plugin xine xmms-mp3 lame
</programlisting>
<para>will install Flash, MP3, and mpeg/avi/DVD-reading capability
(including DeCSS for encrypted DVDs). If up2date aborts complaining
that RPMs are missing GPG signatures, you can do this, assuming you
trust your net connection is not being compromised by a man-in-the-middle
attack:</para>
<programlisting>
up2date --nosig flash-plugin xine xmms-mp3 lame
</programlisting>
<para>This won't give you Java or RealMedia; for that, you need to do a
little more dancing. What follows is information about how to install
individual multimedia packages, including Java.</para>
<sect2><title>Macromedia Flash</title>
<para>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 <ulink
url="http://macromedia.mplug.org/">http://macromedia.mplug.org/</ulink>.</para>
<para>With the up2date preparation described above, you can install
Flash by typing</para>
<programlisting>
up2date flash-plugin
</programlisting>
<para>at root.</para>
</sect2>
<sect2><title>MP3</title>
<para>Fedora won't ship MP3-capable software because the Fraunhofer
Institute's patent license terms are not compatible with the GPL.</para>
<para>Note: If your Fedora distribution is fresh out of the box, you will
probably have to make <filename>/dev/dsp</filename> be owned by
yourself before you can play any sounds at all.</para>
<para>Assuming you've got your yum configuration pointed at livna.org and
FreshRPMs, the command</para>
<programlisting>
up2date xmms-mp3 lame
</programlisting>
<para>should make
your XMMS and Audacity programs mp3-capable.</para>
<para>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.
Audacity always plugs in lame automatically.</para>
</sect2>
<sect2><title>Java</title>
<para>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.</para>
<para>Assuming your apt configuration points at Dag Wieers's repository,
the following commands will Java-enable your browser:</para>
<programlisting>
apt-get update
apt-get install jre
apt-get install mozilla-jre
</programlisting>
<para>You can test your Java plugin at Sun's <ulink
url="http:://www.java.sun.com/applets/">Applets</ulink> page. Note that
some of these applets (Escher and Starfield, when I checked) appear to be
broken. BouncingHeads makes a good test.</para>
</sect2>
<sect2><title>Local MPEG and AVI</title>
<para>MPEG (the format used on DVDs) is 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</para>
<programlisting>
up2date xine
</programlisting>
<para>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.</para>
<para>Test this on any DVD. Remember that you have to either link
<filename>/dev/dvd</filename> 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.</para>
<para>xine has an elaborate GUI of its own, but most of the guts of the
program are un a callable library and there are several other front ends
for it floating around (none of them shipped with FC1). One of these is
gzine, 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 <ulink
url='http://kaffeine.sourceforge.net/'>kaffeine</ulink> front end for
KDE. Both of these are carried at livna.org.</para>
<para>But the best of the front ends is probably totem, available from
livna.org. A nice clean interface that doesn't confuse the eye by trying
to look like expensive stereo equipment.</para>
</sect2>
<sect2><title>Streaming Web audio and video</title>
<para>Here are some test locations to try streaming audio and video clips
from: </para>
<itemizedlist>
<listitem><para>
<ulink url="http://www.digigami.com/cineweb/avi-test.html">AVI</ulink>
</para></listitem>
<listitem><para>
<ulink url="http://www.apple.com/quicktime/troubleshooting/">QuickTime</ulink>
</para></listitem>
<listitem><para>
<ulink url="http://www.vdat.com/techsupport/windowstest.asp">Windows Media</ulink>
</para></listitem>
<listitem><para>
<ulink url="ftp://ftp.tek.com/tv/test/streams/Element/index.html">MPEG</ulink>
</para></listitem>
<listitem><para>
<ulink url="http://www-306.ibm.com/webcasts/playertest/test_real.shtml">RealPlayer</ulink>
</para></listitem>
</itemizedlist>
<para>The Netcape folks have a <ulink
url="http://wp.netscape.com/plugins/manager.html">Plug-in Manager web
page</ulink> that's handy for checking which plugins you have available
and which MIME types they interpret (the <quote>Show Details</quote> link
below each plugin takes you to the associated MIME type list).</para>
<para>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.</para>
<sect3><title>Web audio streams via RealPlayer</title>
<para>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.</para>
<para>The <ulink url="http://cambuca.ldhs.cetuc.puc-rio.br/xine/">Daily
xine builds</ulink> 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.</para>
<para>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.</para>
</sect3>
<sect3><title>Web video streams via mplayer-plugin</title>
<para>The command</para>
<programlisting>
up2date mplayerplug-in
</programlisting>
<para>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 <quote>cache fill</quote> 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.</para>
<para>The failure pattern seems to finger mplayerplug-in, as mplayer
appears to handle these file types OK when they're local.</para>
</sect3>
<sect3><title>Web video streams via gxine</title>
<para>The command</para>
<programlisting>
up2date gxine
</programlisting>
<para>should also in theory give your Mozilla the ability to stream AVI,
QuickTime, Windows Media, and MPEG audio/video files throgh gzine. As of
January 2004 (xine-0.9.22, gxine-0.3.3, mozilla-1.4.1), this works even
less well than mplayerplug-in. </para>
<para>The failure pattern seems to finger the gxine plugin, as xine
handles its file types OK when they're local.</para>
</sect3>
<sect3><title>Web video streams via the experimental xine plugin</title>
<para>One potentially valuable bit on the <emphasis>Daily xine builds
site</emphasis> is the experimental xine plugin to display streamed video
through a xine window placed <emphasis>within</emphasis> 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.</para>
</sect3>
</sect2>
</sect1>
<sect1 id="license"><title>License and Copyright</title>
<para>Copyright (c) 2004, Eric S. Raymond.</para>
<para>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 <ulink
url="http://www.gnu.org/copyleft/fdl.html">www.gnu.org/copyleft/fdl.html</ulink>.</para>
</sect1>
</article>
<!--
The following sets edit modes for GNU EMACS
Local Variables:
fill-column:75
compile-command: "mail -s \"Fedora Multimedia Installation HOWTO update\" submit@en.tldp.org <Fedora-Multimedia-Installation-HOWTO.xml"
End:
-->