Selasa, 08 Februari 2011

Rahasia : Fix youtube-dl...and rip them vids!

Youtube-dl is a great lil' script for download and saving youtube videos to your ubuntu computer (in fact, this script will probably work in any linux-based system that can run bash).
Youtube-dl is available in the repositories, to install it simply enter the following into a terminal:
sudo apt-get install youtube-dl

The basic usage is very easy. For instance, to download a youtube video, just enter the following:

Code:
youtube-dl [url]

Shazam! It's yours! I like to then convert the video to an mp3. There are many ways to do that, but I personally like to use ffmpeg (sudo apt-get install ffmpeg). It's versatile, CLI, and easily coupled with a youtube-dl command. Here is a command I commonly use:

Code:
youtube-dl [url] && ffmpeg -i xyz.flv xyz.mp3 && rm xyz.flv

This will download the video, convert it to a .mp3 and remove the original .flv file.

Recently, however, unfortunately, youtube/google seems to have changed their API settings, making the standard repo-version of youtube-dl non-functional. I typically get the following error, for example, when trying to download a crappy Enrique Iglesias song:
Code:
ben@ben-UL30A:~$ youtube-dl http://www.youtube.com/watch?v=Jx2yQejrrUE
[youtube] Setting language
[youtube] Jx2yQejrrUE: Downloading video webpage
[youtube] Jx2yQejrrUE: Downloading video info webpage
[youtube] Jx2yQejrrUE: Extracting video information
ERROR: unable to download video (format may not be available)

Here is the cure to what ails you. Point your browser here and right-click save-as.

Once the file is saved, enter the following code into a terminal:
chmod uo+x youtube-dl.txt
sudo mv youtube-dl.txt /usr/bin/youtube-dl

Now you can use youtube-dl and not have to worry about new API settings....for now.....

Tidak ada komentar:

Posting Komentar

Setelah membaca artikel di atas.
Apa komentar anda ??