[Libav-user] YUV to H.264 encoding using baseline profile.
zsz8060
shahdarshak at gmail.com
Mon Jun 20 13:25:07 CEST 2011
Hi Experts,
I want to encode YUV to H264 baseline profile. The encoding is done of good
quality but I found two major issues ffmepg uses High profile instead of
baseline profile and video is jerky. Here are the parameters I used. I would
like to know why it always selects high profile and with which setting I can
select baseline profile.
pCodecCtxEncoder->bit_rate = 512000;
pCodecCtxEncoder->width = 704;
pCodecCtxEncoder->height = 576;
pCodecCtxEncoder->time_base.num = 1;
pCodecCtxEncoder->time_base.den = 25;
pCodecCtxEncoder->gop_size = 40;
pCodecCtxEncoder->max_b_frames = 2;
pCodecCtxEncoder->pix_fmt = PIX_FMT_YUV420P;
pCodecCtxEncoder->bit_rate_tolerance = (int) (128000.f * 0.20f);
pCodecCtxEncoder->rc_max_rate = 10;
pCodecCtxEncoder->b_frame_strategy = 0;
pCodecCtxEncoder->coder_type = 0;
pCodecCtxEncoder->me_cmp = 256;
pCodecCtxEncoder->me_range = 16;
pCodecCtxEncoder->qmin = 10;
pCodecCtxEncoder->qmax = 51;
pCodecCtxEncoder->scenechange_threshold = 40;
pCodecCtxEncoder->flags |= CODEC_FLAG_LOOP_FILTER;
pCodecCtxEncoder->me_method = ME_HEX;
pCodecCtxEncoder->me_subpel_quality = 7;
pCodecCtxEncoder->i_quant_factor = 0.71;
pCodecCtxEncoder->qcompress = 0.6;
pCodecCtxEncoder->max_qdiff = 4;
pCodecCtxEncoder->directpred = 1;
pCodecCtxEncoder->keyint_min = 25;
pCodecCtxEncoder->partitions |= X264_PART_I4X4 + X264_PART_P8X8 +
X264_PART_P4X4 + X264_PART_P8X8 + X264_PART_B8X8;
pCodecCtxEncoder->refs = 5;
pCodecCtxEncoder->trellis = 1;
pCodecCtxEncoder->flags2|= CODEC_FLAG2_MIXED_REFS;
pCodecCtxEncoder->weighted_p_pred = 2;
pCodecCtxEncoder->pix_fmt = PIX_FMT_YUV420P;
pCodecCtxEncoder->profile = FF_PROFILE_H264_BASELINE;
Thank you in advance,
PS
--
View this message in context: http://libav-users.943685.n4.nabble.com/YUV-to-H-264-encoding-using-baseline-profile-tp3611115p3611115.html
Sent from the libav-users mailing list archive at Nabble.com.
More information about the Libav-user
mailing list