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

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


Hi,all
   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->max_b_frames=1;
    c->pix_fmt = PIX_FMT_YUV420P;
........
    if (avcodec_open(c, codec) < 0) {
        fprintf(stderr, "could not open codec\n");
        exit(1);
    }   //when the opened codec is h263,the compiler throw out an error
here.

   I got a way to settle it out,which is to comment the line"c->max_b_frames
=1"
   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!
 
     lihui
     





More information about the ffmpeg-devel mailing list