As for decoding the mkv, I am able to do so,<div><br></div><div><div>C:\prefix\exec>ffmpeg.exe -i C:\prefix\exec\BBB\mkv\left.mkv test.avi</div><div>ffmpeg version N-34549-g13b7781, Copyright (c) 2000-2011 the FFmpeg developers</div>
<div>  built on Nov  6 2011 22:08:46 with gcc 4.6.1</div><div>  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-runtime-cpudetect --enable-avisynth --enable-bzlib --enable-frei0r --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-li</div>
<div>bfreetype --enable-libgsm --enable-libmp3lame --enable-libopenjpeg --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis</div>
<div> --enable-libvpx --enable-libx264 --enable-libxavs --enable-libxvid --enable-zlib</div><div>  libavutil    51. 24. 0 / 51. 24. 0</div><div>  libavcodec   53. 28. 0 / 53. 28. 0</div><div>  libavformat  53. 19. 0 / 53. 19. 0</div>
<div>  libavdevice  53.  4. 0 / 53.  4. 0</div><div>  libavfilter   2. 47. 0 /  2. 47. 0</div><div>  libswscale    2.  1. 0 /  2.  1. 0</div><div>  libpostproc  51.  2. 0 / 51.  2. 0</div><div>Input #0, matroska,webm, from 'C:\prefix\exec\BBB\mkv\left.mkv':</div>
<div>  Duration: 00:00:14.40, start: 0.000000, bitrate: 3141 kb/s</div><div>    Stream #0:0(eng): Video: h264 (High), yuv420p, 1920x1080, SAR 1:1 DAR 16:9, 25 fps, 25 tbr, 20k tbn, 50 tbc (default)</div><div>[buffer @ 00000000043988B0] w:1920 h:1080 pixfmt:yuv420p tb:1/1000000 sar:1/1 sws_param:</div>
<div>Output #0, avi, to 'lol.avi':</div><div>  Metadata:</div><div>    ISFT            : Lavf53.19.0</div><div>    Stream #0:0(eng): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 tbn, 25 tbc (default)</div>
<div>Stream mapping:</div><div>  Stream #0:0 -> #0:0 (h264 -> mpeg4)</div><div>Press [q] to stop, [?] for help</div><div>frame=  360 fps= 64 q=31.0 Lsize=    3376kB time=00:00:14.40 bitrate=1920.6kbits/s</div><div>video:3362kB audio:0kB global headers:0kB muxing overhead 0.423509%</div>
<br><div class="gmail_quote">On Thu, Mar 1, 2012 at 9:38 AM, Patrick Zielinski <span dir="ltr"><<a href="mailto:dzeesea@gmail.com">dzeesea@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry for the delay, I kind of lost track of time, here are the commands I've used to generate an mkv format video.<div><br></div><div><table border="0" cellpadding="0" cellspacing="0" width="411" style="border-collapse:collapse;width:309pt">


 <colgroup><col width="94" style="width:71pt">
 <col width="61" style="width:46pt">
 <col width="64" span="4" style="width:48pt">
 </colgroup><tbody><tr height="20" style="min-height:15.0pt">
  <td height="20" colspan="6" width="411" style="min-height:15.0pt;width:309pt"><b>ffmpeg.exe -i "C:\path\left_%03d.bmp" -pix_fmt
  yuv420p left.y4m</b></td>
 </tr>
 <tr height="20" style="min-height:15.0pt">
  <td height="20" colspan="3" style="min-height:15.0pt"><b>x264.exe
  left.y4m -o left.mkv</b><br><br><br><table border="0" cellpadding="0" cellspacing="0" width="411" style="border-collapse:collapse;width:309pt"><tbody><tr height="20" style="min-height:15pt"><td height="20" colspan="3" style="min-height:15pt">

I'm still not really able to consistently decode video's of other format than .h264, code hasn't changed much, I suppose I'll have to inspire myself more to the ffmpeg.c script.</td><td> </td>
</tr></tbody></table></td><td><br></td>
  <td> </td>
  <td> </td>
 </tr></tbody></table></div><div class="HOEnZb"><div class="h5"><div><br><div class="gmail_quote">On Thu, Feb 23, 2012 at 4:28 PM, Alex Cohn <span dir="ltr"><<a href="mailto:alexcohn@netvision.net.il" target="_blank">alexcohn@netvision.net.il</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Thu, Feb 23, 2012 at 02:16, Patrick Zielinski <<a href="mailto:dzeesea@gmail.com" target="_blank">dzeesea@gmail.com</a>> wrote:<br>
> Ok, firstly please bare with me, up until two weeks ago I didn't even know<br>
> what codec were and how encoding worked. Also, this code is ported within a<br>
> C++ framework so it might not comply with your usual coding standards.<br>
><br>
> Essentially here is the code that I have written which resembles closely to<br>
> the libav decoding example with minor tweaks due to deprecated functions. I<br>
> actually have a different version in our code, but it's mostly just working<br>
> with the buffer and the image data to add to our own structure.<br>
><br>
> <a href="http://pastebin.ca/2120920" target="_blank">http://pastebin.ca/2120920</a><br>
><br>
> I'd like to have either tips on how I could make this more robust, or what<br>
> steps I should take to extract each frame from different formats. I've taken<br>
> a look at ffmpeg.c, but not as much as I wanted.<br>
<br>
</div>Regarding the specific problem decoding an MKV file, you did not write<br>
if you succeed to open this particular file with command-line ffmpeg.<br>
<br>
Regarding your code, you should use the AVCodecContext you get from<br>
avformat_open_input() for the chosen stream, no need to create a new<br>
one as you do in lines 127 and on.<br>
<div><div><br>
BR,<br>
Alex<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>