Chapters when merging mkv files

Hi,

I have 2 mkv files that I want to merge into one and add a chapter so I can directly access the contents of the second file. The first file is a music file with 8 tracks and the second one only contains one track.

I’ve use this command to merge the files:

mkvmerge -o concatenated.mkv --generate-chapters when-appending SM1.mkv SM2.mkv

That generates a file with 9 chapters but if I go directly to chapter 9 in VLC it just goes to the beginning of the file and plays track 1…

Am I doing something wrong?

Thanks in advance

Welcome!

That doesn’t actually append the two files, it only adds both. Please read this FAQ entry for the difference.

See the mkvmerge documentation for the correct syntax.

Thanks for the reply!
Doing this instead:
mkvmerge -o concatenated.mkv --generate-chapters when-appending SM1.mkv + SM2.mkv
worked. It added an additional empty chapter for some reason but I can remove that in the Chapter Editor. I had to omit one sound track because the bitrate was different. Is there a way to work around that? (One was PCM 48K and the other was PCM 96K)

No. Those parameters must match.