
Want to extract the audio of your favorite musical video, but stuck because you use Linux? Just fire up the terminal and hit shmooze:
ffmpeg -i my_video_file.avi extracted_audio.mp3
Well, in the linux world, it's a pity if you don't give an alternate way to do stuff. So here it is:
mplayer -dumpaudio my_video_file.avi -dumpfile extracted_audio.mp3
This technique can be used to extract audio from AVI, MPG and FLV files.
Photo by Peter Fuchs








Totally worked. All avi files converted within a few seconds with mplayer. Thanks
Thanks :)
Thanks too. cool, short, nice
koszi
Thanks a bunch!!!
Short and precise. Just what we needed.
Excelent! Thanks
A beautiful, simple, elegant solution that I'd expect to find only in Linux. Thanks! :)
simple solution but i didnt get the result when i did with mp3 but when i created ogg file it worked it said that codec not ound wats wrong
Great solution without any techno babble!! Thank you!
Very good, but can we specify the bit rate of the extracted mp3? I got 64 kbps. I would like 256 kbps.
ffmpeg -i yourvideo.mp4 -ab 256 extracted_audio.mp3
Your post is really informative for me. I liked it very much.
Disastrous. Degrades the audio, and makes sure it is proprietary.
ffmpeg -i Input.mkv -acodec copy -vn Output.oga
This will actually extract the audio, instead of transcoding it. Give the output filename whatever extension is appropriate.
"but stuck because you use Linux" is that a digg at linux punk. lol
Worked nicely. Thanks !
If there are several audio tracks then one should first find the ID of the needed track:
mplayer -v my_video_file.avi | grep audio
there should be something like:
ADDED AUDIO PID 304, type: 50 stream n. 0
ADDED AUDIO PID 560, type: 50 stream n. 1
ADDED AUDIO PID 562, type: 50 stream n. 2
or
Auto-selected AVI audio ID = 1
then
mplayer -aid AudioPID -dumpaudio my_video_file.avi -dumpfile extracted_audio.mp3
For the ffmpeg comamnd line, it's best to also add:
-acodec copy
That way you get the exact audio track from the file with no re-encoding.
Just use VLC to Convert and extract audio to mp3
Post a Comment