Blog‎ > ‎

How To Download YouTube Videos

posted 13 Aug 2011, 21:37 by Dennis Ideler   [ updated 26 Jul 2012, 00:46 ]
Download YouTube videos
Ever wanted to download a YouTube video or any other streaming content?
It's easier than you think.

If you do a Google search for downloading YouTube videos then you'll probably be bombarded with a bunch of freeware that claims it can do it for you. The truth is, you can do this yourself. You also won't need to install any third-party software that you don't trust.

Before you continue, you need to have Google Chrome installed.
(Note: It should also work with Safari since it uses WebKit, but I haven't tried.)

Step 1: Right-click anywhere on the YouTube page and select 'Inspect element'
'Inspect element' in Google Chrome's right-click menu

Step 2: Go to the Network tab
Click the 'Network' tab.

The window below will appear empty and say "No requests captured. Reload the page to see detailed information on the network activity tab."

Step 2.5: Do as the instructions say and reload the page (the shortcut is the F5 key)

Step 3: Find the 'videoplayback' request and click it
Click on 'videoplayback'.

Step 4: Go to the 'Request URL' in your browser
Goto request URL.

Step 5: It may take a while to download (depending on file size). Once it's downloaded, you want to rename the title and the file extension to '.flv' because YouTube stores their videos as FLV.

Step 6: Click on your video and enjoy! I recommend using VLC to watch your videos.


Why does this work?
For any webpage to be displayed in your browser, your browser first has to make a request for every element on the page to be downloaded from a web server. As parts of the page are downloaded, your browser displays them.

What we did was search for a specific HTTP request that our browser sent to YouTube's web servers. By narrowing down the request for the video, we can imitate what our browser did when it loaded the page and we can simply request the video by itself.

Update: This method no longer works. YouTube now uses multiple videoplayback requests to load a video (as opposed to a single one). Downloading any of them does not get you a playable file. I haven't found a fix or workaround yet, if you have, please contact me.
Comments