You are not logged in.

#1 2012-01-09 06:40:01

kdar
Member
From: Sweet home Alabama!
Registered: 2009-06-27
Posts: 356

Remove extra audio tracks from mkv file?

How do I remove extra audio tracks from mkv file?

I have mkv file for one movie which contains few extra audio tracks besides English. I want to leave just English audio track and the video track.

What do I use?

I have tried to use mkvextract and checked which track id correspond to which audio or video. But not sure if it is best thing to use.

Last edited by kdar (2012-01-09 06:40:14)

Offline

#2 2012-01-09 07:54:12

/dev/zero
Member
From: Melbourne, Australia
Registered: 2011-10-20
Posts: 1,247

Re: Remove extra audio tracks from mkv file?

lol, I had this exact same problem last night. First run this to find out the number of your audio stream:

mplayer -vo null -ao null -frames 0 -v /path/to/movie.mkv | grep aid

Suppose you get an output like,

Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
[matroska,webm @ 0xa3164a0] max_analyze_duration reached
[matroska,webm @ 0xa3164a0] Estimating duration from bitrate, this may be inaccurate
[lavf] stream 1: audio (ac3), -aid 0, -alang rus, MVO @ DD 5.1 @ 448 kbps
[lavf] stream 2: audio (ac3), -aid 1, -alang rus, Визгунов @ DD 5.1 @ 448 kbps
[lavf] stream 3: audio (dca), -aid 2, -alang eng, Original @ DTS 5.1 @ 1510 kbps

Then you'd run,

mplayer -fs -aid 2 /path/to/movie.mkv

No doubt, analogous commands hold for mencoder if you want to make it permanent.

Offline

#3 2012-01-09 09:00:56

lolilolicon
Member
Registered: 2009-03-05
Posts: 1,722

Re: Remove extra audio tracks from mkv file?

You can selectively remove audio tracks from Matroska files with mkvmerge:

mkvmerge -o new.mkv -a n,m,... orig.mkv

where n/m are track IDs of the wanted audio tracks. To get the track IDs, use the `-i' or `-I' option of mkvmerge, or mkvinfo / mediainfo.

Last edited by lolilolicon (2012-01-09 09:03:48)


This silver ladybug at line 28...

Offline

#4 2012-01-10 17:59:25

kdar
Member
From: Sweet home Alabama!
Registered: 2009-06-27
Posts: 356

Re: Remove extra audio tracks from mkv file?

lolilolicon wrote:

You can selectively remove audio tracks from Matroska files with mkvmerge:

mkvmerge -o new.mkv -a n,m,... orig.mkv

where n/m are track IDs of the wanted audio tracks. To get the track IDs, use the `-i' or `-I' option of mkvmerge, or mkvinfo / mediainfo.

Thanks!
It worked for me. I didn't know before that I could use mkvmerge to do that, I thought I had to use mkvextract first to extract what I need manually first.

Offline

#5 2014-08-08 14:40:52

millernehappy
Banned
Registered: 2014-08-08
Posts: 1

Re: Remove extra audio tracks from mkv file?

I know an aticle which introduce three methods to remove audio from MKV files at: <link redacted>

Solution One: How to Remove Audio from Video for both Mac and Windows users?
Solution Two: How to Remove Audio from Video only for Windows users?
Solution Three: How to Remove Audio from Video only for Mac users?

Hope it will help you more or less.

-- mod edit: spam link redacted.  Trilby --

Last edited by Trilby (2014-10-29 21:09:58)

Offline

#6 2014-08-08 15:02:31

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: Remove extra audio tracks from mkv file?

A warm welcome to Arch Linux Forums.

millernehappy wrote:

I know an aticle which introduce three methods to remove audio from MKV files at: ...

Solution One: How to Remove Audio from Video for both Mac and Windows users?
Solution Two: How to Remove Audio from Video only for Windows users?
Solution Three: How to Remove Audio from Video only for Mac users?

None of these are related to gnu/linux. That software may work with wine, but why bother?

millernehappy wrote:

Hope it will help you more or less.

Should the OP be still alive, I doubt he will be still concerned about this issue, that judging from his previous post, has been already solved. By registering you agreed to follow the rules, which greatly discourage necrobumping.

Last edited by Trilby (2014-10-29 21:10:13)

Offline

#7 2014-10-29 21:10:50

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,560
Website

Re: Remove extra audio tracks from mkv file?

Closed as necrobump now gathering spam.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

Board footer

Powered by FluxBB