The info below was pulled from
this article. I think the info is too good to get lost, so if the link is broken, the gist is copied below.
YouTube has a rather frivolous reputation, the sort of site you might visit to see a video of snowboarding hamsters or jetpacking gerbils. It wasn’t until I started re-learning the guitar, learning to play the piano too and sight reading sheet music that I began to realize that YouTube was a great source of online tutorials. The quality varies from the execrable to the sublime, but I found sufficient quality material to start wondering how I might best use YouTube to organize my digital music lessons. As a committed GNU/Linux user I wondered how to make the most of my distro’s ability to manage my viewing and download experience. Unixland is a free country full of choice and here are the choicest tips, tools, tricks and applications to get the best out of YouTube. Obviously the premier requirement for viewing YouTube videos is to have Flash installed. Many distros will come with it pre-installed. If not, grab it from your distro’s repositories. That is the easiest route. If it is not available there, then install it from the prompt you will get when you try to view a video. This will take you to the
official Adobe site for downloading Flash. This does not always work. If not try the manual install of the compressed tarball. cd to t he directory where you downloaded it and type in a console tar -xzvf install_flash_player*linux.tar.gz and install it with install_flash_player*linux and (as root) copy flash to your browser’s plugin directory with cp libflashplayer.so /usr/lib/firefox-3*/plugins/. This should work with other browsers as well as Firefox. You may need to restart your browser to get Flash up and running and in the case of Konqueror it will be necessary to use the configuration menu to scan for new plugins.Assuming that Flash has been pre-installed (or downloaded, installed) and is working, downloading and saving Youtube videos doesn’t actually require you to do anything too fancy. Any enabled browser will do. This tip exploits the fact that as you are watching a streaming YouTube video it is being “saved”. Where? In your /tmp directory. Regardless of what browser you are using to view a video, it will be saved to that directory. Using your favourite file manager, navigate to it. It will be easily recognizable as it will have a file name like Flash312N4Er, to take a random example. You can right click it and play it in any flash-enabled media player (Kaffeine, Movieplayer, Kplayer etc). As you might guess, as the file is in the /tmp directory it will be lost once your computer reboots so if you want to save it just drag and drop it into the directory of choice and it will be there when you reboot. Renaming it might be a good idea too! Yes , it really is that simple and will work with any of the main browsers, except Dillo and its ilk. The sheer audacity of it This is the simplest method to download and save videos. Sometimes though, you may want the embedded MP3 music track in a video to save out to your removable media player. Enter
Audacity, a versatile piece of software to encode and record audio. Many distros include it, but if yours isn’t one of them then it’s usually only an apt-get, yum or urpmi away. It isn’t a glamour puss but it does the job, and if you want to set your parameters viz recording levels and audio codecs, Audacity gives you a lot. A word of warning though. If you fire up any application which uses the sound card and then start Audacity it will start but not before it spits out an error message that it cannot access your sound card and will not be able to record anything. So, start Audacity first, minimize it and then open your media player and tee up the flash video. Once you have set Audacity to your taste and preferences, start the video and hit the record button and Audacity will strip out the music track for you. When the video has finished stop recording and export the resulting ripped file as either a wav, ogg, mp3 or flac files. (If you are using the latest beta version—1.3.6—then you will also have the ability to encode in a wider range of file formats: WMA, M4A and AC3 as Audacity now supports
FFmpeg. If not already installed it will need to be sourced separately in your distro repositories. FFmpeg is well worth having anyway as it is a powerful command-line tool in its own right for video/audio conversion that provides the heavy lifting for well-known media players like MPlayer, MEncoder and VLC). YouTube and KDE service menus This, as they say in my part of the world, is the long way round the houses but at least it has the virtue of easily-available software that comes as standard with most version of GNU/Linux. It doesn’t give you much granularity but it works. If you are using KDE/Konqueror, things start to get interesting when service menus hove into view.
I wrote about these little gems back in the summer when considering just how much you could do from within the confines of Konqueror. Service menus really do extend Konqueror’s capabilities massively and there are two particularly relevant to YouTube. They directly download videos in a variety of file formats and allows extraction to various audio codecs. The ability to directly download a YouTube video by simply selecting this function from the right context menu (even when Flash is not working in Konqueror) is a godsend for anyone who wants life on easy street. The service menu for
Get YouTube Video can be downloaded at the KDE apps site. Copy and paste one or other of the two sets of install instructions (the second one worked for me) and the menus will be added. Now, head over to Youtube and enter a search term. Even without trying to open a full video for viewing, just right click on any video title in the resultant list and Konqueror will offer you a number of tasty options:
Now you have a choices to download in either .flv or .mp4 format and their four sub menus allowing encoding and playback in various formats. MPeg-4 is supported by all the big hitters of free software, including Amarok, Banshee, MPlayer, Rhythmbox, Songbird, VLS and Xine and renders good-quality video. The second service menu is one which follows on from the first one. Once you have downloaded your YouTube video you may want to extract the audio stream if the video is of a musical nature. Install
Audiokonverter and a simple right click will offer to extract the audio stream to Ogg, MP3, AAC, MP4 and Flac formats (providing you have the file formats installed). In the same vein, if you just want a simple, non interactive YouTube downloader for Konqueror’s context menu without options then install
Clive and follow it up with the
clive download Video KDE service menu. YouTube and Firefox What if you don’t have or use Konqueror (or Dolphin)? Firefox, as you might expect, has an addon to fill the gap. YouPlayer.
Grab the addon at the official site and it will add a a small icon at the bottom right of the browser. Clicking on it will open a sidebar. You can now drag a YouTube video onto the bottom pane and elect to play it in the embedded player in the top pane or download it. Ditto for Google Videos. You can, incidentally, use this addon as a scratch bookmark tool. Just drag a tab to the bottom pane and it’s bookmarked. The other addon you need to complete the YouTube experience in Firefox is
DownloadHelper. Once installed the inevitable right context menu offers the user options to download a YouTube video; The addon Preferences has seven tabs, the two most important being the YouTube and conversion tabs. The first allows you to configure how downloads are handled in terms of file names, detecting and using highest video quality and the conversion tab is the real meat here. It contains a link to an external application to convert videos. If you you have FFmpeg installed you should be good to go. The choice of codecs is substantial and you can configure thing so that you can enable automatic conversion, download in default Flash video or manually convert after download. DownloadHelper goes further: if you want to monitor YouTube (and other sites) for video updates on specific subjects you can downlaod the subtile extension either from the DownloadHelper menu in Tools (install) which will take you to the addon page or
go to it directly. Once installed all you need to do is to link to the
DownloadHelper page and follow the tutorial to set up a toolbar button which you can configure to monitor YouTube and other video sites for new video alerts according to the chosen subjects. For really powerful audio/video controls however the
Media Converter addon is hard to beat if you want GUI click and point simplicity. Once installed this extension will add itself to the right-context menu; when you select a Youtube video you now have the option to convert and download it by way of a point and click wizard which offers a cornucopia of options to set video types, audio streams, bitrates, resolution and frames. If you prefer, you can go to the
Media Converter homepage to search Youtube remotely in “portal mode”. The default is to convert a video directly from various portals:Download in Firefox (and other browsers) without addons Provided Firefox has Flash installed and Javascript enabled the
Ckuik website not only is feature packed but also allows you to download Youtube videos and save them to your hard drive (just hover your mouse over the video and all the options will pop up). There are other impressive features on this site but I won’t spoil them by blabbing. See for yourself. This site is not GNU/Linux specific but so different that I thought I ought to include it. In a similar vein, sans download capability, is
YouTube Fast Search. Well worth a visit. Both sites exploit YouTube’s API. Enjoy. Stand alone GUIs Using your browser is fine, but what about media players or dedicated software for Youtube? Fortunately, there is a trend towards integrating internet backends to media players and other standalone software. Here is a thumbnail overview of the pick of the bunch.
Totem
Gnome users will be familiar with
Totem Most dependencies involve Python and gstreamer-plugins-bad 0.10.6. Better still, if you do not have Flash installed you can still find and view YouTube videos as Totem uses the Youtube API. However, you will still need to activate the plugin from Totem’s Edit menu. Once done, enable the sidebar from the View menu and you are set to browse Youtube and view. The quality of Youtube videos has improved since the arrival of the H264 format. If your distro repositories lack this plugin, one is
available in a deb. binary for Ubuntu Hardy or a compressed tarball. Using Totem instead of firing up relative memory and RAM hogs like Firefox and Opera makes sense, to say nothing of the improved security profile. When Totem can view and save/convert Youtube videos it will really come into its own. For the haters of binary blobs like Flash player, the knowledge that using Totem with that plugin will bypass proprietary software and Adobe’s attempt to add DRM restrictions to Flash will be deeply satisfying.
Miro
Formerly Democracy Player,
Miro plays a plethora of formats and even if you do not want to view and save YouTube videos
the feature set is so extensive that it is worth installing in its own right and you will find a version for all the main distros. You can search, download and save from YouTube (though Miro will automatically delete after five days unless you set the options to save permanently). Miro will allow you to view the videos in full screen and in HD too—if or when YouTube ever support that format. Miro is a must for audio visual fanatics.
Elltube
Elltube is an elegant, simple no nonsense GUI for downloading and converting Youtube videos. Version 0.3 has just been released. The only dependencies are PyQt4 > 4.0 and Python > 2.4 and if you want conversion facilities, FFmpeg. It supports numerous codecs: AVI, MPEG, MP4, MP3, WAV. Unlike Totem, Elltube does not have a specific search facility. It requires the user to paste a YouTube URL. The good news is that to do this doesn’t even require Elltube to be running at all. Just browse YouTube (even with a browser not Flash enabled), right click and select copy link address. You will be pleasantly surprised when you launch Elltube. That link will automatically be there and it is then just a matter of choosing a file format for download/conversion and hitting the download button. It really is that simple. As my screenshot reveals however, I didn’t realize that it was that easy until I started experimenting with Elltube: