![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
5 Cups of Ubuntu
![]() Join Date: Oct 2004
Beans: 36
|
HOWTO: Ubuntu Multimedia
** UPDATED **
Per post: http://ubuntuforums.org/showpost.php...6&postcount=48 // Ubuntu Multimedia HOWTO // // by Disposable // // http://www.oldskoolphreak.com Introduction ------------ "Will Warty Warthog / Ubuntu include complete multimedia support?" Ubuntu Linux [1] is a Debian-based, desktop Linux distribution whose name means "humanity to others." The philosophy behind this GNU/Linux distribution and the great selection of packages make you feel good that you're using it. The lack of multimedia support, however, leaves your digital media desires unsated. "We're still working out some of the difficult legal / policy issues involved with multimedia support. Warty Warthog will include some multimedia support, we just need to find out what we can safely and freely do." This HOWTO details the installation and configuration of applications essential to your media enjoyment on Ubuntu. Update It --------- If you've installed Ubuntu, and you should have a fresh install for this HOWTO, then you're already familiar with its default use of sudo. You'll be using sudo a lot. The first step towards an Ubuntu multimedia powerhouse is to make sure your box is up-to-date [2]. $ sudo apt-get update $ sudo apt-get upgrade $ sudo apt-get dist-upgrade MPlayer ------- It's time to grab all of the packages needed to install MPlayer. MPlayer is the most versatile media player available for GNU/Linux - video, audio, X, no X - it very well may be the only player you'll need. Let's start with gcc/g++ and other dependencies, and then grab the MPlayer source. $ sudo apt-get install manpages-dev $ sudo apt-get install autoconf $ sudo apt-get install automake $ sudo apt-get install libtool $ sudo apt-get install flex $ sudo apt-get install bison $ sudo apt-get install gcc-doc $ sudo apt-get install g++ $ sudo apt-get install x-window-system-dev $ sudo apt-get install libgtk1.2-dev $ sudo apt-get install libpng-dev Have your Warty Warthog CD handy and accept any extra packages, e.g. the libtool install will also install gcc. We'll use a US mirror for (most of) the MPlayer packages and assume you're working in your home directory. Download MPlayer, codecs, English fonts and the default blue skin. Internationalization and slick graphics are up to you. $ wget http://ftp5.mplayerhq.hu/mplayer/rel....0pre5.tar.bz2 $ wget http://ftp5.mplayerhq.hu/mplayer/rel...040922.tar.bz2 $ wget http://ftp5.mplayerhq.hu/mplayer/rel...8859-1.tar.bz2 $ wget http://www1.mplayerhq.hu/MPlayer/Skin/Blue-1.4.tar.bz2 Using the README from mplayerhq.hu [3] as a baseline, install the codecs with the following commands. $ tar -xjf essential-20040922.tar.bz2 $ sudo mkdir -p /usr/local/lib/codecs $ sudo cp essential-20040922/* /usr/local/lib/codecs/ Time to compile MPlayer. Issue these commands. $ tar -xjf MPlayer-1.0pre5.tar.bz2 $ cd MPlayer-1.0pre5 $ ./configure --enable-gui $ make $ sudo make install Now install the fonts and skin. $ cd $ tar -xjf font-arial-iso-8859-1.tar.bz2 $ sudo cp font-arial-iso-8859-1/font-arial-14-iso-8859-1/* /usr/local/share/mplayer/font/ $ tar -xjf Blue-1.4.tar.bz2 $ sudo mkdir -p /usr/local/share/mplayer/Skin/default $ sudo cp -r Blue/* /usr/local/share/mplayer/Skin/default/ Finally, copy over the included conf files. $ sudo cp MPlayer-1.0pre5/etc/* /usr/local/etc/mplayer/ Test your install by launching the graphical version of MPlayer. $ gmplayer QuickTime, WindowsMedia, MPEG, avi - you should be able to play just about anything. Give yourself quick access to MPlayer by adding a launcher to the top GNOME panel. Right click on the panel and click Add to Panel... Select Custom Application Launcher and click Add. Use the following information and click OK. Name: MPlayer Command: /usr/local/bin/gmplayer Icon: /usr/local/share/mplayer/Skin/default/icons/32x32.png Playing DVDs ------------ The Ubuntu Wiki discusses restricted formats [4], which include CSS and DVD playback. To add DVD playback capability to Ubuntu, use your favorite text editor and add the following line to your /etc/apt/sources.list file. deb ftp://ftp.nerim.net/debian-marillat/ unstable main Then sync your package index and grab the infamous DeCSS. $ sudo apt-get update $ sudo apt-get install libdvdcss2 Add a dvd link and enjoy DVDs with MPlayer and Ubuntu. $ sudo ln -s /media/cdrom0 /dev/dvd XMMS ---- With your video needs taken care of, we can move on the audio portion of our show by installing XMMS. $ sudo apt-get install libmikmod2 $ sudo apt-get install xmms Logging out and logging back in will find XMMS already in the Applications/ Multimedia menu. And there it is - instant Ogg/mp3/jukebox/streaming audio goodness. A Little Perl ------------- For streaming internet radio, you can of course use XMMS. Set your preference in Firefox and you're good to go. I listen to a few stations regularly, and I always have a gnome-term open. With those things in mind, I've found it much more convenient to write a Perl script that uses MPlayer to stream my favorite music. Code:
#!/usr/bin/perl -w
# mplay.pl -
# command line streaming of your fav stations
# usage: mplay <channel>
use strict;
help() unless defined(my $chan = shift);
if ($chan =~ /bass/) {
system("mplayer http://us-dc1.streams.bassdrive.com:8012");
}
elsif ($chan =~ /cryo/) {
system("mplayer http://207.200.96.225:8022");
}
elsif ($chan =~ /di/) {
system("mplayer http://64.235.239.5:8006");
}
elsif ($chan =~ /ind/) {
system("mplayer http://130.240.207.88:9090");
}
elsif ($chan =~ /talk/) {
system("mplayer http://broadcast.rantradio.com:9010");
}
else { help(); }
sub help {
print <<EOF;
Usage: mplay <channel>
Channels:
bass - BassDrive
cryo - Cryosleep
di - Digitally Imported
ind - RantRadio Industrial
talk - RantRadio Talk
EOF
exit;
}
without a browser. If you need your terminal, "q" stops the stream, do your deed, and up arrow gets the stream right back (or of course Ctrl+ Shift+T for a new tab in gnome-terminal). Conclusion ---------- Ubuntu Linux is an impressive distribution. Even more impressive is the conviction of the developers. "The most important thing about Ubuntu is not that it is available free of charge, but that it confers rights of software freedom on the people who install and use it." They put their money where their apt is. So as a GNU/Linux user, the tasks detailed above are trivial compared to the decisions made not to include such support. Please support free software developers. Continue to use Ubuntu. Contribute to the Ubuntu Linux community. And watch Batman: Dead End while you're doing it [5]. References ---------- [1] http://www.ubuntulinux.org/ [2] I could not intuitively get Rhythmbox to play one simple Ogg file. So my first step in setting up multimedia on Ubuntu is to sudo apt-get remove rhythmbox. [3] http://www.mplayerhq.hu/DOCS/README [4] http://wiki.ubuntu.com/RestrictedFormats [5] http://www.theforce.net/theater/shor...atman_deadend/ Last edited by ubuntu-geek; October 29th, 2004 at 12:57 PM.. |
|
|
|
|
|
#2 |
|
Just Give Me the Beans!
![]() |
Re: Ubuntu Multimedia HOWTO
Very nice, thank you =)
|
|
|
|
|
|
#3 |
|
First Cup of Ubuntu
![]() Join Date: Oct 2004
Beans: 1
|
Re: Ubuntu Multimedia HOWTO
alternatively, theres ftp://ftp.nerim.net/debian-marillat/index.html
add this line to your apt sources list: Code:
deb ftp://ftp.nerim.net/debian-marillat/ unstable main "gstreamer-mad" for mp3 playback in rhythmbox (yay!) removing gstreamer-esd is also good if you are using alsa and have problems with sound skipping under system load. theres also mplayer, xine, libcss2 and many more packages. oh yes, and don't forget to install "w32codecs". This will make just about any format media file play. |
|
|
|
|
|
#4 |
|
Just Give Me the Beans!
![]() Join Date: Oct 2004
Beans: 41
|
Re: Ubuntu Multimedia HOWTO
Thanks for this great HOWTO. Is there a way of installing mplayer as a plugin for firefox???
|
|
|
|
|
|
#5 | |
|
First Cup of Ubuntu
![]() Join Date: Oct 2004
Location: Oulu, Finland
Beans: 5
|
Re: Ubuntu Multimedia HOWTO
Quote:
http://mplayerplug-in.sourceforge.net/ Had it installed when I used Gentoo and it worked almost always. ---------- EDIT ---------- Just installed mplayerplug-in to my Ubuntu. Works like a charm. |
|
|
|
|
|
|
#6 |
|
Just Give Me the Beans!
![]() Join Date: Oct 2004
Beans: 41
|
I installed the plugin from source-forge but is doesn't work that good.
In 'about |
|
|
|
|
|
#7 |
|
5 Cups of Ubuntu
![]() |
Re: Ubuntu Multimedia HOWTO
Is there a way to install mplayer without the terminal, from the synaptic package management? I ask this because I'm pretty new to linux and have no understanding of terminal commands. Since I don't understand any of it, I'm somewhat scared of it.
Also is it really necessary to install a new application? Can't there be any codecs installed for the totem video player? |
|
|
|
|
|
#8 | |
|
First Cup of Ubuntu
![]() Join Date: Oct 2004
Beans: 3
|
Re: Ubuntu Multimedia HOWTO
Quote:
"Plugin allowing external viewers to be launched inside Mozilla mozplugger allows you to seamlessly integrate external applications to view files downloaded from the web that Mozilla can not normally handle. The application is embedded within a Mozilla window as to act like and feel like a true plugin. This allows to you view PDFs, Postscript files, animations and movies, amongst other file types all from within Mozilla (with supporting applications)." it is in ether universe or marillat. |
|
|
|
|
|
|
#9 |
|
First Cup of Ubuntu
![]() Join Date: Oct 2004
Location: San Diego, CA
Beans: 10
|
Amazing stuff! Great write-up..
|
|
|
|
|
|
#10 |
|
5 Cups of Ubuntu
![]() Join Date: Oct 2004
Location: Florida, USA
Beans: 26
|
Re: Ubuntu Multimedia HOWTO
Works great. Thanks!
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|