VideoHelp Forum

+ Reply to Thread
Results 1 to 5 of 5
Thread
  1. Member
    Join Date
    Sep 2021
    Location
    London
    Search Comp PM
    I try to multiplex the video track and one audio track from the same mkv file

    I used following command:

    mkvmerge -o output.mkv -d 0 Video.mkv -a 1 Video.mkv

    But every track also mix in together, I only want track 0 and Track 1 though

    The official document says -d means selected video track, -a means selected audio track

    Is there any lines I am not entering correctly here ?
    Last edited by khv742; 10th Sep 2021 at 23:16.
    Quote Quote  
  2. Member netmask56's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Search Comp PM
    Why not use the latest version of MKVToolNix
    SONY 75" Full array 200Hz LED TV, Yamaha A1070 amp, Zidoo UHD3000, BeyonWiz PVR V2 (Enigma2 clone), Chromecast, Windows 7 Ultimate, QNAP NAS TS851
    Quote Quote  
  3. Member
    Join Date
    Apr 2007
    Location
    Australia
    Search Comp PM
    Originally Posted by netmask56 View Post
    Why not use the latest version of MKVToolNix
    I totally agree.

    If you want to do it via the command line then these examples may help.

    If you have other tracks in a video - subtitles, chapters, etc., then the track numbers will change.
    You can get the track numbers using MediaInfo. Mostly.
    If the languages for the audio and subtitle tracks are undefined then it's trial and error to get the correct combination.

    If you have 1 video with 3 audio tracks.
    The video and audio track 1
    Code:
    mkvmerge.exe --output Video-New.mkv --audio-tracks 1 Video-c.mkv --track-order 0:0,0:1
    The video and audio track 2
    Code:
    mkvmerge.exe --output Video-New.mkv --audio-tracks 2 Video-c.mkv --track-order 0:0,0:2
    The video and audio track 3
    Code:
    mkvmerge.exe --output Video-New.mkv --audio-tracks 3 Video-c.mkv --track-order 0:0,0:3
    If you have 2 videos and want the video from 1 and the audio from 2.
    Code:
    mkvmerge.exe --output Video-New.mkv --no-audio Video-a.mp4 --no-video Video-b.mp4 --track-order 0:0,1:1
    It's a good idea to define the language.
    Code:
    mkvmerge.exe --output Video-New.mkv --audio-tracks 1 --language 1:en Video-c.mkv --track-order 0:0,0:1
    I hope these help.
    Again, it's better to use MKVtoolnixGUI

    Cheers
    Quote Quote  
  4. Member
    Join Date
    Sep 2021
    Location
    London
    Search Comp PM
    Originally Posted by pcspeak View Post
    Originally Posted by netmask56 View Post
    Why not use the latest version of MKVToolNix
    I totally agree.

    If you want to do it via the command line then these examples may help.

    If you have other tracks in a video - subtitles, chapters, etc., then the track numbers will change.
    You can get the track numbers using MediaInfo. Mostly.
    If the languages for the audio and subtitle tracks are undefined then it's trial and error to get the correct combination.

    If you have 1 video with 3 audio tracks.
    The video and audio track 1
    Code:
    mkvmerge.exe --output Video-New.mkv --audio-tracks 1 Video-c.mkv --track-order 0:0,0:1
    The video and audio track 2
    Code:
    mkvmerge.exe --output Video-New.mkv --audio-tracks 2 Video-c.mkv --track-order 0:0,0:2
    The video and audio track 3
    Code:
    mkvmerge.exe --output Video-New.mkv --audio-tracks 3 Video-c.mkv --track-order 0:0,0:3
    If you have 2 videos and want the video from 1 and the audio from 2.
    Code:
    mkvmerge.exe --output Video-New.mkv --no-audio Video-a.mp4 --no-video Video-b.mp4 --track-order 0:0,1:1
    It's a good idea to define the language.
    Code:
    mkvmerge.exe --output Video-New.mkv --audio-tracks 1 --language 1:en Video-c.mkv --track-order 0:0,0:1
    I hope these help.
    Again, it's better to use MKVtoolnixGUI

    Cheers
    I just tried your method, but it still mix in every tracks

    I use command lines in Linux, I agree it's easier to do it in windows with mkvtoolnix gui
    Quote Quote  
  5. Member
    Join Date
    Sep 2021
    Location
    London
    Search Comp PM
    After playing with some combination, I got it working now
    Quote Quote  



Similar Threads