RestrictedFormats
ContentsBRTableOfContents |
Disclaimer and Legal Notice
attachment:IconsPage/IconDialog-Warning1.png Patent and license restrictions on media formats complicate a free operating system's ability to distribute software that will support those formats. Ubuntu actively supports the FreeFormats. This page will walk you through getting support for the most popular non-free media formats.
Some of the packages listed here may be illegal in your country. This page is not legal advice.
Before You Start
You must have administration privileges to install packages. RootSudo explains how Ubuntu provides the necessary privileges.
Nearly all the applications and packages mentioned on this page are found in the Universe and Multiverse repositories. See AddingRepositoriesHowto for instructions on enabling the Universe and Multiverse repositories.
- Some additional packages are found in repositories not controlled by Ubuntu. Please do not file bugs about these specific packages.
Media Players
Media Players provided by Ubuntu
Ubuntu supports Totem (a movie player) and Rhythmbox (a music player); Kubuntu includes Kaffeine and Amarok. These applications play free formats (Ogg Vorbis, Ogg Theora, and the like) 'out of the box'. However, they can also play most non-free media formats if you install some additional packages. MultimediaApplications describes the most popular media players provided in Ubuntu, as well as some of the most popular available in the repositories.
Non-Free Media
MP3s
If you live in a country where it is legal, you can enable MP3 playback in the Ubuntu and Kubuntu media players by [:AddingRepositoriesHowto: enabling the multiverse and universe repositories] and installing the gstreamer0.8-mad package. Use your favorite package manager to install the package or type in a terminal:
sudo apt-get install gstreamer0.8-mad
or, if you are using Ubuntu 6.06 (Dapper Drake):
sudo apt-get install gstreamer0.10-plugins-ugly
note for KDE users: Your specific configuration may require you to install the akode-mpeg package to enable mp3 playback. In 6.06, amarok needs libxine-extracodecs for mp3 support.
If your portable music player does not support FreeFormats, the page [:CDRipping] explains how to convert your CDs to MP3 and AAC.
Other Non-Free Formats
The Ubuntu and Kubuntu media players can support a wide variety of non-free formats. If it is legal for you to play these formats, just [:AddingRepositoriesHowto: enable the universe and multiverse repositories] and install the necessary packages with your favorite package manager. Alternatively, you can type in a terminal:
sudo apt-get install gstreamer0.8-plugins gstreamer0.8-plugins-multiverse gstreamer0.8-ffmpeg
or, if you are using Ubuntu 6.06 (Dapper Drake):
sudo apt-get install gstreamer0.10-ffmpeg gstreamer0.10-gl gstreamer0.10-plugins-base gstreamer0.10-plugins-good gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse libxine-extracodecs ffmpeg lame faad sox mjpegtools libxine-main1
Note: This is a single command. Don't write in multiple lines.
The Codecs
mplayer, xine and totem-xine can play MPEG-1, MPEG-2, MPEG-4 (e.g encoded with DivX, XviD, FFmpeg MPEG-4 etc.), QuickTime and other formats using built-in native codecs (mainly from FFmpeg). RealAudio and RealVideo 8 & 9, Windows Media 9 and some other formats are supported via external codecs, either Linux native (RealMedia) or Windows codecs (Windows Media 9, RealMedia) - this support has been bundled into the w32codecs package.
As Windows is generally still in 32 bit land on the desktop, virtually no proprietary codecs are available in 64 bit DLL form, so there is no 'w64codecs' packages. Some people on AMD64 solve this problem by installing a 32-bit version of the operating system inside a chroot (such as via [:VServer:Linux Vserver] or [http://packages.ubuntu.com/breezy/admin/dchroot dchroot]), and this works very well. PowerPC users are generally out of luck entirely on this front - no-one has yet volunteered to collect binary codecs written for commercial operating systems on those platforms, nor to integrate the ability to use them via any of the above media players.
If your country's laws allow you to play media using the w32codecs, in a terminal, type:
wget -c ftp://ftp.nerim.net/debian-marillat/pool/main/w/w32codecs/w32codecs_20050412-0.0_i386.deb sudo dpkg -i w32codecs_20050412-0.0_i386.deb
Note: WMV files encoded with DRM (Digital Rights Management) are not playable by the codecs.
Note: If you are experiencing choppy audio when playing WMV files, try [http://ubuntuforums.org/showpost.php?p=136306&postcount=2 this] fix.
Playing Streaming Video from the Internet
There are a variety of applications that can play streaming video. One of the more popular is mozilla-mplayer, which is available in the multiverse repository. Or you just "import" totem into your browser. You should install the w32codecs (see above), [:AddingRepositoriesHowto: enable the multiverse repository] and, in a terminal, type:
sudo apt-get install mozilla-mplayer
- already tested on Ubuntu 6.06 (Dapper Drake)
sudo apt-get install kaffeine-mozilla
sudo apt-get install totem-gstreamer-firefox-plugin
Playing DVD's
Most commercial DVDs are encrypted with CSS (the Content Scrambling System). The movie players provided in Ubuntu are capable of reading DVDs that are not encrypted. If it is legal for you to circumvent CSS, then you can enable reading encrypted DVDs in vlc, mplayer, xine and totem-xine by installing libdvdcss2. Type in a terminal:
sudo apt-get install libdvdread3 sudo /usr/share/doc/libdvdread3/examples/install-css.sh
Note: To execute the above install-css.sh script, you will require some basic tools already installed into your Ubuntu system. Namely, you will require dpkg-dev, fakeroot, debhelper, and build-essential. To accomplish this with one fell swoop, simply type: If all of thise seems like a lot of work to get DVD playback up and running, consider that we as free-software users are forced to kludge these workarounds thanks to poor optics in technological legislation. Please look to the future and make sure that DRM and the likes provide for the open-source community and free-software.
Alternatively, you can do this without a DVD in your drive if you know your region number.
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. See the ["DMA"] page for details.
To install See RealplayerInstallationMethods for other ways to install Most of Real's non-free media formats can also be played by
Use the File Manager to navigate to a folder containing a Smil file. Click the file with the right mouse button, select Properties, and then the tab Open With. Click the radio button next to RealPlayer 10, and close the dialog window.
If you want
Macromedia's Flash Player is only available for i386 based machines, and Shock Wave is not available at all. There are projects that are attempting to provide free support for Flash, and currently they are the only way to get Flash support for the PPC and AMD64 distributions of Ubuntu. Flash can be problematic, so if you have problems (and solutions), read Flash Issues below.
To add Flash Player support for
"For those of us with 64-bit processors (or Mac) there is no non-free flash implementation available because the manufacturer does not support them. However, there are two free implementations. One is
To install
Since the Then, get the When you restart your web browser you should have a working, stable flash plugin.
If you use an Intel 855GM video card, ensure you set the X server colour depth to 24 bits, otherwise you will probably experience Firefox crashes.
The Shockwave player is unfortunately only available for Windows, but it's possible to run (some) Windows programs on Linux using Wine. Wine will only work on a PC, and users of 64-bit Ubuntu may encounter problems with it. Then you will need mozplugger, which is a program that lets you "embed" other programs in your web browser. First, install Wine and mozplugger. Open a terminal and type: Then you need to install the Windows version of Firefox (yes you read that right). Download it from here: http://www.mozilla.com/firefox/all.html . Choose to open the installer with Wine and follow the instructions on the screen. When the installation has finished go to a web site that requires Shockwave and choose to get the missing plugin. When the plugin has installed and is working you may close Firefox. Now you need to configure mozplugger to use the Windows version of Firefox for Shockwave files. From a terminal, type this:
Cause 1: Wine or Shockwave is still running in the background Workaround 1: Type this in a terminal to end all wine processes: Cause 2: mozplugger does not handle multiple objects. I don't know how to fix this. Cause: The files are first downloaded and then run from the Windows version of Firefox. Workaround: Change the /etc/mozpluggerrc file so that streaming is enabled: Cause (when using streaming): The Shockwave object expects the "Referrer" HTTP header to be set, and it's not when using mozplugger. Workaround: None yet
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. 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). Warning: songs purchased from the iTunes music store (.m4p) are encrypted and will not just play using gstreamer0.8-faad. You will need to decrypt them first.
Install the gstreamer-plugins-bad-multiverse package.
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. See CDRipping for how to encode CDs to AAC. For other programs, you may be able to utilize FAAC directly to encode to AACs using the "faac" package.
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 are that 1) it costs money 2) it is not a fully Linux-native solution. 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 fewer 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 and libmcrypt4. 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). PyMusique has been superceded by SharpMusique, available from http://www.nanocrew.net/software/sharpmusique/. It is available as a .deb for Breezy Badger and allows you to preview songs, signup for an account, buy songs and albums, redownload songs that you bought, and more.
For Ubuntu 5.10 (Breezy Badger), the easiest method is to use the Blackdown Java 1.4 installer from Multiverse. To install Java with the installer, just do: Ubuntu PPC, please see: ["JavaPPC"]. Ubuntu AMD64, please see: ["JavaAMD64"].
The alternative method it to get the latest version from Sun. This version of Java works better for most applications. Sun's implementation of Java and Java plugin for browsers however is non-free. Free Java is in active development and will be the preferred choice once it is released. Blackdown Java is non-free. It is a direct port of Sun's Java implementation, and is subject to the same licenses, as stated in the [http://www.blackdown.org/java-linux/docs/faq/FAQ-java-linux-2.html#intro-licensing Blackdown FAQ]. The only current advantage of using Blackdown over Sun is that Blackdown is to have the the i386 package show up in apt. Those interested in a free (GPL) Java implementation may wish to look at [http://www.kaffe.org/ Kaffe], which is available in the universe repository. Go to http://java.sun.com/j2se/1.5.0/download.jsp and click on “Download JRE 5.0 Update 6”. Ensure you do You must first accept the licence, then click on “Linux self-extracting file” (jre-1_5_0_06-linux-i586.bin). Save this file to your hard drive. Make the downloaded file executable. At the command line, change to the directory where you downloaded the file, and type: Install the If you get an error when installing java-package, you need to enable the multiverse repository (see ["AddingRepositoriesHowto"]). Use Try: or similar command if you are not using i386 architecture. Install the created package using Note: in above example,
The same procedure can also be used to install Sun's Java SDK instead of just the runtime environment (JRE). Just choose "Download JDK 5.0 Update 6" when downloading the package from Sun, and replace the file name with jdk-1_5_0_06-linux-i586.bin
In Ubuntu 5.10 (or Dapper), if you want to use Sun's Java instead of the open source GIJ (GNU Java bytecode interpreter) you need to set it as default. Run: and select your preference from the list. sudo apt-get install dpkg-dev fakeroot debhelper build-essential
DVD Lockup
Be warned the software claims you can only change regions 4 times, so that the effects of this procedure are irreversible and may render your drive permanently unable to read DVDs encoded for a particular region. sudo apt-get install regionset
regionset
Jerky Playback
RealPlayer
RealPlayer 10, use your browser to download the package [ftp://ftp.nerim.net/debian-marillat/pool/main/r/realplay/realplayer_10.0.6-0.0_i386.deb realplayer_10.0.6-0.0_i386.deb] to your Desktop, and install it (along with a support package needed by RealPlayer) by typing in a terminal: cd ~/Desktop
sudo apt-get install libstdc++5
sudo dpkg -i realplayer_10.0.6-0.0_i386.deb
Smil
RealMedia
RealPlayer to be the default application to open RealMedia files, use the File Manager to navigate to a folder containing a RealMedia file. Click the file with the right mouse button, select Properties, and then the tab Open With. Click the radio button next to RealPlayer 10, and close the dialog window. Macromedia Flash
Flash for i386
konqueror, mozilla, firefox, epiphany and other browsers, [:AddingRepositoriesHowto:enable the multiverse repository] and, in a terminal, type: for Ubuntu 6.06 (Dapper Drake)
sudo apt-get install flashplugin-nonfree
sudo update-flashplugin
for Ubuntu 5.10 (Breezy Badger)
sudo apt-get install flashplugin-nonfree
sudo ln -s /usr/lib/mozilla-firefox/*flash* /opt/firefox/plugins
for Ubuntu 5.04 (Hoary Hedgehog)
sudo apt-get install flashplugin-nonfree
Flash for AMD64 and PPC
gplflash and the other is swfdec. There is also gplflash2 in development that aims to be the proper free, open source replacement for all the platforms. While you can install them using apt-get, they tend not to work very well and are unstable, so that option is not great. Better to install one of them (I recommend gplflash) manually." If you are determined, another option is to install a i386 ubuntu in a DebootstrapChroot and launch your browser with flash plugin from there. GPLFlash
Installing from repository
sudo apt-get install libflash-mozplugin
Installing from source
sudo apt-get install libx11-dev xlibs-dev libmad0-dev libjpeg-dev checkinstall build-essential
wget -c http://heanet.dl.sourceforge.net/sourceforge/gplflash/gplflash-0.4.13.tar.bz2
tar xvjf gplflash-0.4.13.tar.bz2
cd gplflash-0.4.13
./configure --with-plugin-dir=/usr/lib/mozilla/plugins/
make
sudo checkinstall
Flash Issues
Sound
Symptoms
Possible Fixes
gedit ~/.mozilla/firefox/rc
Add the line: FIREFOX_DSP="none"
As an alternative solution, if the above doesn't solve the problem: Type the following in a terminal: sudo ln -s /usr/lib/libesd.so.0 /usr/lib/libesd.so.1
Video
Fonts
sudo apt-get install gsfonts gsfonts-x11
Macromedia Shockwave
Installation
sudo apt-get install wine mozplugger
sudo -b gedit /etc/mozpluggerrc
Add the following two lines to the end of the file: application/x-director: dir,dcr,dxr,cst,cct,cxt,w3d,fgd,swa: Macromedia Director file
swallow(firefox.exe) fill: wine "C:\\Program Files\\Mozilla Firefox\\firefox.exe" -chrome "file://Z:$file"
Finally you need to make Firefox reload the plugin database. Close all Firefox windows and do this in a terminal: rm ~/.mozilla/firefox/pluginreg.dat
Now Shockwave should (hopefully) work for you. However some Shockwave objects may not work (see below). Shockwave Issues and Workarounds
killall wine-preloader -s KILL
swallow(firefox.exe) fill: wine "C:\\Program Files\\Mozilla Firefox\\firefox.exe" -chrome '''"file://Z:$file"'''
Into: swallow(firefox.exe) fill stream: wine "C:\\Program Files\\Mozilla Firefox\\firefox.exe" -chrome '''"$file"'''
Then remove ~/.mozilla/firefox/pluginreg.dat and restart Firefox. This may not work if you are connected using IPv6 or a proxy. AAC and iTunes Music Store
AAC decoding
For Ubuntu 6.06 (Dapper Drake):
sudo apt-get install gstreamer0.10-plugins-bad-multiverse
AAC encoding:
iTunes Music Store
Getting Java
Blackdown Java
sudo apt-get install j2re1.4
Sun Java
chmod +x jre-1_5_0_06-linux-i586.bin
sudo apt-get install fakeroot java-package java-common
fakeroot make-jpkg jre-1_5_0_06-linux-i586.bin
mkdir: cannot create directory `/etc/.java': Permission denied
./jdk-1_5_0_06-linux-i586.bin: line 507: /usr/share/mime-info/java-archive.keys: Permission denied
Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk.sh
No matching plugin was found.
DEB_BUILD_GNU_TYPE=i386-linux fakeroot make-jpkg jre-1_5_0_06-linux-i586.bin
sudo dpkg -i sun-j2re1.5_1.5.0+update06_i386.deb
Sun Java SDK (Software Development Kit)
Selecting the default Java version
sudo update-alternatives --config java
sudo update-alternatives --config jar
To get common java applications (installed using .deb-packages) to run under your JVM of choice, make sure you also edit the JVM configuration file:
sudo -b gedit /etc/jvm
and add the line:
/usr/lib/j2sdk1.5-sun
Packages such as ant starts the first JVM found in this file.
Sun Java J2EE SDK
At the moment, there's no possibility to create a deb as described above for the J2EE SDK so you have to download the jdk from the site http://java.sun.com and then install:
sudo apt-get install libstdc++2.10-dev
then install as user the binary file that you have downloaded before.
Note:Remember to add the jar j2ee.jar in your IDE e.g. eclipse if you want to develop JSP and/or Servlet
Java on Mozilla Firefox
Installing Java without following the previous steps does not alert Firefox to its presence. If you simply executed the .bin file you downloaded, you will need to tell Firefox or Mozilla where to find the plugin library:
If you do not have a .mozilla/plugins directory in your home directory, create one:
mkdir -p /home/username/.mozilla/plugins
Then create links to plugin files:
cd ~/.mozilla/plugins ln -s /usr/lib/j2re1.5-sun/plugin/i386/ns7/libjavaplugin_oji.so libjavaplugin_oji.so sudo ln -s /usr/lib/j2re1.5-sun/plugin/i386/ns7/libjavaplugin_oji.so /usr/lib/mozilla-firefox/plugins/
You can skip these steps if you used the make-jpkg command.
If you have downloaded more than one, you need to modify the command to be more specific.
Java on amd64 computers
Unfortunately, Sun's Java for 64-bit PC's does't work very well yet, but the Blackdown version of Java works and is available in the Ubuntu 5.10 (Breezy Badger) Multiverse repository.
sudo apt-get install j2re1.4 j2re1.4-mozilla-plugin
Afterwards restart Firefox and you should have a working Java plugin.