<div>Hi Igor,<br></div><div><br></div><div>As I known some formats require specific timebases (like MPEGTS streams) so, you can not manipulate with them. But you can manipulate with CodecContext and can set time base that you need. For example, if FPS equal to 25, you can set coder time base to 1/25 and simple increment PTS by 1 for every next frame.</div>
<div><br></div><div>If you known russian, you can read my note regard time-bases and PTS: <a href="http://htrd.su/wiki/zhurnal/2012/11/23/ffmpeg_nemnogo_pro_time-base">http://htrd.su/wiki/zhurnal/2012/11/23/ffmpeg_nemnogo_pro_time-base</a></div>
<div><br></div><div>Briefly:</div><div>AVPacket PTS and DTS filelds readed from stream have a Stream time-base</div><div>AVFrame PTS field decoded from Packet have a Coder time-base</div><div><br></div><div>For encoding all same.</div>
<div><br></div><div>It is my opinion after reading ffmpeg docs and code so more detail info from ffmpeg develop team welcomed</div><br><div class="gmail_quote">2012/11/29 Morduhaev, Igor (<a href="mailto:igorm@stats.com">igorm@stats.com</a>) <span dir="ltr"><<a href="mailto:igorm@stats.com" target="_blank">igorm@stats.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt;text-align:left;line-height:13.5pt;background:white;vertical-align:baseline;direction:ltr">
<span style="font-size:10.5pt;font-family:"Arial","sans-serif"">I used ffmpeg to get video info. The output is</span></p>
<p class="MsoNormal" style="text-align:left;line-height:13.5pt;background:#eeeeee;vertical-align:baseline;direction:ltr">
<span style="background:#eeeeee;font-size:10.5pt;font-family:Consolas;padding:0cm;border:none windowtext 1.0pt"> Duration: 00:05:57.00, start: 0.000000, bitrate: 611 kb/s Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 808x610,
609 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc</span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt;text-align:left;line-height:13.5pt;background:white;vertical-align:baseline;direction:ltr">
<span style="font-size:10.5pt;font-family:"Arial","sans-serif"">The time base is used to somehow(this is also my another question) calculate when to decode and show the frame, right? So whose time base is used, container (12800) or codec (50)?</span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt;text-align:left;line-height:13.5pt;background:white;vertical-align:baseline;direction:ltr">
<span style="font-size:10.5pt;font-family:"Arial","sans-serif"">The another question is why tbn=12800 and not 90000?</span></p>
<p class="MsoNormal" dir="RTL"><span dir="LTR"> </span></p>
</div>
</div>
<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" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br>