[Matroska-devel] problems compiling, testing, and using libebml and libmatroska...

Steve Lhomme steve.lhomme at free.fr
Tue Oct 3 21:25:48 CEST 2006

Greg Handi wrote:
> Greetings, I'm working on implementing support for the matroska file
> format on a hardware device but I'm running into a number of problems
> trying to use the libraries libebml and libmatroska (which initially
> seemed like a better idea than starting from scratch).

Good news, what is the hardware platform like ? For example the CPU.

> I'm new to the mailing list but I searched through some previous posts
> regarding some of these issues before posting.
> I was looking for libmatroska developer user documentation, I see from
> a thread back in January that none existed then and it would appear
> that this "problem" still exists...?  Is there any documentation
> explaining how to use libebml and libmatroska to read MKV files, at
> all, anywhere?

There's the one that can be generated from DoXygen. It will at least 
show you the hierarchy between the classes. But you need to know "a 
little" about matroska to use the libs. There's mkvmerge that uses the 
lib, but it's a bit cryptic to read. You may try mkuncat that is a 
simple tool to read and separate matroska segments. Grab it from our SVN :

> I see from a thread back in early 2003 that there was talk of porting
> to C, what became of this?  Is there a C only version or was that
> abandoned and only the C++ version exists?

There are a few implementations in C on the net. The most used one are 
the one from Haali used in his DirectShow filters and also in TCPMP (PDA 
video player).

> Now I apologize that this next comment is a bit harsh but I think it
> needs to be said given the problems potential adopters face.  Without
> any developer documentation or at least a working test program (that is
> part of the library source distribution) that comments how to use the
> API I believe adoption of libmatroska is going to be significantly
> crippled.  If you want people to use the library and therefor to have
> support for the format grow then you need to facilitate this with some
> kind of documentation and working test cases.  I have seen a number of
> posts to various forums from developers who wrote their own parsers
> from scratch based on the spec. rather than use the provided libraries;
> from my experience I can theorize that this is because that was easier
> than trying to figure out an undocumented library.

Yes. But also because many people prefer C to C++. It is even more true 
for embedded platforms (like yours?), where C is much smaller. 
libmatroska was created to be a general use library for both reading and 
writing matroska files in various ways. This versatility has a price. 
The other libs do less but usually enough for playback, so I suggest you 
should use these instead.

> As for myself, I probably won't abandon support, but if I can't test
> the libraries and find some example to follow I may just start from
> scratch too which could hurt future compatibility and updateability.
> Thank-you for your time and double thanks to anyone who can provide me
> with some usage/testing guidance.

Don't hesitate to ask if you have more questions. Also read the 
docs/specs about matroska on the website. It's better if you want to 
know what's going on and what "Elements" you need to handle in your code.


More information about the Matroska-devel mailing list