El 29/03/18 a las 07:43, Vittalprasad escribió:
Hi Team,
I have written sample application using FFMPEG Libraries to encode
YUV, but here i would like to know how to specify H264 profile and
levels for encoder.
This is how i'm filling Encode context
const AVCodec *codec_enc;
AVCodecContext *c_enc = NULL;
c_enc = avcodec_alloc_context3(codec_enc);
if (!c_enc) {
printf( "Could not allocate video codec context\n");
exit(1);
}
//c_enc->bit_rate = c_dec->bit_rate;
c_enc->width = 176;// 320;
c_enc->height = 144;// 240;
c_enc->time_base = (AVRational){1, 25};
c_enc->framerate = (AVRational){25, 1};
c_enc->gop_size = c_dec->gop_size; //10;
//c->max_b_frames = 1;/////vittal to enable or disable b frames
c_enc->pix_fmt = AV_PIX_FMT_YUV420P;
Choose one of:
c_enc->profile = FF_PROFILE_H264_BASELINE;
c_enc->profile = FF_PROFILE_H264_CONSTRAINED_BASELINE;
c_enc->profile = FF_PROFILE_H264_MAIN;
c_enc->profile = FF_PROFILE_H264_EXTENDED;
c_enc->profile = FF_PROFILE_H264_HIGH_10;
c_enc->profile = FF_PROFILE_H264_HIGH_422;
c_enc->profile = FF_PROFILE_H264_HIGH_444;
--
Gonzalo Garramuño
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user