Packages distributed in officious repositories are not supported by Debian, and probably not by Ubuntu either. Please don't file bugs caused by the use of third party pacakges. Thanks.
Purpose
This article describes how to add support to a Ubuntu system for (1) non-Free multimedia formats and (2) Java programs. It includes information on installing required packages for the following media formats: Macromedia Flash, MP3, AAC, WMA, DVD, Divx/Xvid, MPEG-4, and Realmedia (Realplayer). Information on Windows Codecs for additional proprietary formats is also included.
PLEASE READ SECTIONS 1, 2, and 3 regardless of what you are looking for.
Section 1 describes why non-Free formats are not included in the Ubuntu installation, Section 2 describes which software repositories need to be added to the Synaptic Package Manager so that you can install the formats yourself, and Section 3 explains how to change sound settings to fix a common issue w/third party plugins on Ubuntu.
Contents:
1.
Overview
2.
How to add Repositories
3.
Sound and third party software
4.
Java
5.
Macromedia Flash
6.
MP3
7.
AAC and iTunes Music Store
8.
DVD
9.
DivX / XviD, WMA, and miscellaneous proprietary formats
10.
Real Player
1. Overview
As noted in the Ubuntu FAQ, support for some popular formats is not included in the Ubuntu distribution because there are legal restrictions on their distribution or usage. While we make no effort to restrict the choice of users to use such formats, we prefer to support Free software and Free formats. This page is intended as a central resource for information about dealing with non-Free formats and tools - including reasons for non-inclusion, alternative formats or implementations, and, as a last resort, information on using non-Free formats and tools.
2. How to add Repositories
Some of the following fixes involve adding repositories. For this reason instructions for adding repositories are here. Instructions on how to add these repositories can be found in the AddingRepositoriesHowto: http://www.ubuntulinux.org/wiki/AddingR ... riesHowto/
2.1 UNIVERSE/MULTIVERSE
To add these sources using Synaptic, click the Settings-Repositories menu item. You should then see a list of package sources in use on your system.
If you are using Hoary
If you see a source called Ubuntu 5.04 "Hoary Hedgehog", select that one and click the Edit button. Then, on the "Sections" line, there will be a list of repositories. Finally, add the names of the sources (universe and/or multiverse - but possibly including main/restricted if you haven't added these yet) you want to the end of this line and press OK.
If you don't see a source called Ubuntu 5.04 "Hoary Hedgehog", click the Add button. Select Ubuntu 5.04 "Hoary Hedgehog" from the drop-down list, check the repositories you want (universe and/or multiverse - but possibly including main/restricted if you haven't added these yet), and press OK. You should now be set to use Universe and/or Multiverse - just update your package lists by clicking "Reload" in Synaptic and the packages from the sources you selected will be available to install.
If you are using Warty
Add a repository using the following properties and then reload the package list:
URI: http://archive.ubuntu.com/ubuntu/
Distribution: warty
Section(s): (put the sections you want here, separated by spaces - i.e. main restricted universe multiverse)
2.2 MARILLAT:
Marillat is added in much the same way, with a few variations because of it being separate from Ubuntu.
Since Marillat is designed for Debian, sometimes Marillat packages get in the way of Ubuntu packages. To keep this from happening, add the following to /etc/apt/preferences (create this file if it doesn't exist):
Package: *
Pin: release a=unstable
Pin-Priority: 1
If you are using Hoary
Start by installing the Marillat gpg key per the instructions in AptAuthenticationInstructionsForHoary - this will prevent you from receiving authentication errors when you install packages from this source. Then, in the Synaptic repositories dialog box, click Add and then Custom. In the dialog box, type in the following APT line:
deb ftp://ftp.nerim.net/debian-marillat unstable main
Click OK and you should be good to go - just reload the package list.
If you are using Warty
Add a repository using the following properties and then reload the package list:
URI: ftp://ftp.nerim.net/debian-marillat/
Distribution: testing
Section(s): main
2.3 CRIMSUN:
(necessary for Warty only)
Add a repository using the following properties and then reload the package list:
URI: http://sh.nu/~crimsun/
Distribution: ./
Section(s): (leave blank)
3. Sound and third party software
Ubuntu uses a program called esd to allow multiple applications to access the sound card at one time. However, many third party applications not in Ubuntu main aren't designed to use esd to access the card. On some sound cards, this causes these applications to not produce sound. To work around this problem, esd must be configured to release the sound card when it is not using it. To do this, edit /etc/esound/esd.conf and change the line that begins with spawn_options to begin with default_options. Finally, change the -as 5 to -as 2.
Note: this problem only occurs on the Ubuntu Hoary release and newer. Kubuntu and Ubuntu Warty are not affected by this.
4. Java
Although the Java API itself is open, the only certified Linux implementations of Java with wide compatibility are derived from Sun's implementation. All of these implementations carry non-Free licensing terms.
The Kaffe project and the GNU Classpath project are working on Free implementations of Java, but they are not yet comparable to the Sun-based implementations in performance, completeness, or compatibility.
There are detailed instructions for installing Sun's Java available. Daniel Robitaille has instructions on installing IBM Java on Ubuntu x86.
5. Macromedia Flash
There is a free player for this ( GPLFlash?), however it does not support many modern Flash applications. Macromedia has a player that supports up-to-date Flash applications, but it is considered "non-free" and as such is not included in the main Ubuntu archive. However, it can be installed from multiverse (see below for details), or by visiting the official Macromedia Flash Player for Linux page and following their simple instructions.
Install (from MULTIVERSE) the following package:
*
flashplugin-nonfree
This will install Flash and the plugins needed to view it in Firefox and Mozilla.
6. MP3 and Windows Media Audio
6.1 MP3 Playback:
MP3 is patent-encumbered, for both encoding and decoding, these patents are being actively enforced.
Ogg Vorbis is a flexible and Free lossy audio codec with a proven track record. This format is now supported by some DVD player or some portable player (like usb key).
However, you can still play your MP3s with rhythmbox, amaroK or XMMS.
RhythmBox? is installed by default on an Ubuntu distribution. It's an Windows Media Player-like with supports to link with iPod and a library system.
For playing MP3s with Rhythmbox or amaroK, you must install the gstreamer0.8-mad package. This package is in the universe repository (see section 2 above).
For install XMMS (Winamp-like), you must install the xmms package. It's in the Hoary install cd. Note : you must choose the eSound output plugin in the options of XMMS (XMMS freeze if you use ALSA with Hoary).
6.2 MP3 Encoding:
For encode MP3s, you can use Sound Juicer (installed by default) with LAME. LAME is an MP3 encoder. Sound Juicer is a program which use gstreamer (the following installation should work with other programs which use gstreamer).
First, you must install the gstreamer0.8-lame package (available in the MARILLAT repository for Hoary).
Second, you install the lame package (available in the Hoary multiverse repository).
After that, you launch the command : gnome-audio-profiles-properties and you create a new profile (call it something like "MP3" or "LAME".
Then, edit this profile and set GStreamer? Pipeline to audio/x-raw-int,rate=44100,channels=2 ! lame name=enc.
Optionally, you can add bitrate=<some bitrate> to the end of this line if you want a specific bitrate other than the default of 128.
Finally, set File Extension to mp3, and click the Active checkbox and then OK.
Before the first use of Sound Juicer; launch the command : gst-register-0.8. Now, you should be able to rip MP3s.
For other programs (non GStreamer?), it is sufficient to install the "lame" package (MULTIVERSE repository). For example, grip (gnome cd ripping program) and kaudiocreator (KDE cd ripping program) works fine with just the "lame" package. Just set your ripper to use LAME and you should be ready to go.
7. AAC and iTunes Music Store
7.1 AAC Decoding
The default audio format used by Apple's iTunes and iPod is AAC. This is a variant of the MPEG standard, and as such has patent issues. However, you can listen to AAC files in rhythmbox or amaroK by installing gstreamer0.8-faad (from MARILLAT). Note that for this particular package, you will have to install it by doing "sudo apt-get -t unstable install gstreamer0.8-faad" at the command line to avoid version conflicts. You will need this for listening to any AAC file, including those bought from the iTunes Music Store (see below for more info on using the music store on Linux).
7.2 AAC Encoding:
FAAC can be used to encode AACs?, although this is somewhat experimental compared to MP3 encoding at this point.. For encoding programs which use gstreamer, there is a gstreamer plugin called gstreamer0.8-faac (install from MARILLAT). Again, you will have to install this by doing "sudo apt-get -t unstable install gstreamer0.8-faac" at the command line to avoid version conflicts. However, this currently is problematic, and does not produce usable AAC files, though this may change in the future.
For other programs, you may be able to utilize FAAC directly to encode to AACs? - just install the "faac" package. You can make iPod-compatible AACs? this way, but this requires some additional configuration in your CD ripping utility.
7.3 iTunes Music Store
Apple's iTunes Music Store sells music online with a large selection of artists. Songs are in 128K AAC format, and cost varies by country. Apple only has Mac and Windows clients, but it also can be used on Linux. There are two different methods by which this can be done.
First of all, you can use CodeWeavers? CrossOver? Office (available at http://www.codeweavers.com) to install the Windows version of iTunes on Ubuntu. This will allow you to buy iTunes songs on Linux and listen to them. However, the main caveats of this approach is that 1) it costs money 2) it is not a fully Linux-native solution. Also, if you purchase any songs on iTunes using CrossOver? Office and want to burn them to CD or transfer to an iPod, or if you have purchased songs on a Windows/Mac machine and want to either listen to or burn them, you will have to use hymn (available in MARILLAT). Hymn is a free program which will enable iTunes songs to be played by anything that supports AAC format (or MP3/OGG if you convert them). Note that this may be legally questionable in your jurisdiction, because it gets around Apple's DRM included in iTunes songs.
As an alternative to using CrossOver?, there is a new, Free program called PyMusique? which allows basic usage of the iTunes Music Store on Linux. This works better than using iTunes on CrossOver?, but PyMusique? has less features than the official iTunes client at this point and may be in violation of the iTunes Music Store terms of service. To use this on Ubuntu, first install gstreamer0.8-faad (from MARILLAT) and libmcrypt4 (from UNIVERSE). Then, go to http://fuware.nanocrew.net/pymusique/ or a mirror (google "pymusique 0.4" for mirrors) and download the pymusique, python2.4-mcrypt, python2.4-vlc, and python2.4-mp4ff packages. Finally, install all the packages you downloaded from the above website. You can now launch PyMusique? from the Applications-Internet menu, and purchase songs (although you may have to restart your system for this to work).
8. DVD-Video
Non encrypted DVDs should play, however be aware that mpeg2 is somewhat patent encumbered and is not shipped on the CDs (though is in 'main')
Full DVD-Video support requires support of the Content Scrambling System (CSS). Though the encryption is weak, using libdvdcss to avoid this is classed as a 'circumvention device' and is such illegal in the United States and some other Jurisdictions.
However, as you can read at the DeCSS? information page, in most European countries, DVD backup is legal. In fact, you can backup anything that you own in, eg. Norway, Sweden, etc.
If you do not require compatibility with a DVD player, consider encoding your videos in Ogg Theora.
if you would like full DVD support, you can install the following packages:
libdvdcss2 (from MARILLAT)
xine-ui (from UNIVERSE)
After installing these packages, you can use Xine (on the Applications-Sound & Video menu) to play DVDs?.
If DVD playback is jerky or you notice optical data transfer (i.e burning a CD/DVD) is slower than it should be then you need to enable DMA transfer for that drive by editing the file:
/etc/hdparm.conf
You will need to know the device name of your DVD drive (e.g /dev/hdc) and then enable DMA with the 'dma = on' command. Then, either reboot or run the following command:
sudo /sbin/hdparm -d 1 /dev/hdc
(where your DVD drive is hdc)
You should now be able to play DVD's smoothly with the correct software.
9. DivX / XviD, other MPEG-4 variants, and miscellaneous proprietary video formats
These formats are patent-encumbered. If you do not require compatibility with MPEG-4 players, consider Ogg Theora
**Note:** these are unsupported and may be illegal in your jurisdiction, we in no way endorse the use of these packages.
9.1 Mplayer:
MPlayer? is a movie player for Linux (runs on many other Unices, and non-x86 CPUs?, see the documentation). It plays most MPEG, VOB, AVI, Ogg/OGM, VIVO, ASF/WMA/WMV, QT/MOV/MP4, FLI, RM, NuppelVideo?, YUV4MPEG, FILM, RoQ?, PVA files, supported by many native, XAnim?, and Win32 DLL codecs. You can watch VideoCD?, SVCD, DVD, 3ivx, DivX? 3/4/5 and even WMV movies, too (without the avifile library).
Homepage.
There are several versions of mplayer available. The following repositories contain mplayer packages:
CRIMSUN, MULTIVERSE, MARILLAT
*
For Warty, you will need to add the MARILLAT, CRIMSUN, and MULTIVERSE repositories. For Hoary, you will need to add the MARILLAT and MULTIVERSE repositories.
Choose between the various packages as follows:
Depending on your cpu: 386s and 486s should use mplayer-386; Intel Pentiums and newer should use mplayer-586; AMD Athlons and newer may use mplayer-k6 (find your cpu using "uname -m" in a Terminal).
The following packages may optionally be installed:
*
mplayer-fonts mozilla-mplayer mplayer-doc (optional)
The "mixer" setting may need to be changed to avoid errors during playback. Right click on the MPlayer? screen, select Preferences and then select the Audio tab. Select OSS (or your mixer if you use a different one) from the types and OK everything (accepting the default mixer location etc).
9.2 Windows Codecs:
These codecs are extremely useful. The following formats are contained therein:
*
ATI VCR-2 video codec.
*
Cinepak video codec
*
DivX?

*
DivX?

*
Indeo Video 3.2/4.1/5.0/4.1 quick/5.0 quick codecs.
*
Intel 263 video codec.
*
Microsoft MPEG-4 video codec, beta version 3.0.0.2700
*
Morgan Multimedia Motion JPEG video codec.
*
QuickTime?
*
RealAudio?
*
RealVideo? 8
*
RealVideo? 9
*
Windows Media Video 9
*
And more
Install:
*
w32codecs (MARILLAT)
For information on how to add these codecs for use with totem, please see this page: AddingCodecsToTotemHowTo
9.3. Other codecs
Not all mpgs are created equal. If you are getting sound but no videe with some mpgs, you probably need the ffmpeg libraries.
gstreamer0.8-ffmpeg (from UNIVERSE)
10. Real Player
Realplayer is good for listening to BBC Radio, among otherthings. You are required to manually download Realplayer from here. Once it is downloaded, move it to your home folder (if its not there already), then open up a terminal and type
chmod u+x RealPlayer10GOLD.bin
sudo ./RealPlayer10GOLD.bin
You are then prompted for an installation directory. I chose
/opt/realplayer
Answer yes to creating symbolic links, and let it use the default directory.
Realplayer should now be in your Gnome menu, under the Sound&Video section.
To install the firefox plugins, run realplayer from the gnome menu. You will be asked to agree to a licence (this is free as in beer, not free as in speech). The you will be asked if you want to check for updates and configure mozilla helpers, check both and click ok. Now head over to http://www.囗囗囗囗囗囗囗囗囗/radio/ and you should be able to listen.
10.1 Real Player for PPC
To install Realplayer on PPC, download the Experimental build installer from Helix
make the file executable (chmod 770) and execute (./realplayer-xxxxxx.bin)
Answer the questions and Realplayer should work by executing /path-to-Realplayer-directory/realplayer. To make life easier add an alias in your .bashrc (ie alias = '/path-to-Realplayer-directory/./realplayer&') or create a soft link to /usr/local/bin (sudo ln -s /path-to-Realplayer-directory/realplayer /usr/local/bin/).
10.2 Real Player issues on Hoary
1. If realplayer doesn't immediately work, go to the realplayer install directory and remove the swf plugins. For some reason, it works perfectly most of the time after you do this. If you still have problems, it may be the way that your soundcard handles esd. Go on to 2. (Keith Bassett)
I don't know if this is what was supposed to be part 2, but Google dug up a thread at the Helix community forum, and this fixed the problem for me. In /etc/esound/esd.conf, change the auto_spawn item from its default setting of 0 to 1. (MartinManey)