[Libav-user] Decoding specific formats?

Alex Cohn alexcohn at netvision.net.il
Wed Feb 22 17:22:37 CET 2012

On Tue, Feb 21, 2012 at 23:24, Patrick Zielinski <dzeesea at gmail.com> wrote:
> Hello all, I have integrated decoding with libavformat and libavcodec a
> basic decoder. It works for H264 encoded video's and also I converted one
> into avi, it also works.
> But for some reason when I try other formats like .mkv I receive this
> error:
> [h264 @ 05f32a80] no frame!
> I've encoded  the mkv's with x264 so I'm having a hard time understand how
> it cannot find a frame, it occurs when I call
> avcodec_decode_video2(pCodecCtx, pFrame, &gotFrame, &packet);
> What kind of details am I missing, because the different structs seem to
> have correct data.

You probably have metadata missing, e.g. SPS/PPS, if MKV container
keeps this information not with the frames that you push into
avcodec_decode_video2(). Please make sure that your mkv can be played
by command-line ffmpeg. If this simple test succeeds, please make your
initialization code available (e.g. via pastebin).


More information about the Libav-user mailing list