[Libav-user] H264 profiles and Levels

Vittalprasad vittalprasad.br at gmail.com
Thu Mar 29 13:43:47 EEST 2018

 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

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");
        //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;

Thanks & Regards
Vittal Prasad B R
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20180329/f5623ea3/attachment.html>

More information about the Libav-user mailing list