[FFmpeg-devel] Converting pts to human-readable timestamp
Yuval Adam
yuv.adm at gmail.com
Sun Dec 18 21:54:29 CET 2011
(I apologize for the new thread, don't have the old one [1] to continue
from)
Continuing Michael's suggestion in using pkt->pts in order to use in the
output filename of img2, I'm trying to convert it to some human-readable
format.
This is what I have so far [2]:
int64_t ts = av_rescale_q(pkt->pts, codec->time_base, AV_TIME_BASE_Q)
/ AV_TIME_BASE;
Though this absolutely makes no sense to me, so I know it's wrong :)
Can anyone give me a quick pointer on the proper way to convert pkt->pts to
human seconds?
I can obviously take it from there.
Thanks!
[1] - http://ffmpeg.org/pipermail/ffmpeg-devel/2011-December/117790.html
[2] -
https://github.com/yuvadm/FFmpeg/commit/c36f3dd94079bf03c6afbbffda191511c1071bdd
--
Yuval Adam
http://y3xz.com
More information about the ffmpeg-devel
mailing list