<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Hello all,<br><br>I am trying to encode captured frames with libavcodec. My target is to encode couple of frames together but in the code below I try to encode only one image. My image is in RGB format and reachable by bits[0] pointer.The code runs but doesn't generate any encoded data. According to the return values that I give below, the code runs ok till <span style=" color:#c0c0c0;"></span><span style=" color:#000000;">avcodec_encode_video</span><span style=" color:#000000;"></span> which returns zero. I see no change in <span style=" color:#000000;">encoded_buf after calling </span><span style=" color:#000000;"><span style=" color:#000000;">avcodec_encode_video</span><span style=" color:#000000;"></span>. </span><span style=" color:#000000;">Could you please guide me to find the mistake? <br><br></span><span style=" color:#000000;"></span>Here are some return values from the functions so that you can have some ideas.<br>ret1=5760000, ret2=2160000, ret3=900, ret4=0<br><br>Thank you,<br>-----------------------------------------------------------------<br><span style=" color:#c0c0c0;">           </span><span style=" color:#800080;">AVCodec</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*</span><span style=" color:#000000;">codec</span><span style=" color:#000000;">;</span>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#808000;">int</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">encoded_buf_size</span><span style=" color:#000000;">;</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800080;">uint8_t</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*</span><span style=" color:#000000;">encoded_buf</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*</span><span style=" color:#000000;">yuvoutbuffer</span><span style=" color:#000000;">;</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800080;">AVFrame</span><span style=" color:#000000;">*</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">YUVframe</span><span style=" color:#000000;">;</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800080;">AVFrame</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*</span><span style=" color:#000000;">RGBframe</span><span style=" color:#000000;">;</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#808000;">int</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">ret1</span><span style=" color:#000000;">=</span><span style=" color:#000080;">0</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">ret2</span><span style=" color:#000000;">=</span><span style=" color:#000080;">0</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">ret3</span><span style=" color:#000000;">=</span><span style=" color:#000080;">0</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">ret4</span><span style=" color:#000000;">=</span><span style=" color:#000080;">0</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">ret5</span><span style=" color:#000000;">=</span><span style=" color:#000080;">0</span><span style=" color:#000000;">;</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">YUVframe</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">avcodec_alloc_frame</span><span style=" color:#000000;">();</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">RGBframe</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">avcodec_alloc_frame</span><span style=" color:#000000;">();</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#800000;">c</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">mfSetContextParameters</span><span style=" color:#000000;">(</span><span style=" color:#800000;">c</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">aWidth</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">aHeight</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">mvGOPsize</span><span style=" color:#000000;">);</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">codec</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">avcodec_find_encoder</span><span style=" color:#000000;">(</span>CODEC_ID_H264<span style=" color:#000000;">);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#808000;">if</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">(!</span><span style=" color:#000000;">codec</span><span style=" color:#000000;">)</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">{</span><span style=" color:#000080;">gpLogDebug</span><span style=" color:#000000;">(</span><span style=" color:#008000;">"Video codec not found."</span><span style=" color:#000000;">);</span><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">return</span><span style=" color:#000000;">;}</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#808000;">if</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">(</span><span style=" color:#000000;">avcodec_open</span><span style=" color:#000000;">(</span><span style=" color:#800000;">c</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">codec</span><span style=" color:#000000;">)</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;"><</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">0</span><span style=" color:#000000;">)</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">{</span><span style=" color:#000080;">gpLogDebug</span><span style=" color:#000000;">(</span><span style=" color:#008000;">"Could not open codec."</span><span style=" color:#000000;">);</span><span style=" color:#c0c0c0;"> </span><span style=" color:#808000;">return</span><span style=" color:#000000;">;}</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#808000;">int</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">nbytes</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">avpicture_get_size</span><span style=" color:#000000;">(</span>PIX_FMT_YUV420P<span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">width</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">height</span><span style=" color:#000000;">);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">yuvoutbuffer</span><span style=" color:#000000;">=(</span><span style=" color:#800080;">uint8_t</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*)</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">av_malloc</span><span style=" color:#000000;">(</span><span style=" color:#000000;">nbytes</span><span style=" color:#000000;">);</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">ret1</span><span style=" color:#000000;">=</span><span style=" color:#000000;">avpicture_fill</span><span style=" color:#000000;">((</span><span style=" color:#800080;">AVPicture</span><span style=" color:#000000;">*)</span><span style=" color:#000000;">RGBframe</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">(</span><span style=" color:#800080;">uint8_t</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*)</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">bits</span><span style=" color:#000000;">[</span><span style=" color:#000080;">0</span><span style=" color:#000000;">],</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">PIX_FMT_RGB32</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">width</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">height</span><span style=" color:#000000;">);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">ret2</span><span style=" color:#000000;">=</span><span style=" color:#000000;">avpicture_fill</span><span style=" color:#000000;">((</span><span style=" color:#800080;">AVPicture</span><span style=" color:#000000;">*)</span><span style=" color:#000000;">YUVframe</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">yuvoutbuffer</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span>PIX_FMT_YUV420P<span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">width</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">height</span><span style=" color:#000000;">);</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#808000;">struct</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800080;">SwsContext</span><span style=" color:#000000;">*</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">fooContext</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">sws_getContext</span><span style=" color:#000000;">(</span><span style=" color:#800000;">c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">width</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">height</span><span style=" color:#000000;">,</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                                      </span><span style=" color:#000080;">PIX_FMT_RGB32</span><span style=" color:#000000;">,</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                                      </span><span style=" color:#800000;">c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">width</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">height</span><span style=" color:#000000;">,</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                                      </span>PIX_FMT_YUV420P<span style=" color:#000000;">,</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">                                      </span><span style=" color:#000080;">SWS_FAST_BILINEAR</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">NULL</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">NULL</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">NULL</span><span style=" color:#000000;">);</span></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></pre>
<pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#008000;">//perform the conversion</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">ret3</span><span style=" color:#000000;">=</span><span style=" color:#000000;">sws_scale</span><span style=" color:#000000;">(</span><span style=" color:#000000;">fooContext</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">RGBframe</span><span style=" color:#000000;">-></span><span style=" color:#800000;">data</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">RGBframe</span><span style=" color:#000000;">-></span><span style=" color:#800000;">linesize</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">0</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#800000;">c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">height</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">YUVframe</span><span style=" color:#000000;">-></span><span style=" color:#800000;">data</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">YUVframe</span><span style=" color:#000000;">-></span><span style=" color:#800000;">linesize</span><span style=" color:#000000;">);</span></pre><br><pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">YUVframe</span><span style=" color:#000000;">-></span><span style=" color:#800000;">pts</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">0</span><span style=" color:#000000;">;</span></pre><pre style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">encoded_buf_size</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">150000</span><span style=" color:#000000;">;</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">encoded_buf</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">(</span><span style=" color:#800080;">uint8_t</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">*)</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">malloc</span><span style=" color:#000000;">(</span><span style=" color:#000000;">encoded_buf_size</span><span style=" color:#000000;">);</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">*</span><span style=" color:#000000;">encoded_buf</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">NULL</span><span style=" color:#000000;">;</span></pre>
<pre style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#c0c0c0;">    </span><span style=" color:#000000;">ret4</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">avcodec_encode_video</span><span style=" color:#000000;">(</span><span style=" color:#800000;">c</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">encoded_buf</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">encoded_buf_size</span><span style=" color:#000000;">,</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">YUVframe</span><span style=" color:#000000;">);<br>   </span> <span style=" color:#000000;"><span style=" color:#008000;">//Here, I don't get any change in encoded_buf.</span><br>----------------<br><br></span><span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">avcodec_alloc_context</span><span style=" color:#000000;">();</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">bit_rate</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">512000</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">width</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">aWidth</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">height</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">aHeight</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">time_base</span><span style=" color:#000000;">.</span><span style=" color:#800000;">num</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">1</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">time_base</span><span style=" color:#000000;">.</span><span style=" color:#800000;">den</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">30</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">gop_size</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">1</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">max_b_frames</span><span style=" color:#000000;">=</span><span style=" color:#000080;">0</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">bit_rate_tolerance</span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">40000</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">pix_fmt</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span>PIX_FMT_YUV420P<span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">me_range</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">16</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">max_qdiff</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">1</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">qmin</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">1</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">qmax</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">30</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">qcompress</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">0.6</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">keyint_min</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">120</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">refs</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">3</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">trellis</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#000080;">1</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">rtp_payload_size</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000000;">=</span><span style=" color:#c0c0c0;"> </span><span style=" color:#000080;">500</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">level</span><span style=" color:#000000;">=</span><span style=" color:#000080;">13</span><span style=" color:#000000;">;</span><span style=" color:#c0c0c0;"> </span><span style=" color:#008000;">//Level 1.3</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">me_method</span><span style=" color:#000000;">=</span><span style=" color:#000080;">7</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">qblur</span><span style=" color:#000000;">=</span><span style=" color:#000080;">0.5</span><span style=" color:#000000;">;</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">profile</span><span style=" color:#000000;">=</span><span style=" color:#000080;">66</span><span style=" color:#000000;">;</span><span style=" color:#008000;">//Baseline</span>
<span style=" color:#c0c0c0;">    c</span><span style=" color:#000000;">-></span><span style=" color:#800000;">thread_count</span><span style=" color:#000000;">=</span><span style=" color:#000080;">1</span><span style=" color:#000000;">;</span>
<br></pre><br>                                          </div></body>
</html>