[Libav-user] How to determine frame sizes in msec
Yurii Monakov
monakov.y at gmail.com
Thu Oct 4 11:05:23 EEST 2018
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 <bkirnum at gmail.com>:
> 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
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20181004/ecef155b/attachment.html>
More information about the Libav-user
mailing list