I have documented the procedure to create an MKV file that plays bits from other MKV files here:
https://alex.corcoles.net/notes/tech/splicing-mkvs