<div dir="ltr">


<span style="font-family:tahoma,sans-serif"><div><span>Hi Team,</span></div><div><span><br></span></div><div><span>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.</span></div><div><span><br></span></div><div><span>This is how i'm filling Encode context</span></div><div><span><br></span></div><div><span>const AVCodec *codec_enc;</span></div><div><span>AVCodecContext *c_enc = NULL;</span></div><div><span>     c_enc = avcodec_alloc_context3(codec_enc);</span></div><div><span>        if (!c_enc) {</span></div><div><span>                printf( "Could not allocate video codec context\n");</span></div><div><span>                exit(1);</span></div><div><span>        }</span></div><div><span>        //c_enc->bit_rate = c_dec->bit_rate;</span></div><div><span>        c_enc->width = 176;// 320;</span></div><div><span>        c_enc->height = 144;// 240;</span></div><div><span>        c_enc->time_base = (AVRational){1, 25};</span></div><div><span>        c_enc->framerate = (AVRational){25, 1};</span></div><div><span>        c_enc->gop_size =   c_dec->gop_size; //10;</span></div><div><span>        //c->max_b_frames = 1;/////vittal to enable or disable b frames</span></div><div><span>        c_enc->pix_fmt = AV_PIX_FMT_YUV420P;</span></div>



<br clear="all"><br></span><div class="gmail_signature" data-smartmail="gmail_signature"><span style="font-family:tahoma,sans-serif">Thanks & Regards<br>Vittal Prasad B R<br><br><br></span><br></div>
</div>