NOTE: This howto is for Linux users. If you are a Windows user go pay someone $40 and then another $15. Good luck.

So you are at work and really want a song but just can’t get it because torrenting at work is blocked or could really get you in trouble? No problem, why not use youtube? Chances are that the song is already there on some video, either the official music video or some random compilation!

Search for a video that has the song you are looking for, then download the video using keepvid and save it on your desktop. Now you will need a script to convert your newly downloaded video from .flv to .avi. So fire up your favorite text editor and copy this into it:

if [ -z "$1" ]; then
echo "Usage: $0 {-divx|-xvid} list_of_flv_file
exit 1

# video encoding bit rate

while [ "$1" ]; do
case "$1" in
MENC_OPTS="-ovc lavc -lavcopts

MENC_OPTS="-ovc xvid -xvidencopts bitrate=$V_BITRATE:autoaspect"
if file "$1" | grep -q "Macromedia Flash Video"; then
mencoder "$1" $MENC_OPTS -vf pp=lb -oac mp3lame
-lameopts fast:preset=standard -o
"`basename $1 .flv`.avi"
echo "$1 is not Flash Video. Skipping"

Save the file as Next chmod it and move it into your /usr/bin (while you are in the directory of the script)

sudo chmod a+x
sudo mv /usr/bin/

Ok so now we are ready to convert our downloaded .flv file to avi, so run this command (while you are in the directory of the video) -divx name_of_file.flv

After some crunching you will get a new file called name_of_file.avi, all you need now is to strip the sound from the video. Use the following command:

mplayer name_of_file.avi -ao pcm:file=temp1.wav

Thats it! You got your song in a .wav format. Convert the .wav file into whatever format you prefer :)