You are looking for -map
.
I have changed to using avconv
, but it should be about the same.
Let's say you have a file called "input.vob" with one video and two audio tracks; and you want to have "output.vob" with the video and the last audio.
You would do:
avconv -i input.vob -map 0:0 -c:v copy -map 0:2 -c:a copy output.vob
You should notice that:
- I did not copy
-map 0:1
- I did not need to do
-an
, because there are audio tracks. However, if there are no audio tracks at all, you may need to use such an attribute. - Sometimes the streams are not numbered in the way i've described, for example audio can come before video.
- If there are subtitle streams there, you need to figure out how to deal with them as well.
You cannot work on files "in place", you need to save into a different file.
P.S. You may want to ask such questions on video.stackexchange.com next time.