Unnamed Tech Podcast

Podcast about tech news and projects.

Unnamed Tech Podcast header image 2

getyoutube .net console application

May 27th, 2008 · No Comments

I’ve been fiddling with a vb.net app that will download a youtube video by passing it the youtube.com url. I’ve put it all in a zip file with a compiled copy.

Command Line Help
getyoutube /url [youtube url] [/fmt [format]] [/file [filepath]]
        Avaliable Formats:
           /fmt 5 = .flv 320x240
           /fmt 6 = .flv 480x360
           /fmt 13 = .3gp 176x144
           /fmt 17 = .mp4 176x144
           /fmt 18 = .mp4 480x360 (default)
           *Note: Taken from Google Video Formats

[Download]

Here’s how it works.

There is a special url that will allow you to download any youtube video.

http://www.youtube.com/get_video?fmt=[Format Integer]&video_id=[Video ID]&t=[Video Hash]

So to make it work you need three pieces of information. The first two are easy.

[Format Integer]
This is one of these integers: 5, 6, 13, 17, 18. Look at the top of the post for what they mean.

[Video ID]
This is the querystring info in the url. For this Youtube url, http://youtube.com/watch?v=uSodXW85tFQ, the Video id = uSodXW85tFQ.

[Video Hash]
This one is a bit tricky and requires you to read the html source to find it. Search for “fullscreenUrl” which should be somewhere around line 75. In that long url that is being assigned to the fullscreenUrl variable there is a querystring parameter “t”. That parameter holds the Video Hash.

Example:
var fullscreenUrl = ‘/watch_fullscreen?fs=1&q=media.home&BASE_YT_URL=http%3A%2F%2Fyoutube.com%2F
&vq=None&sourceid=ys&video_id=uSodXW85tFQ&l=401&sk=LjlS9dT7DJ37MlsVIRq-UuU0f5kv6zGQC
&fmt_map=&t=OEgsToPDskJLyXIyicQoyTtHoIfQsWOu&hl=en&plid=AAROPIZ1iLx275xpAAAAIAAQAAA&title=media.home RSS reader’;

Tags: Code

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment