Hello,<br><br>I'm trying to add matroska support to a linux webcam capture application that I developed.<br>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)<br>
<br>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"<br><br>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.<br>
<br>So now I'm very confused, since these structs don't relate to each other:<br><br>from microsoft:<br><pre class="libCScode" style="white-space: pre-wrap;" id="ctl00_rs1_mainContentContainer_ctl04other"><span><span id="src3" class="srcSentence">typedef struct tagBITMAPINFOHEADER { <br>
DWORD </span></span><i>biSize</i><span><span id="src4" class="srcSentence">; <br> LONG </span></span><i>biWidth</i><span><span id="src5" class="srcSentence">; <br> LONG </span></span><i>biHeight</i><span><span id="src6" class="srcSentence">; <br>
WORD </span></span><i>biPlanes</i><span><span id="src7" class="srcSentence">; <br> WORD </span></span><i>biBitCount</i><span><span id="src8" class="srcSentence"> <br> DWORD </span></span><i>biCompression</i><span><span id="src9" class="srcSentence">; <br>
DWORD </span></span><i>biSizeImage</i><span><span id="src10" class="srcSentence">; <br> LONG </span></span><i>biXPelsPerMeter</i><span><span id="src11" class="srcSentence">; <br> LONG </span></span><i>biYPelsPerMeter</i><span><span id="src12" class="srcSentence">; <br>
DWORD </span></span><i>biClrUsed</i><span><span id="src13" class="srcSentence">; <br> DWORD </span></span><i>biClrImportant</i><span><span id="src14" class="srcSentence">; <br>} BITMAPINFOHEADER; </span></span></pre><br>
and <br><pre class="libCScode" style="white-space: pre-wrap;" id="ctl00_rs1_mainContentContainer_ctl01">typedef struct { <br> DWORD fccType; <br> DWORD fccHandler; <br> DWORD dwFlags; <br> DWORD dwCaps; <br> WORD wPriority; <br>
WORD wLanguage; <br> DWORD dwScale; <br> DWORD dwRate; <br> DWORD dwStart; <br> DWORD dwLength; <br> DWORD dwInitialFrames; <br> DWORD dwSuggestedBufferSize; <br> DWORD dwQuality; <br> DWORD dwSampleSize; <br>
RECT rcFrame; <br> DWORD dwEditCount; <br> DWORD dwFormatChangeCount; <br> TCHAR szName[64]; <br>} AVISTREAMINFO;</pre>Should I set both of these structs, if so in wich order?<br>Is there any way of muxing video streams for the first five codecs in mkv? <br>
Using the avi container works very well, but it has some really big limitations that I was hopping to overcome with matroska.<br><br>Best regards,<br>Paulo<br><br><br>