<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-10-13 21:01 GMT+11:00 Carl Eugen Hoyos <span dir="ltr"><<a href="mailto:cehoyos@ag.or.at" target="_blank">cehoyos@ag.or.at</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">YIRAN LI <mrfun.china@...> writes:<br>
<br>
> pts = 0, dts = 0<br>
> pts = 2, dts = 1<br>
<br>
</span><span class="">> Can someone give any suggestion how to do in this case?<br>
<br>
</span>Add max_bframes (1 in your case) to pts.<br>
<br></blockquote><div><div class="gmail_default" style="font-family:georgia,serif;display:inline">Hi Carl,</div></div><div><div class="gmail_default" style="font-family:georgia,serif;display:inline"><br></div></div><div><div class="gmail_default" style="font-family:georgia,serif;display:inline">Do you mean add 1 directly onto original PTS?</div></div><div><div class="gmail_default" style="font-family:georgia,serif;display:inline"><br></div></div><div><div class="gmail_default" style="font-family:georgia,serif">So</div><div class="gmail_default" style="font-family:georgia,serif"><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:14px">pts = 0, dts = 0 -> pts = 1, dts = 0 </div><div class="gmail_default" style="font-family:georgia,serif;font-size:14px">pts = 2, dts = 1 -> pts = 3, dts = 1</div><div class="gmail_default" style="font-family:georgia,serif;font-size:14px">pts = 1, dts = 2 -> pts = 2, dts = 2</div><div class="gmail_default" style="font-family:georgia,serif;font-size:14px"><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:14px">Will this change cause any problem? (the first frame has non-zero pts and there file has non-zero offset?)</div><div class="gmail_default" style="font-family:georgia,serif;font-size:14px"><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:14px">And does this mean, for any encoders that can generate B frames, I need to do similar pre-processing before calling av_write_frame()? So if I don't know possible max B frames, then I can't use av_write_frame to correctly mux?</div><div class="gmail_default" style="font-family:georgia,serif;font-size:14px"><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:14px">Thanks</div><br></div><div><div class="gmail_default" style="font-family:georgia,serif;display:inline"></div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Carl Eugen<br>
<br>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" rel="noreferrer" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</blockquote></div><br></div></div>