Saturday, July 29, 2006

Oh man... I want to download Youtube Movie!!!


what? is someone said YouTube?

I want to share with you guys that you can download youtube movieclip to your beloved PC/Laptop. Things started when I got bored and end up with Initial-D Battle Stage clips. So, like usual, i click the link and wait for about 1/2 hour and that indicator wont move a bit! So, with a frustrated feeling(and a little bit angry with my ISP), I start download YouTube's Movie Player.

With couple of minutes, i managed to download the file, and with some tools, i decompile the .swf file and study it's ActionScript code.

Suprisingly, there is lots of scramble AS code, and also encripted url for security reason. Well no worry, i successfully pick up the key URL that i need for.

The downline is, the format that you will be downloading is in .FLV format, which is a Macromedia Flash Movie File. With some of a tools, you will able to playback from your PC/Laptop. So...


Let start!


The ingredients:
YouTube Website - Yaa... this is very important!
A Download manager - Currently I'm using FlashGet
FLV Player - You can use RivaVX

STEP 1
Open Youtube in your favourite Internet browser, then search any video that you want to fetch. CLick the video page.

STEP 2
Make sure the Movie player is loading, and find fullscreen mode button(down-right of the player), and click it. In fullscreen mode, press the "option" key on your keyboard(in the middle of Alt & Ctrl key) and select "View Source".

STEP 3
Now the tricky part. Find these code in the source code:
" var fo = new FlashObject("/player2.swf?video_id=Be1Is2Sd408&title=Dewa+19+-+Sedang+Ingin+
Bercinta&nc=39168&l=243&s=B88731ACF581DBB1%3A8A51374783A7BCE6&fs=1&t=
OEgsToPDskJSYPH1ldslZYP7eZHD6-EB", "player", "100%", "100%", 7, "#000000"); "


We will need this code only:
" /player2.swf?video_id=Be1Is2Sd408&title=Dewa+19+-+Sedang+Ingin+Bercinta&
nc=39168&l=243&s=B88731ACF581DBB1%3A8A51374783A7BCE6&fs=1&t=OEgsToPDskJSYPH1ldslZYP7eZHD6-EB
"

Now we need to cut useless code from that code line. remove the bold code:
" /player2.swf?video_id=Be1Is2Sd408&title=Dewa+19+-+Sedang+Ingin+Bercinta&
nc=39168&l=243&s=B88731ACF581DBB1%3A8A51374783A7BCE6&fs=1&t=
OEgsToPDskJSYPH1ldslZYP7eZHD6-EB
"
and the result will be:
" video_id=Be1Is2Sd408&nc=39168&l=243&s=B88731ACF581DBB1%3A8A51374783A7BCE6&
fs=1&t=OEgsToPDskJSYPH1ldslZYP7eZHD6-EB
"
Ok, now we need to combine this code with what i get from Youtube Movie player source code:
" http://www.youtube.com/get_video?video_id=Be1Is2Sd408&nc=39168&l=243&
s=B88731ACF581DBB1%3A8A51374783A7BCE6&fs=1&t=OEgsToPDskJSYPH1ldslZYP7eZHD6-EB
"


Now, by using your download manager, copy this link and add to your download list. After finish downloading, open the .flv file with Riva FLV player. And of course, you can covert the .flv file into your prefered format such as .mpg, .avi or .wmv with RivaVX.

You're Done!!!

Now you can enjoy your movieclips offline!!!


update: if you lazy enough, you gan use GreaseMonkey Extension for Mozilla Firefox! get the tutorial here!

P/S: I'm not sure if downloading a videoclips from Youtube is illegal. and ya, i'm not reponsible for any action you do with this tutorial.