Skip to end of metadata
Go to start of metadata
Contents Summary
 

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

This feature is supported by version 19.1 or greater.

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:

  • Initialize MatroskaFormat

  • Get metadata property e.g DocType using MatroskaFormat.getEbmlHeader().getDocType()

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

Getting Matroska Segment Info

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

  • Initialize MatroskaFormat

  • Loop through MatroskaFormat.getSegments() to get MatroskaSegmentInfoMetadata 

  • Get segment info e.g DateUtc using MatroskaSegmentInfoMetadata.getDateUtc()

Following code snippet shows how to get Matroska Segment Info.

Getting Matroska Tag Metadata

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

  • Initialize MatroskaFormat

  • Loop through MatroskaFormat.getTags() to get MatroskaTagMetadata 

  • Get Matroska Tag Metadata  e.g TargetType using MatroskaTagMetadata.getTargetType()

Following code snippet shows how to get Matroska Tag Metadata.

Getting Matroska Track Metadata

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

  • Initialize MatroskaFormat

  • Loop through MatroskaFormat.getTracks() to get MatroskaTrackMetadata 

  • Get Matroska Track Metadata e.g CodecId using MatroskaTrackMetadata.getCodecId()
  • Get audio track metadata using  MatroskaTrackMetadata instance of MatroskaAudioTrackMetadata

  • Get video track metadata using  MatroskaTrackMetadata instance of MatroskaVideoTrackMetadata

Following code snippet shows how to get Matroska Track Metadata.

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:

Labels
  • No labels