[Ffmpeg-devel] newbie question- the context of h263 codec

lih lih
Sun Jul 23 20:35:24 CEST 2006

   I am a newbie here.I begin to study the avcodec.lib and have red the
apiexample.c. The test of mpeg1video codec is fine, but when I change the
codec to h263 it throw out some error.

    //codec = avcodec_find_decoder(CODEC_ID_MPEG1VIDEO);
    codec = avcodec_find_encoder(CODEC_ID_H263);
    c->time_base= (AVRational){1,25};
    c->gop_size = 10; /* emit one intra frame every ten frames */
    c->pix_fmt = PIX_FMT_YUV420P;
    if (avcodec_open(c, codec) < 0) {
        fprintf(stderr, "could not open codec\n");
    }   //when the opened codec is h263,the compiler throw out an error

   I got a way to settle it out,which is to comment the line"c->max_b_frames
   But I do not know why it work  right,does h263 codec not support the
max_b_frames parameters? Furthermore I eager to get some documents about how
to set the right parameter of AVFormatContext of h263 codec of ffmpeg.If
there is some advice please let me know,thanks in advance.

Best regards!

More information about the ffmpeg-devel mailing list