[Matroska-devel] LibMatroska example question

Armin Müller a1muelle at edu.uni-klu.ac.at
Thu Jan 26 14:02:43 CET 2006


Hi,

I downloaded and tried the simple matroska muxer from the x264  
project. It looks very promising, and i can read the code and I think  
I understand what it is doing.

When calling

int  mk_writeHeader( mk_Writer *w, const char *writingApp,
                      const char *codecID,
                      const void *codecPrivate, unsigned  
codecPrivateSize,
                      int64_t default_frame_duration,
                      int64_t timescale,
                      unsigned width, unsigned height,
                      unsigned d_width, unsigned d_height );

I don't know what codecPrivate should look like.

The usage of matroska in x264 shows how to use it, but there are two  
variables

uint8_t   *sps, *pps;

and I don't know what they stand for and what values they contain.

I hope I am not a nuisance to the list for such basic matroska  
questions.


thanks and best regards,
Armin



Am 26.01.2006 um 12:05 schrieb Mike Matsnev:

> On Thu, Jan 26, 2006 at 11:30:51AM +0100, Armin M?ller wrote:
>> I tried to adapt my muxing application to use pointers instead of the
>> & in the variable definition, but i ran into troubles again.
>>
>> I read parts of the source code of VLC (which does not contain a
>> matroska multiplexer) and mkvmerge. MkVMerge is a great application,
>> but it is really hard to understand because of all the beatiful
>> separation of functionallity into seperate modules.
>>
>> Doesn't there exist a simple sample application that only takes two
>> files (audio and video) and multiplexes them into one matroska file.
>> This programm should not have all the bells and whistles that e.g
>> MkvMerge has, because of learning how to se the pure multiplexing in
>> own applications.
>>
>> In my application I want to save two (or later more) streams
>> interleaved (one video, one audio, one video, ...) into a matroska
>> file. So I have a class MKIO that has a method
>>
>> bool writeFrame(Frame* frm, int trackId);
>>
>>
>> I want to have all the necessary variables defined as class variables
>> (KaxSegment, KaxTracks, ...) because I instantiate the Matroska
>> Header on first writeFrame and then on each additional call of this
>> method I "add" a Frame to the container (KaxCluster->AddFrame). So I
>> have to have access to some variables, that need to keep their values
>> throughout method calls.
>>
>> I follow this list quite some time and I notized that several people
>> would need some simple sample applications for matroska with quite
>> some good documentation (also inline code documentatio).
>>
>> I want to use Matroska as the main container format for our
>> multimedia framework, because I think it offers a lot of features
>> that allow us to store additional intormation (even as a kind of
>> metadata serialization of our internal metadata structure).
> You may want to take a look at x264 project, I've written a mini-muxer
> for it. It only supports one track atm, but extending it is fairly
> easy. It doesn't use libmatroska/libebml, but the API is much
> simpler.
> _______________________________________________
> Matroska-devel mailing list
> Matroska-devel at lists.matroska.org
> http://lists.matroska.org/cgi-bin/mailman/listinfo/matroska-devel
> Read Matroska-Devel on GMane: http://dir.gmane.org/ 
> gmane.comp.multimedia.matroska.devel
>




More information about the Matroska-devel mailing list