Hi All,
I am new to this forum.
I am using avcodec_encode_video API to encode data into MPEG4 format.
But when i display encoded data after decoding it then i find lines over
frame.
And Video Quality is also not so good.
I tried lot to figure out the problem.But could not succeeded.
I have opened the codec wit h following parameters:
AVCodecContect **apContect;
/* Some code missing */
(*apContext)->bit_rate = 90000;
(*apContext)->profile = 0; /* New */
(*apContext)->pix_fmt = PIX_FMT_YUV420P;
(*apContext)->codec_id = CODEC_ID_MPEG4; /* New */
(*apContext)->codec_type = CODEC_TYPE_VIDEO;
(*apContext)->width = 352;//img->width;
(*apContext)->height = 288;//img->height;
(*apContext)->time_base.den = 1;
(*apContext)->time_base.num = 30;
(*apContext)->gop_size = 30;
(*apContext)->qmin = 4;//max_b_frames = 1;
(*apContext)->mpeg_quant = 0;
(*apContext)->qmin = 20;
(*apContext)->qmax = 20;
(*apContext)->qcompress = 0;
(*apContext)->qblur = 0;
(*apContext)->max_qdiff = 0;
(*apContext)->max_b_frames = 0;
(*apContext)->mpeg_quant = 0;
(*apContext)->flags|=CODEC_FLAG_4MV;
(*apContext)->flags|=CODEC_FLAG_H263P_UMV;
(*apContext)->flags|=CODEC_FLAG_GMC;
(*apContext)->flags|=CODEC_FLAG_LOOP_FILTER;//(*apContext)->bit_rate_tolerance
= bitRate << 3;
(*apContext)->flags|=CODEC_FLAG_H263P_SLICE_STRUCT;
(*apContext)->rc_min_rate = 0; // minimum bitrate
(*apContext)->max_qdiff = 3; // max q difference between frames
(*apContext)->rc_qsquish = 0; // limit q by clipping
(*apContext)->rc_eq= "tex^qComp"; // rate control equation
(*apContext)->qcompress = 0.5;
(*apContext)->i_quant_factor = (float)-0.6;
(*apContext)->qmax = 24;
(*apContext)->i_quant_offset = (float)0.0;
Please Suggest me where i am doing mistake.
Thanks in Advance.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user