In this tip, we will see how to use MPlayer in the terminal to extract audio from video files. You can save the extracted audio track in various sound formats such as MP3, OGG, WAV, etc.
Under Ubuntu/Linux Mint, open the terminal and run this command to install MPlayer:
sudo apt-get -y install mplayer
Via the terminal, use the cd command to access the folder containing your video file and run this command:
mplayer -vo null -dumpaudio -dumpfile audio.mp3 video.avi
mplayer -ao pcm:fast:file=audio.mp3 -vo null -vc null video.avi
audio.mp3 >>> replace it with any name of your choice followed by the desired audio format (wav, ogg, etc.)
video.avi >>> replace it with your own video file followed by the video extension
The audio file generated will be saved in the current folder location.