How to remove only one track (not all) from video file container (.vob or .mkv) using ffmpeg?
I know I can just copy video (-c:v copy -an
) and specific
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:
-map 0:1
-an
, because there are audio tracks. However, if there are no audio tracks at all, you may need to use such an attribute.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.