Get the audio from a Youtube video with one command.

May 02

By now most (if not all of you) have dabbled a little bit with Linux. Although it might look geeky and complicated at first glance, once you dip your toes into the great lake of open source it becomes a very refreshing computing experience. How do I mean ? Well : I challenge you to the following : Take a Windows Machine OR a Mac and, within 2 minutes FIND and INSTALL a free application that allows you to download a Youtube video and extract the audio to MP3. If you started off your search in Google (or in the Mac App store for that matter) you are starting to realize it is not that easy. There is a ton of ‘supposed’ freeware out there that, after installing it gives you either an app that does not completely work (unless you pay for it) or is just too complicated.  Do you (as a true slider) have a Linux machine handy ? (perhaps a virtual machine or a server ) Then lets fire up the command line and give you a one line command to make that technology work for you.

Introducing “Youtube-dl”

Youtube-dl is a command line application that lets you download Youtube video’s and if you want to, extracts the audio from said video’s. The command is simple. On Ubuntu you can install it by hitting : 

sudo apt-get install youtube-dl

After the installation is complete you need to update the app to the latest version. Also .. a couple of  one liners.

sudo youtube-dl -U

You will get an error that you need to update via the GIT repositories once more. Easy peasy (copy and paste people)

sudo wget http://youtube-dl.org/downloads/2013.05.01/youtube-dl -O /usr/bin/youtube-dl
sudo chmod a+x /usr/bin/youtube-dl

Lets start Downloading.

Now surf to the Youtube video of your choice and copy the url to your clipboard.

Go back to the terminal and type : 

youtube-dl <paste your url here>

Presto ! You will have the youtube video all for you ! What if you want the audio ? 

youtube-dl --extract-audio <paste your url here>

Cross platform compatibility

Youtube-dl is also compatible with Macs and there is an .exe for our Windows friends. But because the command line is so easy I just leave a terminal open to my linux machine (on ANY machine i’m working on) and just copy and paste whatever cat video I would like to keep for prosperity.  And youtube-dl does also support tons of other video sites like Vimeo and more ! 

Links : the Youtube-DL page.  and their howto for Windows and OSX users.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *