How to extract Audio from a Video file in Linux

Feb 15th, 2012 | By | Category: Linux / Freebsd

Yet another area where I rejoice for being a linux user as this shit is sooo much easier and faster in linux than it is in windows using a completely unnecessary GUI.  There are two ways to do this but I’ve always found that ffmpeg works best over mplayer.. However I’ll post both of them here regardless:

ffmpeg -i inputfile.avi -acodec copy -ab 128 outputfile.mp3 

As mentioned in a previous article you might run into some codec errors and that is why we have the -acodec copy option in there.  the -ab sets your audio bitrate we I beleive defaults to 64k if you don’t specify differently

The mplayer option which I haven’t played around with would be

mplayer -dumpaudio my_video_file.avi -dumpfile extracted_audio.mp3


Many thanks to DailyGyan for the tips in the first place:

Tags: , , , , , ,

Leave a Comment