
SFID1 stands for "source file ID 1", DFID1 for "destination file ID 1". Those numbers are the "file IDs" ( SFID1/ DFID1 etc.) used in -append-to. Next, enumerate all the files in the order they're occurring on the command line, starting at 0: You will have to use -append-to in this case, yes.įirst, construct the basic command line (again I'm only adding line breaks for clarity): mkvmerge -o output.mkv I want to add (brief) audio between two video segmentsĪh right, I didn't read that correctly. I am basically satisfied with displaying the last frame of the previous video segment until the audio has finished, after which the next video segment starts. Wouldn't the command as you have written add a second audio track? That is not what I am trying to do - I want to add (brief) audio between two video segments (I often do this to repair - without "editing" - when there is leftover sound after the video cuts away). The cue entries (the index) are being written. 1 ('audio_segment_1.mkv') to track 1 from file no. The file 'temp1.mkv' has been opened for writing.Īppending track 0 from file no. $ /usr/bin/mkvmerge -append-to 1:0:0:1 -o temp1.mkv video_segment_1.mkv + audio_segment_1.mkv Please keep that in mind if mkvmerge aborts with an error message regarding invalid '-append-to' options.Įrror: The track number 0 from the file 'audio_segment_1.mkv' cannot be appended to the track number 0 from the file 'video_segment_1.mkv'. A default mapping of 1:0:0:0 will be used instead. No append mapping was given for the file no. 'audio_segment_1.mkv' track 0: Using the output module for the format 'AAC'. 'video_segment_1.mkv' track 1: Using the output module for the format 'AAC'. 'video_segment_1.mkv' track 0: Using the output module for the format 'AVC/h.264'. 'audio_segment_1.mkv': Using the demultiplexer for the format 'Matroska'.

'video_segment_1.mkv': Using the demultiplexer for the format 'Matroska'. Mkvmerge v23.0.0 ('The Bride Said No') 64-bit $ /usr/bin/mkvmerge -o temp1.mkv video_segment_1.mkv + audio_segment_1.mkv $ mkvmerge -identify audio_segment_1.mkvįile 'audio_segment_1.mkv': container: Matroska $ mkvmerge -identify video_segment_1.mkvįile 'video_segment_1.mkv': container: Matroska I (thought I) had to use -append-to simply because there were a different number of tracks in the segments.
