To extract the audio from an .avi video file, use the command:
mplayer video.avi -vc dummy -vo null -af resample=44100 -ao pcm:file=ripped-audio.wav
Make sure that the program oggenc is installed. I didn't know which package this program was, so I searched and found this nifty tool for Ubuntu: apt-file
Install it and update its internal database:
# apt-get install apt-file
# apt-file update
Then using this tool to search for oggenc told me I could find it in the vorbis-tools package:
$ apt-file search oggenc
vorbis-tools: /usr/bin/oggenc
I installed the package easily:
sudo apt-get install vorbis-tools
Then you can compress the .wav file with the following command:
oggenc -q4 ripped-audio.wav -o ripped-audio.ogg
That's it!
I have also documented this in the overshoot wiki: extract audio from .avi file.
Post new comment