How to read the metadata of a MKV movie files in C#?

Rella picture Rella · Jan 5, 2010 · Viewed 12k times · Source

How to read the metadata of a MKV movie files in C# (or C or C++ or AS3)?

for example such

creator
metadatacreator
hasKeyframes
hasVideo
hasAudio
hasMetaData
canSeekToEnd
duration
datasize
videosize
videocodecid
audiosize
audiocodecid
audiosamplerate
audiosamplesize
stereo
filesize
lasttimestamp
lastkeyframetimestamp
lastkeyframelocation
keyframes (filepositions, times)
width
height
framerate
videodatarate
audiodatarate

Answer

monksy picture monksy · Jan 5, 2010

There is always attempting to parse the header yourself.

Also I've seen references to the EBML library being used to decode MKV files. Good luck!