<p>On Mar 15, 2012 12:33 PM, <<a href="mailto:francesco@bltitalia.com">francesco@bltitalia.com</a>> wrote:<br>
><br>
> Hi to all<br>
> have anyone attempted to encode in 4:3 format ?  I can't do.  If I<br>
> set:<br>
><br>
> AVRational vform;<br>
><br>
><br>
>  codec = avcodec_find_encoder(CODEC_ID_MPEG2VIDEO);<br>
>  if (!codec) { Memo1->Lines->Add("Unable to find codec "); goto<br>
> _Encod1Frame_err;}<br>
><br>
>  pCodecCtx = avcodec_alloc_context3(codec);<br>
>  if(pCodecCtx==NULL) { Memo1->Lines->Add("Unable to alloc codec<br>
> context");goto _Encod1Frame_err;}<br>
>  pFrame = avcodec_alloc_frame();<br>
>  if(pFrame==NULL) { Memo1->Lines->Add("Unable to alloc frame");goto<br>
> _Encod1Frame_err;}<br>
><br>
>  vform.num = 4;<br>
>  vform.den = 3;<br>
>  pCodecCtx->sample_aspect_ratio = vform;</p>
<p>IIRC this is not the target aspect ratio,but rather how to distort the input frame. Therefore, if you have 4:3 input, you get 16:9 output.</p>
<p>BR,<br>
Alex<br>
</p>