[Matroska-users] avi compatibility

Paulo Assis pj.assis at gmail.com
Tue Apr 14 00:21:53 CEST 2009


Hello,

I'm trying to add matroska support to a linux webcam capture application
that I developed.
Currently it supports avi only, with the following video codecs: MJPG, YUY2,
DIB, , WMV1, FLV1, MPEG1, (MPEG2 and MPEG4 in svn), as for audio: PCM16 and
MP2 (eventually MP3 and AAC also)

Since that for the first 5 codecs it doesn't seem to exist any matroska
counterpart I though I could use the avi compatibility codecID
"V_MS/VFW/FOURCC"

When seeting the codec ID for the mkv file, I've found some confusing
information about this. Acording to the information available I should set a
BITMAPINFOHEADER structure in the codec private data, but then in the
descritpion it talks about  AVISTREAMINFO.

So now I'm very confused, since these structs don't relate to each other:

from microsoft:

typedef struct tagBITMAPINFOHEADER {
  DWORD *biSize*;
  LONG *biWidth*;
  LONG *biHeight*;
  WORD *biPlanes*;
  WORD *biBitCount*
  DWORD *biCompression*;
  DWORD *biSizeImage*;
  LONG *biXPelsPerMeter*;
  LONG *biYPelsPerMeter*;
  DWORD *biClrUsed*;
  DWORD *biClrImportant*;
} BITMAPINFOHEADER;


and

typedef struct {
    DWORD fccType;
    DWORD fccHandler;
    DWORD dwFlags;
    DWORD dwCaps;
    WORD  wPriority;
    WORD  wLanguage;
    DWORD dwScale;
    DWORD dwRate;
    DWORD dwStart;
    DWORD dwLength;
    DWORD dwInitialFrames;
    DWORD dwSuggestedBufferSize;
    DWORD dwQuality;
    DWORD dwSampleSize;
    RECT  rcFrame;
    DWORD dwEditCount;
    DWORD dwFormatChangeCount;
    TCHAR szName[64];
} AVISTREAMINFO;

Should I set both of these structs, if so in wich order?
Is there any way of muxing video streams for the first five codecs in mkv?
Using the avi container works very well, but it has some really big
limitations that I was hopping to overcome with matroska.

Best regards,
Paulo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.matroska.org/pipermail/matroska-users/attachments/20090413/3ae95f2a/attachment.html>


More information about the Matroska-users mailing list