mkvmerge
Merge and extract multimedia streams. tldr-pages
On several platforms
Several platforms
Display information about a Matroska file
mkvmerge --identify path/to/file.mkvIdentifyExtract the audio from track 1 of a specific file
mkvextract tracks path/to/file.mkv 1:path/to/output.webmExtract the subtitle from track 3 of a specific file
mkvextract tracks path/to/file.mkv 3:path/to/subs.srtAdd a subtitle track to a file
mkvmerge --output path/to/output.mkv path/to/file.mkv path/to/subs.srtIdentify