<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'><div>> From: jennifer.li@zenith.com<br>> To: libav-user@ffmpeg.org<br>> Date: Wed, 15 Jul 2015 18:19:18 -0400<br>> Subject: [Libav-user] how to change x264 parameters after opening the encoder (avcodec_open2)<br>> <br>> <br>> I decode and re encode I frame of a movie  file.<br>> <br>> when encode I frame, each I frame need a different qp value. <br>> How can qp parameter change after<br>> avcodec_open2(CodecCtx, codec, &options) )     ? <br>> <br>> av_dict_set( &options, "qp"   ,  x     , 0 )  is used to set qp.<br>> <br>> <br>> If x264 parameter can't change after avcodec_open2 function, <br>> Can I close this encoder and open a new x264 encoder with a new parameter for next I frame?<br>> <br>> Thanks<br>> <br>> _______________________________________________<br>> Libav-user mailing list<br>> Libav-user@ffmpeg.org<br>> http://ffmpeg.org/mailman/listinfo/libav-user<br></div><div><br></div><div>From the documentation of avcodec_open2</div><div><span style="font-family: Roboto, sans-serif; font-size: 14px; line-height: 22px; background-color: rgb(255, 255, 255);">Always call this function before using decoding routines .</span></div><div><span style="font-family: Roboto, sans-serif; font-size: 14px; line-height: 22px; background-color: rgb(255, 255, 255);"><br></span></div><div><span style="font-family: Roboto, sans-serif; font-size: 14px; line-height: 22px; background-color: rgb(255, 255, 255);">So you can't change the parameters after calling the avcodec_open2</span></div><div><span style="font-family: Roboto, sans-serif; font-size: 14px; line-height: 22px; background-color: rgb(255, 255, 255);"><br></span></div><div><span style="font-family: Roboto, sans-serif; font-size: 14px; line-height: 22px; background-color: rgb(255, 255, 255);">For the second question, of course you can close one and reopen another one.</span></div>                                      </div></body>
</html>