Thursday, March 1, 2012

Fast YouTube Video Downloader Chrome Extension

It has been a while since I have written anything here but I have been super busy working on a bunch of projects. I have been messing around with a lot of HTML5 and canvas and YouTube. I never understood why these "YouTube video download websites" use back-end code to download videos when everything is available on the front-end. Same thing applies to the actual YouTube website. For example, if you are watching a YouTube video (it has to be queued up or playing) you can run this in your console and get the url paths to all the different video files available: yt.player.playerReferences_.player1.api.getVideoData().url_encoded_fmt_stream_map

But, you don't even have to do that because the embed tag that has the video, its flashvar attribute, also has the url_encoded_fmt_stream_map data. It needs to be decoded, a couple of times, but after that you have all the urls to the video files that you need. So, I decided to write a chrome extension that is really fast, simple and user friendly: Fast YouTube Downloader Chrome Extension

Here is how it works: you go to any YouTube video, and you click on the YouTube Downloader Extension in Chrome which will put a link on the page that takes you to the best quality version of the video file. I only show a link to the highest quality format because who cares about low quality if you are downloading the YouTube video to your computer? If you do care, let me know, and I can provide all the links. Here is the extension, just a couple of lines in JavaScript:


YouTube DL

UPDATE: New version of YouTube Video Downloader below does not require a double-click and it will right away open a new tab with the HQ youtube video for download.

YouTube DL

2 comments:

  1. There's no need to have two things to click, can you adjust it so when you click the little icon it starts downloading? Thanks, keep up the good work.

    ReplyDelete
  2. You are right about the double click, I will update it shortly so that you can just press it and it will take you to a new tab with the video playing. As far as forcing it to download instead of playing, that is currently impossible with an extension.

    Generally, that is a server setting, and I have no control over the way YouTube delivers the video. In HTML5, there is a download attribute that I could place on links and self execute but the video URL is so long that it causes an error with that implementation. Anyways, grab the new extension and enjoy.

    ReplyDelete