Turns out it is pretty damn easy, so I wrote up a quick guide to share with the (only 2) people who read my blog.
This guide is written for Linux system with these prerequisites:
1. faad : audio extractor
This can be easily installed through any major package manager. In fedora type
~>su -
~>yum install faad
2. lame : mp3 encoder
This can be installed the same way as above replace faad with lame
3. mplayer : video, audio player for linux
You can install mplayer though a repo or you can download from here
4. mplayer codecs: the codecs that make mplayer work
You will likely want this tar ball of the codec otherwise go to the link above
Step 1: Go To YouTube
Chances are that if you hear a song on the radio, there is a music video. If there is a music video, then somebody has uploaded it onto YouTube. A lot of the time, the band itself does this since it gives them some added publicity and exposure. Most of the time howerver, it is a pirated, illegal copy. Hopefully you can get your hands on a clean copy which may avoid my next point.
THE LEGALITY OF THIS PROCEDURE IS NOT CLEAR. If you have a guilty concious, then don't continue.
Still with me? Ok.
There will likely be more then one version of the music video posted. You should care most about the audio quality, not the video quality, when choosing which posting to work with. Once you have chosen the best sounding music video, it is time download the video.
2. PWNYouTube
PWNYouTube (Pown YouTube) is a web site that specializes in downloading video from YouTube. It is really easy to use.
You have two options: (1) copy the URL for the YouTube clip to the PWN YouTube site, or (2) simply change the YouTube URL in your browser by adding 'pwn' before youtube.
For example:
Just change this
www.youtube.com/watch?12340-ad...
to this
www.pwnyoutube.com/watch?12340-ad...
Then download the highest quality option provided to you. The resulting file will be name video.mp4. Go ahead and play the video with mplayer to check the sound quality. Don't worry about the picture, you will likely have some missing frames, but you don't care about that. If it's all good, move on to the next step.
3. Convert the mp4 to an mp3
There may be other ways to do this conversion, but I found this way the simplest. It proceeds in two steps really, but we are going to combine it into one command line statement. The first step is to extract the audio from the mp4 file to create a raw pcm output. The second step will convert the raw pcm into an mp3 encoding.
To do it all at once using the command line, first cd into the directory where the video.mp4 file was saved from step 2. Now type this command:
The audio.mp3 file is a mp3 comprehension of just the audio content of video.mp4. You can check the quality of the mp3 by playing it in mplayer. It will report all sorts of info on it when it loads.
Now, you have successfully, in a matter of 5 minutes, produced an mp3 of a song you just heard on the radio. How easy was that? Share and be merry.
No comments:
Post a Comment