convert youtube videos to mp3s

ever come across a song you’ve only heard on youtube and you wish it was on your mp3 player (or google music)?

well me too. so i did some research and it turns out there are a bunch of great tools out there for this. most of them seem to be written in python 2.x – i bet many of these are good, but i chose youtube-dl mostly for the simple features and commandline access

 

$ wget https://raw.github.com/rg3/youtube-dl/2011.08.04/youtube-dl

$ sudo chmod a+x youtube-dl

$ sudo mv youtube-dl /usr/local/bin/

$ sudo apt-get install ffmpeg libavcodec-extra-52 libmp3lame0 libmp3lame-dev python-qt4 libqt4-gui libqt4-core libqt4-dev libqt4-network libqt4-dbus

(make sure you already have python, or sudo apt-get install python –>pressing tab tab will show a list of available python packages<– choose a python version over 2.5)

 

$ youtube-dl <youtube link to video page>

$ ffmpeg -i <downloaded flv file>.flv <mp3 filename>.mp3

Leave a Reply