<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">last time I used that, you were supposed to set
<br>
AVFrame.pict_type=AV_PICTURE_TYPE_I;  right before calling avcodec_encode_video2( .. AVFrame .. )<br>
<br>
hope that helps ..<br>
<br>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF164270"><font face="Tahoma" color="#000000" size="2"><b>From:</b> Libav-user [libav-user-bounces@ffmpeg.org] on behalf of qw [applemax82@163.com]<br>
<b>Sent:</b> Wednesday, September 02, 2015 1:34 PM<br>
<b>To:</b> This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter.<br>
<b>Subject:</b> [SPAM] Re: [Libav-user] force I frame in video coding<br>
</font><br>
</div>
<div></div>
<div>
<div style="line-height:1.7; color:#000000; font-size:14px; font-family:Arial">
<div>Hi,</div>
<div><br>
</div>
<div>Sorry, I should say more clearly my question.</div>
<div><br>
</div>
<div>In general, <span style="line-height:1.7">avcodec_encode_video2() is used to encode each video frame, and video encoder decide which type frame the current frame is coded as. video frame can be coded as I frame, P frame, or B frame decided by video encoder.</span></div>
<div><span style="line-height:1.7"><br>
</span></div>
<div><span style="line-height:1.7">But sometimes I want the current frame to be coded as one I frame instead of other type frame decided by video encoder. How to do it using ffmpeg functions?</span></div>
<div><br>
</div>
<div><span style="line-height:1.7">Thanks</span><span style="line-height:1.7">!</span></div>
<div><span style="line-height:1.7"><br>
</span></div>
<div><span style="line-height:1.7">B.R.</span></div>
<div><span style="line-height:1.7"><br>
</span></div>
<div><span style="line-height:1.7">Andrew</span></div>
<br>
<br>
<br>
<br>
<div style="position:relative; zoom:1"></div>
<div id="divNeteaseMailCard"></div>
<br>
At 2015-09-02 17:15:54, "Talgorn François-Xavier" <fxtalgorn-at-yahoo.fr@ffmpeg.org> wrote:<br>
<blockquote id="isReplyContent" style="padding-left:1ex; margin:0px 0px 0px 0.8ex; border-left:#ccc 1px solid">
Hi,
<div><br>
</div>
<div>You request seems odd to me since if you encode P or B frames as I frame you will get... P or B frame, hence partial image.</div>
<div>I've never done this, I can't tell you how to do this, sorry.</div>
<div><br>
</div>
<div>Good luck!<br>
<div>
<div>
<div>Le 2 sept. 2015 à 10:33, qw <<a href="mailto:applemax82@163.com" target="_blank">applemax82@163.com</a>> a écrit :</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">
<div style="line-height:1.7; font-size:14px; font-family:Arial">
<div>Hi,</div>
<div><br>
</div>
<div>In general, avcodec_encode_video2() is used to encode each video frame. How to force encoder code current frame as I frame?</div>
<div><br>
</div>
<div>Thanks!</div>
<div><br>
</div>
<div>B.R.</div>
<div><br>
</div>
<div>andrew</div>
</div>
<br>
<br>
<span title="neteasefooter"> <br class="webkit-block-placeholder">
</span>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
http://ffmpeg.org/mailman/listinfo/libav-user<br>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
<br>
<span title="neteasefooter">
<p> </p>
</span></div>
</div>
</div>
</body>
</html>