![](http://img28.imageshack.us/img28/7848/snapshot200601100517478er.jpg)
You've seen them before. Someone sends you a link to a cool video, but you can't save the thing, and you don't want to have to keep coming back and streaming the whole thing again. Sites like Google Video and YouTube refuse to allow direct downloads to such gems as SNL's "Lazy Sunday," so I went about looking for the best way to first, grab that video directly off of either service, and second, to convert the damned .flv into something more amicable, like an AVI or MPEG. Fortunately, two links showed up today on my list of daily reads that finally brought everything together and made the whole process easy. Read on for the rest of the tutorial.
Okay, so the first step is actually retrieving the video file from either service. While it's somehow being saved in your browser's cache, the actual .flv itself is not privy to normal users, which we are not. There's two ways to retrieve a video from either service, a URL-based way and an extension-based way, so it's up to you which is more convenient. The URL-based way is different for both services, so let's start with YouTube, courtesy of Tian, the benevolent information keeper of the hilarious Back Dorm Boys:
Every video posted in YouTube (www.youtube.com) has its own video identification name.
For example, “Mz-bg6IjHbQ” is for the video titled “The Yes Men - McDonald’s and World Trade Organization”.
To watch a video, the URL is shown as:
http://www.youtube.com/watch.php?v=video_id_name To save the video, first change the URL to:
http://youtube.com/get_video.php?l=165&video_id=video_id_name * Notice the difference in the URLs. Instead of “watch.php?v=”, it is now “get_video.php?l=165&video_id=”.
Save the webpage. Since most web browsers would automatically default saving the page with .html filename extention; it needs to be changed to .flv (Flash Video) filename extention.
Saving Google Videos is just a little trickier, as a simpler technique commented on Tian's tutorial didn't work (saving an encoded URL from the page info and converting it to plain text). I remembered I'd del.icio.us-ed a Google Video Downloader I came across a while back but didn't know what to do with, since .flv files were still relatively new then and I didn't know how to play them yet. Lucky I had the foresight to save it in the offchance I might be able to use it someday. Well that offchance is here, and here are the simple instructions on using it:
1. Enter the URL of the Google Video you'd like to download in the box marked "Google Video Page".
2. Click on "Decode URL".
3. This takes you to a page with a link to "download flv", which you are to now click and save to your destination of choice.
The second manner of downloading the .flvs directly is a little more convenient as it is extension-based, but personally I don't use it because I don't like the idea of installing something - be it an extension or otherwise - that I'm not going to be using on a regular basis. In any case, here are the instuctions, courtesy of one Jousha Kinberg. His Greasemonkey scripts add a convenient download link on Google Video and YouTube pages, so whenever you go to a video page on either service, downloading the appropriate .flv file is quick and painless:
I decided to
dive into Greasemonkey and create a couple scripts to expose download links on Google Video and YouTube webpages:
Google Video GetterYouTube To Me To install these scripts you will need the
Greasemonkey extension for
Firefox. After installing Greasemonkey, relaunch Firefox, then right-click the links above and select "Install User Script." Now whenever you browse to a Google Video or YouTube webpage, you will see a prominent download link at the top.
Welcome to Web 2.0 where the user is in control of the experience.
Now that we have our .flv files, all we need to do is convert them to either AVI or MPEG. Fortunately this last step is a one-step solution, facilitated by the freeware program Riva FLV Encoder (and you all know how I love free programs that do their job well). Here is the blow-by-blow on conversion courtesy of hitrec from the VideoHelp forums:
I use the RivaFLVencoder;
http://www.rivavx.com/index.php?encoder&L=3which is freeware and it’s based on the
FFMPEG encoder (normally it is used to create .flv files from .avi or .mpg, but it can do the reverse too).
Download, install and open Riva.
Klick the Browse button in the Input tab and locate the .flv file you want to convert.
Klick the Browse button in the Output tab to select the location to save your output.
The default outputname will have the extension .flv (after all it is an FLV encoder) but just click it and change the extension to .avi or .mpg
Then adjust the encoding parameters for both video and audio to your liking
Make sure you check the box Enable Audio or you’ll end up with a mute video.
It’s possible that the .flv contains an audiocodec that will not be transcoded. A solution for that is to play the original .flv and record the audio with Audacity (for instance) and to mux that recording with the .avi or .mpg you get from Riva.
Just experiment with the settings, but don’t expect miracles.
With the correct settings, you can now hit the Encode button
I get a codec error when I try playing back a converted AVI, but turning the .flv into an MPEG has shown no problems so far. The only other setting I changed from the default ones is the Movie Size, which I set to 320x240 because the default 640x480 setting created some nasty compression artifacts on a video I tested on it. Another thing to note is that the conversion, at least in MPEG's case, increases the filesize of the movie by a few MB, but shouldn't be too much of a problem if you're discarding the .flv after converting it. Finally, the Riva FLV Encoder has a built-in .flv player which associates itself with the file extension, so converting might just be an additional hassle; seeing as there's no way to resize a .flv with the player and the fact that AVI or MPEG is a generally nicer format to playback and share, I suggest sticking with the conversion route.
As an afterthought to those who don't know, saving a simple Flash movie can be done from right inside Firefox. Just right-click on an empty space on the page where the movie is embedded, select "View Page Info," click over to the "Media" tab and scroll until you find the direct link to the .swf movie you're trying to acquire (it will also have a type of "Embed"). Simply click "Save As..." to download.
Hope the tutorial helps, I'm off to complete my Back Dorm Boys collection.
[edit:
VLC can also playback and convert .flvs if you don't fancy Riva's program by way of the streaming/transcoding wizard.
Videora is also reported as a working converter.]
How To Save Flash Videos From YouTube [what tian has learned]
Google Video DownloaderGreasemonkeying with Google Video and YouTube [sandbox films]
Riva FLV Video Encoder (scroll down to "Free Riva FLV Encoder 2.0")How to convert .flv (flash video) to .avi or .mpg [VideoHelp]