mkvalidator is a command line tool to verify Matroska files for spec conformance
https://www.matroska.org/downloads/mkvalidator.html