MP4 Video to MP3 File Using ffmpeg (Ubuntu 9.10 Karmic Koala)
Sat, 05/08/2010 - 00:40 — macnod Here's how you can use ffmpeg to convert avideo (an MP4 video, for example) to an MP3 that you can load on your MP3player:ffmpeg -i video.mp4 -f mp3 -ab 192000 -vn music.mp3But there's a catch: You have to have ffmpeg and thelibavcode-unstripped-52 packages installed on your computer. The problemis that second package is available in the multiverse respository only. Toenable the multiverse repository, select Administration from the Systemmenu, then Software Sources. In the Ubuntu Software tab of the SoftwareSources dialog box, select the check box that reads Software RestrictedBy Copyright Or Legal Issues (Multiverse). Click the Close button whenyou're done.
After you've enabled the multiverse repository, you can install the ffmpegand libavcodec-unstripped-52 packages from a Terminal window with thefollowing command:
sudo apt-get install ffmpeg libavcodec-unstripped-52Now, let's go back to the options that I used with the ffmpeg command atthe beginning of the article. The -i video.mp4 option is easy: itidentifies the path to the input file. The -f mp3 option tellsffmpeg that we want the output format to be MP3. The -ab 192000bit tells ffmpeg that we want our MP3 encoded at 192Kbps. The -vn optionmeans "No video in the output". Finally, "music.mp3" is just the name wewant to give to the output file.
That's it! Now, if you could justfigureout how to download video from popular sites on the Internet, you couldextract MP3 audio from your downloads!
http://donnieknows.com/blog/mp4-video-mp3-file-using-ffmpeg-ubuntu-910-karmic-koala