Bob, you can convert timestamps to any time base with av_rescale_q function:

AVRational ms_time_base = { 1, 1000 };

/* assuming that you've just got packet from demuxer */
int64_t time_ms = av_rescale_q(packet.pts, stream.time_base, ms_time_base);

Yurii


ср, 3 окт. 2018 г. в 13:56, Bob Kirnum <[email protected]>:

> 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.
> _______________________________________________
> Libav-user mailing list
> [email protected]
> http://ffmpeg.org/mailman/listinfo/libav-user
>
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to