I recently came across some some excellent concert footage. I wanted to have the performance available on my mp3 player but I didn’t want to re-encode the audio. Ffmpeg came to the rescue.
Using ffmpeg you can split out the audio and video components of any video stream it understands. In fact you can tell ffmpeg to transcode the audio as well. In my case the audio was already in mp3 format so I didn’t want to transcode. Ffmpeg allows you to specify “copy” as an output format in which case it doesn’t modify the audio stream in any way.
To extract the audio I ran the following. The -vn switch instructs ffmpeg to omit the video stream. The default behavior would be to output a video stream as well as audio streams. The -acodev switch tells ffmpeg what format you want the audio stream to be output as. In my case I didn’t want it transcoded so I specified “copy.”
$ ffmpeg -i slayer-rock-am-ring-2007.avi -vn -acodec copy slayer-rock-am-ring-2007.mp3
Now I just need to find a tool to break mp3s into audio tracks without re-encoding.