Convert YouTube Videos Into MP3s
Author: Stephan Jau
Revision: v1.0
Last Change: October 8 2008
Introduction
I do have a few songs that are broken and that I can't get somewhere else and can't buy however they are on YouTube.
I know, quality is not the best on YouTube but for some stuff you have it might be better. Question is, how could I put those flash videos onto my music player?
It's actually very simple but the legality of it depends on where you live. Better check out first if you are allowed to convert YouTube videos into mp3s.
Step 1: Download the video
At first, we have to get the video. The normal flash version is a reduced quality of the actual uploaded one. So we get the mp4 version instead. In order to do that, go to the YouTube video that you want to download.
Then copy the URL of that video (for example this here: http://uk.youtube.com/watch?v=xB8W2EPUmII ) and paste it into the URL box of this the KeepVid website: http://keepvid.com/
Then click on download and you will be presented two download links. One as flash and one as mp4. Use the mp4 version for better quality.
Step 2: Convert the video to mp3
Make sure you have ffmpeg and libmp3lame installed. Depending on your distro you have to find out yourself which libs you need.
I assume now that you downloaded the video as gratitude.mp4 and want to rip it to gratitude.mp3. In order to do so, run this command:
ffmpeg -i gratitude.mp4 -ab 128000 -ar 44100 nodame_gratitude.mp3
That's it. I know, audiophiles will say the quality is really bad but I'm no audiophile and for me it works fine.