[FFmpeg-devel] the efficiency of avcodec_encode_video method

xutm xutom2006
Sun Mar 6 15:40:31 CET 2011

Hi all,

    Now i use ffmpeg to encode my YUV420p video stream , and i found the
efficiency is so low that there is only 10-15 frames per second, but I want
the frame rate is 25fps. Maybe i have set the wrong codec parameters. The
following is my codec parameters:

pCodecContext->bit_rate = 400000;
pCodecContext->width = 352;
pCodecContext->height = 288;
pCodecContext->time_base.num = 1;
pCodecContext->time_base.den = 25;
pCodecContext->gop_size = 10;
pCodecContext->max_b_frames = 2;
pCodecContext->pix_fmt = PIX_FMT_YUV420P;

    Can somebody guide me how to change the parameters to get the higher
efficiency of avcodec_encode_video? Thanks in advances!


More information about the ffmpeg-devel mailing list