If you own a Mac and frequently rip audio from streaming content on the internet, then you’ve probably already heard of Audio Hijack. The majority of times I used Audio Hijack was for ripping audio from YouTube videos such as this one. I’ll show you how to download YouTube videos in FLV format, then rip the audio from those videos and save them as an MP3 file, all on Ubuntu.
FlashGot Addon for Firefox
You’ll want to install a Firefox extension called FlashGot in order to download the YouTube movie onto your computer.
Once you’ve installed FlashGot, go to YouTube and surf to the video that you want to download. In the lower-right corner of your browser, click the FlashGot icon to select where you’d like to download the video (.flv) file. It should automatically begin downloading.
Apt-Get the Stuff You Need
Before you can convert your Flash video (.flv) to an MP3, you need to install a few tools. Open terminal and type the following:
sudo apt-get install lame ffmpeg libavcodec-unstripped-52
Once the installation completes, you’re ready to convert your .flv file to an mp3 file.
From .flv to .mp3 in one line
Open terminal, cd to the directory where you’ve saved your Flash video, and run the following, replacing SOURCE_NAME and DESTINATION_NAME accordingly:
ffmpeg -i SOURCE_NAME.flv -acodec libmp3lame -ar 44100 -ab 160k -ac 2 DESTINATION_NAME.mp3
You should have yourself a nice, compressed .mp3 file.
Convert to other formats: mpeg, avi, wav, etc
With the power of ffmpeg, you can convert audio and video files to almost anything. Learn more about ffmpeg if you want to tweak your output.

This is a great post. I have a question about the from .flv to .mp3 in one line section. What does “cd to the directory where you’ve saved your Flash video” mean? Sorry for my amateur question, but I really want to know how to do this and your post is the only thing I could find that sounds promising. Thanks!
Chris