The information in this post will help you download and save video files that are hosted on sites like Youtube, Supernovatube, Youku, Megavideo, and linked to by sites like SurfTheChannel.com, free-tv-video-online.info and watch-movies-links.net
Seen the latest cool video on Youtube? Want to save it on your hard drive so you can watch it again at your leisure or share it with your internetless friends? Well, it’s simple – if you use Linux. Everything I explain in this post was done on a computer running Ubuntu 8.10, but I think it will work with any distro.
Okay, let’s start with Youtube videos. First, watch the video. Then, before you navigate away from that web page, go and look in your system’s /tmp directory. You should find a flash video file, named something like Flashbt0cVD. That’s the file you want. So move it to your home directory (or wherever you keep your videos) and rename it something more descriptive.
This trick will also work with the movie and TV videos files streaming over the internet via sites like www.surfthechannel.com, www.free-tv-video-online.info, tv-video.net and www.watch-movies-links.net.
There is a problem. One or two of the video links sites (like tv-video.net) delete temporary files when they have finished playing. This means you can’t move the file out of /tmp after you’ve watched it. The solution is to link the temporary file to one in your home directory before the temporary file is deleted. So you start to play the video, then go look in the /tmp directory. You’ll find a randomly-named video file there. You need to link it to your home directory. Do this by running this command in terminal:
ln /tmp/Flashuh4G6s ~/video.flv
Now you have got the video file in your /home. You have to make sure that the name you give to the new linked file does not already exist in the directory. So in the example above, you would first check that there is no file called video.flv in your home directory.
But there’s another problem. If you watch a video via the links sites that is hosted at Youku, the video will be delivered as a series of small files (12-13 MB each). But this isn’t a serious problem. When they’ve downloaded you can put the randomly-named files into the correct viewing order by checking the properties of the files, looking at the time when the files were created.
If you have any queries, feel free to leave Comments.
UPDATE: If you are a Windoze user and you want to learn how to save streamed media, you should check out this site. There you’ll find info on how to capture and save video from lots of websites, plus audio files from last.fm and other internet radio stations. I only use Linux, so I can’t verify the accuracy of the info. But it looks good.
UPDATE 2:
Here’s info about a couple more tools for downloading video from the web. One for grabbing BBC TV (and radio) content, and one for those Youtube videos we all know and love.
For some time now, users of any operating system have been able to watch BBC TV shows streamed over the internet by BBC iPlayer. But if you wanted to download programmes, you used Windows or you were shit out of luck.
Now, Linux users can download BBC content via the new iPlayer Desktop application. But I don’t like it. The content is crawling with DRM. And the player doesn’t work properly on my EEE PC. It might work okay on a better-specified computer. But iPlayer Desktop is compatible with just Intrepid and Jaunty and my desktop machine runs Hardy (I’m talking Ubuntu here – the app works on other distros too). Anyway, I don’t like the app so I’m not supplying a link to it. It’s my blog so blah! If you really want to try it for yourself, check out the “Labs” link on the iPlayer web page.
Anyway, if you want to download BBC TV and radio shows and you use Linux, there is an easy solution – get_iplayer.
This is how it works: Steve Jobs was desperate to sell his crappy iPhones in the UK. So he turned on his diabolical charm and convinced the BBC to offer iPlayer downloads to iPhones. This happened many moons ago, when only Windows OSes could download the content. But some dastardly fellow created a program that pretended to be an iPhone. Oh, and get this: the DRM that infects all the content downloaded from iPlayer is absent from the .mov files sent to iPhones and consequently computers running get_iplayer. It’s a command-line utility, which might put some people off. But as far as I’m concerned there isn’t much wrong with command-line utilities in Linux. So check it out!
The other video download solution I want to present here is the excellent pwnyoutube.com. The way this site works is simple. When you search for or go to watch a video on Youtube, you get an URL something like:
http://www.youtube.com/watch?v=ufzqypO2k_A
To download this video, you type that URL into your browser’s address bar, then add the letters “pwn” like this:
http://www.pwnyoutube.com/watch?v=ufzqypO2k_A
Go to that URL and you will find download links for the video in question. You can download the file in .flv flash format, and most are also available in mp4.
If you have an unreliable internet connection, you can marry pwnyoutube with wget to great effect. Let’s say you want a video of The Clash playing London Calling live. A search of Youtube may turn up this video URL:
http://www.youtube.com/watch?v=Idwibw0-lb4
So, you run the edited URL in your browser:
http://www.pwnyoutube.com/watch?v=Idwibw0-lb4
This brings you to a web page offering 2 download links. You want the “high quality” mp4 version. But your network connection is lousy. If you set the browser to download this file, chances are the connection will drop before the download completes. But this is no problem. Just right-click on the download link and select “Copy Link Location”. Now open a terminal and paste the download url into the following command:
wget -c http://deturl.com/save-video.mp4?http%3A%2F%2Fv18.lscache5.c.youtube.com%2Fvideoplayback%3Fip%3D0.0.0.0%26sparams%3Did%252Cexpire%252Cip%252Cipbits%252Citag%252Cburst%252Cfactor%26itag%3D18%26ipbits%3D0%26signature%3D7ABACC132F8C18AAF6A0649B1669DB89EDFF0B83.AB3039808ECB20B7124585313CB75A55C2C7E4A1%26sver%3D3%26expire%3D1250665200%26key%3Dyt1%26factor%3D1.25%26burst%3D40%26id%3D21dc226f0d3e95be
Wget will download the file, and the -c flag means that if the connection is broken, you can run the same command when the link is resumed and wget will start the download where it left off.
Hope this helps.
Posted by t0p