Jump to content

YouTube MP4 Script


Recommended Posts

There is a hidden feature in YouTube that allows you to directly download a video in MP4 format.

Simply paste the following code into the address bar while watching the video of your choice, and press enter. Look under the video embed/description box to see a link.

java script:if%20(document.getElementById('download-youtube-video')==null%20&&%20!!(document.location.href.match(/http://[a-zA-Z.]*youtube.com/watch/)))%20{var%20yt_mp4_path='http://www.youtube.com/get_video?fmt=18&video_id='+swfArgs['video_id']+'&t='+swfArgs['t'];%20var%20div_embed=document.getElementById('watch-embed-div');if(div_embed){var%20div_download=document.createElement('div');div_download.innerHTML='<br%20/>%20<span%20id='download-youtube-video'><a%20href=''+yt_mp4_path+''>Download%20as%20MP4</a>%20'+%20%20((navigator.userAgent.indexOf('Safari')!=-1)?'(control-click%20and%20select%20<i>Download%20linked%20file%20as</i>)':('(right-click%20and%20select%20<i>Save%20'+%20(navigator.appName=='Microsoft%20Internet%20Explorer'?'target':'link')%20+'%20as)</i>'))+'</span>';div_embed.appendChild(div_download);}}void(0);

This works best with Safari, but Firefox/IE are also tested to work fine.

Rumor has it that this is due to the iPhone/iPod Touch/Apple TV, and the availability of YouTube on them.

NOTE: If you "Right-click > Save Link As" in Firefox, you may download a .htm file. To fix this, simply change the extension from ".htm" to ".mp4". Or you can just left-click it, and save the .mp4.

----------------------------------------------------

Oh, BTW, I'm new here. ;)

Link to comment

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...