Streaming and multimedia on ubuntu kubuntu

February 13, 2008 / by mustakim

http://ubuntuforums.org/showthread.php?t=661833&highlight=firefox+plugin

 

I still see a lot of people struggling and becoming frustrated over getting streaming media or Java to work, and having general multimedia and video issues, so I thought I'd post my own how-to on the subject. Please keep in mind however, that Ubuntu has a feature where if you click on a certain file or try to view flash videos etc, it will ask if you want to install those proprietary packages. This how-to is for users who are still having issues, or simply want as many different formats working as possible with just a few commands.

IMPORTANT: If you haven't already, you need to enable the medibuntu repo. Go to this link and follow the instructions for your particular Ubuntu version, remembering to add the GPG key also. Open the Terminal (Applications>Accessories>Terminal) and paste the wget commands into it.

An easy way to install most of the packages you need (Java, codecs for playing/ripping/converting music and video etc) is to open the Terminal and paste these commands into it;

32-bit Ubuntu users;

sudo apt-get update && apt-get install alsa-oss compizconfig-settings-manager faad flashplugin-nonfree gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-pitfdll liblame0 msttcorefonts sun-java6-fonts sun-java6-jre sun-java6-plugin unrar w32codecs

32-bit Kubunu users;

sudo apt-get update && apt-get install alsa-oss flashplugin-nonfree libk3b2-mp3 liblame0 libtunepimp5-mp3 libxine1-ffmpeg msttcorefonts sun-java6-fonts sun-java6-jre sun-java6-plugin unrar w32codecs

32-bit Xubuntu users;

sudo apt-get update && apt-get install alsa-oss flashplugin-nonfree liblame0 libxine1-ffmpeg msttcorefonts sun-java6-fonts sun-java6-jre sun-java6-plugin unrar w32codecs

64-bit Ubuntu users;

sudo apt-get update && apt-get install alsa-oss compizconfig-settings-manager faad flashplugin-nonfree gstreamer0.10-ffmpeg gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse gstreamer0.10-pitfdll icedtea-java7-jre icedtea-java7-plugin liblame0 msttcorefonts unrar w64codecs

64-bit Kubuntu users;

sudo apt-get update && apt-get install alsa-oss flashplugin-nonfree icedtea-java7-jre icedtea-java7-plugin libk3b2-mp3 liblame0 libtunepimp5-mp3 libxine1-ffmpeg msttcorefonts unrar w64codecs

64-bit Xubuntu users;

sudo apt-get update && apt-get install alsa-oss flashplugin-nonfree icedtea-java7-jre icedtea-java7-plugin liblame0 libxine1-ffmpeg msttcorefonts unrar w64codecs


Note to Kubuntu users: I didn't feel it was suitable to add the commands to install Compiz related packages above. Go here for instructions on what you need.


--PACKAGES FOR STREAMING--


You may already be happy with your streaming after installing the above packages, but if you want advanced playback and features I recommend you give the MPlayer plugin a try;

sudo apt-get remove totem-mozilla mozilla-plugin-vlc xine-plugin kaffeine-mozilla helix-player mozilla-helix-player

sudo apt-get install mplayer mozilla-mplayer (Open MPlayer and then close it. MPlayer will then create it's default folder in your home directory).

64-bit Users: I suggest you don't install RealPlayer, as it's a 32-bit application. You can stream RealPlayer type media with MPlayer, it will just be patchy sometimes. If you decide to use the MPlayer plugin for streaming, make sure you edit the settings so that "enable-rm", "enable-helix" and "enable-smil" are set to "1" instead of "0".

Now you need to download RealPlayer. It will also install plugins for Firefox, enabling reliable streaming of audio and video in that format. Real Media playback has been so random with MPlayer that I decided RealPlayer was the best way to go. Download it here. Don't worry that it's packaged for Fiesty, it will work and install fine. You can remove it in Synaptic or with "sudo dpkg -r realplay". You should be able to install it just by double clicking, if that doesn't work you should save or move it to your home folder and then;

sudo dpkg -i realplay_10.0.9-0feisty1_i386.deb

That's it! You have all the important packages. Now the next step.


--PART 2/5, STREAMING WITH FIREFOX--


You don't have to put up with sub-par streaming and use that mediaconnectivity Firefox add-on. This is how I got streaming working great at divx.com, Yahoo! Movies and even on the BBC website, including rm video and ram radio. Note: Due to how streaming is implemented by some sites, stand-alone mode will sometmes be required.

Paste either of these commands into the Terminal; (Substitute "gedit" for "kwrite" if you are using Kubuntu, and "mousepad" if you are an Xubuntu user)

gedit $HOME/.mplayer/mplayerplug-in.conf

or if you have multiple users and want them all to use this method for streaming;

gksudo gedit /etc/mplayerplug-in.conf

Then paste the following settings into it (don't worry if it's empty or if you didn't already have this file there. Also, it's safe to remove the settings already present). This should improve streaming a great deal with certain sites which have caused problems. Make sure you keep "enable-rm" "helix" and "smil" set to "0" (unless you are a 64-bit user) as RealPlayer will be handling those formats. Also, if you chose to edit the "/etc/" file, make sure the "$HOME" version in your home folder is blank or deleted.

download=1
cachesize=1024
cache-percent=25
keep-download=0
dload-dir=$HOME
noembed=0
autoplay=1
enable-wmp=1
enable-qt=1
enable-rm=0
enable-gmp=1
enable-dvx=1
enable-mpeg=1
enable-mp3=1
enable-midi=0
enable-pls=1
enable-ogg=1
enable-smil=0
enable-helix=0
nomediacache=0
nopauseonhide=1
rtsp-use-tcp=0
rtsp-use-http=0

Then paste this important command into the Terminal;

rm $HOME/.mozilla/firefox/pluginreg.dat (Firefox recreates it with the updated plugin information).

"Keep-download" is an easy way to save streaming media, just change the value to "1" and it will then download to your home directory. For an explaination of what the other settings do check out this link.


TROUBLESHOOTING


1. If your RealPlayer's playback is terrible (mine was) you have to do some manual editing. First of all, install "alsa-oss" (added to "Essential" in Part 1). Now you need to and paste these commands into the Terminal and do some manual editing;

gksudo gedit /usr/bin/realplay

Find the line "echo "Warning: LD_PRELOAD="$LD_PRELOAD"" and underneath "fi" paste these two lines;

LD_PRELOAD="$LDPRELOAD:/usr/lib/libaoss.so"
export LD_PRELOAD

Save and close. Also, open RealPlayer's preferences and go to "Transport" and select "Use specified transport". Then go into the two configure options beneath that and untick everything except "http". You can also select your connection speed in preferences and tell RealPlayer not to send connection info back to real.com.

2. Sometimes you will click on a video link and Firefox will ask if you want to download it or open it with a certain application. Many times though, you will want to play or open it with a different application to the one offered. Click to choose your own application and navigate to "/usr/bin" and you will find your audio and video apps there.

3. Use the "xv" video driver if you can. Open MPlayer and right click on the video window, then click on "Preferences". Click on the "Video" tab and select "xv", or if you can't use that try "gl". As a last restort you should select "x11" (unaccelerated). Please note: If you are having trouble using the "xv" video driver, you should search the forums and google as it's highly unlikely your card doesn't support it. Some users have to make a few changes to get it working.

4. Sometimes MPlayer looks like it is about to start playing a video, but it does not. Try pressing play and don't just give up and navigate away. BBC wmv radio streams take a long time to start playing, the ram streams start quicker and sound better.

5. If Firefox doesn't recognise that you have changed your plugins (pops up with "Plugin Required" or something like that) then you need to;

rm $HOME/.mozilla/firefox/pluginreg.dat

(you have to do this EVERYTIME you change your mplayerplug-in.conf file). Then open Firefox and type "about : plugins" (no spaces) in the address bar and press enter. Should show you a very long list of plugins now (Java, Flash, RealPlayer, Windows Media etc).

6. Are you using a non default web browser? You may need to link your plugins folder to that browser. To create a symbolic link, you need to do something like this "ln -s /usr/lib/firefox/plugins /fullpathtobrowser". Rename or delete the plugins folder it already has, or use the "ln -sf" symlink command as it forces the link to replace whatever plugins folder is already present.

7. Having problems with the Adobe Flash plugin after updating? Close Firefox, then cut and paste this command into the Terminal;

sudo apt-get purge flashplugin-nonfree && sudo apt-get install flashplugin-nonfree

If that command didn't work, you may need to go back and use the previous version of Adobe Flash.

8. Java not working correctly? Close Firefox and then try this command below. Make sure you select the latest Java, which will be in "/usr/lib...";

sudo update-alternatives --config java

If you are a 64-bit user, it might be a good idea to make sure you don't have any version of Sun Java installed, and then try the above command again if it didn't work first time;

sudo apt-get purge sun-java6-bin sun-java6-fonts sun-java6-jre sun-java6-plugin sun-java5-bin sun-java5-fonts sun-java5-jre sun-java5-plugin

9. Still have problems? REBOOT. You have made lots of changes to your system.


--PART 3/5, DVD PLAYBACK/RIPPING/BURNING--


To stop Ubuntu asking for the installation CD when you install these next packages, open the Terminal and do this;

gksudo gedit /etc/apt/sources.list

Go to the line which starts as "deb cdrom" (at the top in my sources list) and just put a # before it (comments it out). Close and save, and that's it.

For DVD playback, install VLC (accepted by most as the best DVD player, supports menus too);

sudo apt-get install vlc

and if you also want Totem to play DVDs well, you have to use the Xine backend instead of gstreamer (this is optional, VLC will do just fine);

sudo apt-get install totem-xine libxine1-ffmpeg

To get encrypted DVDs playing properly (some newer ones still won't work for now), paste these commands into the Terminal;

sudo apt-get install libdvdcss2 libdvdread3 libdvdnav4 build-essential debhelper fakeroot

then;

sudo /usr/share/doc/libdvdread3/install-css.sh

To set VLC as your default DVD player (I strongly advise you do) type the following command into the Terminal;

gksudo gconf-editor

Now expand "desktop" and then "gnome", scroll down to "volume manager" but don't expand it, just click on it and look over at the right pane. Scroll down and look for "autoplay_dvd_command" and change the command to "/usr/bin/vlc dvd://" (without quotes of course) by right clicking on it and selecting "Edit", then click on "Set as Default". Do the same for the "autoplay_vcd_command" as well.

For ripping DVDs, give dvd::rip a try;

sudo apt-get install dvdrip

Kubuntu users might be interested in this application instead;

sudo apt-get install k9copy

If you want to burn DVDs for use in standard DVD players, then your best bet is an application called Tovid. Go to the Tovid Wiki and download the deb file, then just double click to install, or right-click if you are a Kubuntu user. Also, read this guide on using the Tovid GUI and another guide on the basics of using Tovid.

Note: If you wish to change the region of a DVD drive so you can play foreign discs, you will need to install the following terminal based application;

sudo apt-get install regionset

Please be aware that most drives limit you to about 5 changes (regionset should tell you how many you have left). So maybe it's best to have a secondary external DVD drive and have it set to a different region to the one in your machine. To make the change, put any disc into your drive and type "sudo regionset" into the Terminal and change the region. Here is the list of region codes and which countries they cover;

RC1 = North America (USA and Canada)
RC2 = Europe, Middle East, South Africa and Japan
RC3 = Southeast Asia, Taiwan, Korea
RC4 = Latin America, Australia, New Zealand
RC5 = Former Soviet Union (Russia, Ukraine, etc.), rest of Africa, India
RC6 = China


--PART 4/5, VIDEO CONVERSION--


For video converting, first make sure you have these packages installed;

sudo apt-get install ffmpeg faac

Then download a GUI frontend for ffmpeg called WinFF. Install it by double clicking it. If that doesn't work, save or move it to your home folder and then install it with this command;

sudo dpkg -i filename.deb (If you ever want to remove it, open Synaptic and search for it or type "sudo dpkg -r winff in the Terminal)

To make a video for a mobile phone in WinFF, select 3g2 as the type of video you want to make. Use 3gp if you want (doesn't work for me right now however). To increase the audio quality, click on "Options" and in the "Audio Bit Rate" box type "96000" (default is 64000, which is 64kbps). However, your phone might not play it properly with the audio at 96kbps for video, depends really. Test it yourself. For some reason, when you type in the "Video Bit Rate" box to change the default setting, you only have to type in "180" (for example), instead of "180000. I'm not sure why. Also, you may need to change the extension from "3g2" to "mp4" or "3gp" in order for it to play. I suggest mp4 as this worked flawlessly on my W810i, but only with the default settings for some reason. I'd appreciate some feedback on how the videos work on other handsets.


--PART 5/5, MISCELLANEOUS--


Give these audio players a try;

sudo apt-get install exaile audacious

Exaile is a GTK fork of Amarok and Audacious is a nice small and simple Winamp style audio player.

You might be interested in having Google Earth too;

sudo apt-get install googleearth

For P2P file sharing, give Frostwire a try. Always worked pretty well for me. To install, try double clicking on it or save/move it to your home folder and use this command;

sudo dpkg -i filename.deb

If you want an easy way to edit usplash (Ubuntu loading screen) then you have to try this application;

sudo apt-get install startupmanager

It installs into System>Administration. Keep the colour depth to 16-bits or you may experience strange shutdown behaviour.

Don't forget to check out some of the games in Synaptic. Briquolo is fun, try that. Some games will not create menu entries, make them yourself if that happens (the name of the game is often the command to launch it).

You might want to reboot after completing this how-to, and check everything installed okay

0 comments on Streaming and multimedia on ubuntu kubuntu

Add a comment

To add comments without entering your email and image verification, you must be logged in. Login or Join Blogster

  • Type the words in the box below the image.

Email this blog post to a friend

To email posts to friends, you must be logged in. Login or Join Blogster

Friends

View All