This is a great thing because it allows people of different languages to use the same video file. Alternately it allows the directors commentary to be included.
That said, I am an English speaker, and I have never had any interest in directors commentaries so all these extra audio tracks represent unwanted data in my movie library.
Also, some files default to playing the commentary or the non English track in some players which is also mildly annoying.
So, in shuch circumstances you can use ffmpeg to remove the unnecessary tracks from an AVI file (I have not tried it for MKV, I will update this page if I do.
Things you need to install are vlc and avconv (avconv is the replacement for ffmpg which is now deprecated)
sudo apt-get install vlc libav-tools
Note: On RedHat based distributions you must install libav. ie:
You can see what audio tracks are available, and select them by opening the video file in vlc and looking in Audio>Audio Track.yum install libav
Once you have determined which track you want to keep, you can run the file through avconv to strip the unwanted tracks. In this example I use the second map parameter to keep track 2 (ie lose track 1);
avconv -i sourcefile.avi -map 0:0 -map 0:2 -acodec copy -vcodec copy outfile.avi
And that's it, happy Linuxing (is that a word?)
2 comments:
Nice, this rather random post did exactly what I needed xD. I hade some weird trueaudio track, whose codec my blurayplayer did not like sooo much....
IMHO this is stream removal not track removal which is huge difference.
Post a Comment