Using FFMPEG to extract a specific audio track from movie
To get a listing of all the audio and video streams
$ ffmpeg -i myvideo.vob
Convert the fourth stream into mp3
$ ffmpeg -i myvideo.vob -map 0:3 -vn -acodec mp3 -ar 22050 -ab 96k -ac 1 mr.mp3
"-map input:stream" tells ffmpeg to process the given stream. ffmpeg can process input from several files. "input" is the zero-based index of the input file we want to use − 0 for the first, 1 for the second etc. "stream" is the number of the stream within this file that we want to use, also zero-based.
"-map 0:3" therefore means that we want to use the fourth audio stream in the first (and only, in this case) input file.
You can also just process part of the stream. Below tells it to start 60 seconds into the stream and only process 10 seconds
$ ffmpeg -i myvideo.vob -ss 60 -t 10 -map 0:3 -vn -acodec mp3 -ar 22050 -ab 96k -ac 1 mr.mp3 |