<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>