<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<div><br></div><div>I want to decode a video. The decoded datas are embedded in a  AVFrame, and the encode data will be encode in a AVPacket. In order to decode my video, I need to tweak the AVCodecContex. The problem is that I don't know how to get the informations I need to fill the AVCodecContext. Here is the sample of code :</div><div><br></div><div><span class="Apple-tab-span" style="white-space: pre;">        </span>AVFrame* dataDecode;//frame fill with the decoded data</div><div><div><span class="Apple-tab-span" style="font-size: 12pt; white-space: pre;"> </span>codecContext->bit_rate = ???;</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>codecContext->width = dataDecode->width;</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>codecContext->height = dataDecode->height;</div><div><span class="Apple-tab-span" style="white-space:pre">     </span>codecContext->pix_fmt = (enum AVPixelFormat)dataDecode->format;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>/* frames per second */</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>codecContext->time_base= dataDecode->???;</div><div><span class="Apple-tab-span" style="white-space:pre">      </span>codecContext->gop_size = ???; /* emit one intra frame every ??? frames */</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>codecContext->max_b_frames= ???;</div><div><br></div><div>How could I fill this attributes ? Do we need to fill this attributes if we want to encode to a image ? By the way, which AVPixelFormat match with the <em style="font-family: Roboto, sans-serif; font-size: 14.399999618530273px; line-height: 19px;">AV_CODEC_ID_JPEGLS</em><span style="font-family: Roboto, sans-serif; font-size: 14.399999618530273px; line-height: 19px;">  </span><span style="font-size: 12pt;">codec ?</span></div><br><div style="text-align:center;">Thanks,</div><div style="text-align:left;">Guillaume Bersac</div><div style="text-align:left;">237bis rue de Pessac</div><div style="text-align:left;">33000 Bordeaux</div><div style="text-align:left;">06.65.30.89.43</div><div><br></div></div>                                        </div></body>
</html>