This feature is supported by version 19.1 or greater.

Since version 19.3, the Matroska file format also supports the hierarchical metadata arrangement (as described in this article)

The code sample in below examples uses some methods defined in Working with Common Utilities.

 

Handling Metadata in MKV videos using GroupDocs.Metadata API

Getting MKV Format Metadata

The API allows getting MKV file format's metadata, the following steps are needed to be followed:

Following code snippet shows how to get metadata from the MKV file format.

<script src="https://gist.github.com/GroupDocsGists/b36aa635ad0348ccc890eaed2ade9a3a.js"></script>

Getting Matroska Segment Info

The API allows getting Matroska Segment Info, the following steps are needed to be followed:

Following code snippet shows how to get Matroska Segment Info.

<script src="https://gist.github.com/GroupDocsGists/c98348285d2a5aed4699734f8776d62d.js"></script>

Getting Matroska Tag Metadata

The API allows getting Matroska Tag Metadata, the following steps are needed to be followed:

Following code snippet shows how to get Matroska Tag Metadata.

<script src="https://gist.github.com/GroupDocsGists/3867f8ebdd731a008f268b0d34975edb.js"></script>

Getting Matroska Track Metadata

The API allows getting Matroska Track Metadata, the following steps are needed to be followed:

Following code snippet shows how to get Matroska Track Metadata.

<script src="https://gist.github.com/GroupDocsGists/fa498189d7f1fd0adfd680b07f4c77d3.js"></script>

Get Subtitles Stored in an MKV Video

This feature is supported by version 19.4 or greater.

Since version 19.4,The API allows reading all subtitles stored in an MKV video, the following steps are needed to be followed:

Following code snippet shows how to read subtitles metadata from the MKV file format.

<script src="https://gist.github.com/GroupDocsGists/774cb6ea5905d1d0396723bf053f72b9.js"></script>

Download Sample Files

You can download sample files used in this article.

sample.mkv

Following is the path of sample files used in code sample:

<script src="https://gist.github.com/GroupDocsGists/bb93dd08c1d23646282ede36abbbe680.js"></script>