<div dir="ltr"><div>Bob, you can convert timestamps to any time base with av_rescale_q function:</div><div><br></div><div>AVRational ms_time_base = { 1, 1000 };</div><div><br></div><div>/* assuming that you've just got packet from demuxer */<br></div><div></div><div>int64_t time_ms = av_rescale_q(packet.pts, stream.time_base, ms_time_base);</div><div></div><div></div><div><br></div><div>Yurii<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">ср, 3 окт. 2018 г. в 13:56, Bob Kirnum <<a href="mailto:bkirnum@gmail.com">bkirnum@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thanks Yuri.  The problem is with consistency.  I tried using the AVPacket dts and duration values.  These proved to me more consistent until I played an MP4 file.  For MKV and WebM, the values were in msec.  For MP4, the values were not.  Looking at the AVStream time_base values, they were 1/16000 for both audio and video streams.  </div>
_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">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>