At 19.04 15/03/2012 +0200, you wrote: >On Mar 15, 2012 12:33 PM, <[email protected]> wrote: >> >> Hi to all >> have anyone attempted to encode in 4:3 format ? I can't do. If I >> set: >> >> AVRational vform; >> >> >> codec = avcodec_find_encoder(CODEC_ID_MPEG2VIDEO); >> if (!codec) { Memo1->Lines->Add("Unable to find codec "); goto >> _Encod1Frame_err;} >> >> pCodecCtx = avcodec_alloc_context3(codec); >> if(pCodecCtx==NULL) { Memo1->Lines->Add("Unable to alloc codec >> context");goto _Encod1Frame_err;} >> pFrame = avcodec_alloc_frame(); >> if(pFrame==NULL) { Memo1->Lines->Add("Unable to alloc frame");goto >> _Encod1Frame_err;} >> >> vform.num = 4; >> vform.den = 3; >> pCodecCtx->sample_aspect_ratio = vform; > >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. > >BR, >Alex > > > >__________ Informazioni da ESET NOD32 Antivirus, versione del database delle firme digitali 6953 (20120309) __________ > >Il messaggio è stato controllato da ESET NOD32 Antivirus. > >www.nod32.it > ><p>On Mar 15, 2012 12:33 PM, <<a href="mailto:[email protected]">[email protected]</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> >_______________________________________________ >Libav-user mailing list >[email protected] >http://ffmpeg.org/mailman/listinfo/libav-user > > > >__________ Informazioni da ESET NOD32 Antivirus, versione del database delle firme digitali 6953 (20120309) __________ > >Il messaggio è stato controllato da ESET NOD32 Antivirus. > >www.nod32.it > >
Ok, thanks for the answer. So If I have well understood, in this case I sould insert 1:1 that means no frame distortion. With this settings if I start from a 4:3 frame (720x576) I obtain the same frame form in output. Right ? _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
