Hi all:
How to set the AVCodecContext when encodecing a picture to h263 video. I
set it as outexample.c, but the video's quality is not good!
AVCodecContext* pEnCodecCtx;
pEnCodecCtx = CAVCodec::AVCodecAllockContext();
pEnCodecCtx->codec_id = pDeCodecCtx->codec_id;
pEnCodecCtx->codec_type = pDeCodecCtx->codec_type;
pEnCodecCtx->bit_rate = 400000;
//pEnCodecCtx->bit_rate_tolerance = pDeCodecCtx->bit_rate_tolerance;
pEnCodecCtx->width = pDeCodecCtx->width;
pEnCodecCtx->height = pDeCodecCtx->height;
pEnCodecCtx->coded_width = pDeCodecCtx->coded_width;
pEnCodecCtx->coded_height = pDeCodecCtx->coded_height;
pEnCodecCtx->gop_size = 9;//pDeCodecCtx->gop_size;
//pEnCodecCtx->max_b_frames = 2;//pDeCodecCtx->max_b_frames;
pEnCodecCtx->pix_fmt = pDeCodecCtx->pix_fmt;
pEnCodecCtx->time_base.den = pDeCodecCtx->time_base.den;
pEnCodecCtx->time_base.num = pDeCodecCtx->time_base.num;
pEnCodecCtx->flags |= CODEC_FLAG_GLOBAL_HEADER;
--
/**
*Best wishes
*aaron
*Company:iflytek
*Department:Commniucation Value Adding Devpartment
*/
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user