ive experimented further and i found a tutorial where it had code to calculate the PTS
http://www.dranger.com/ffmpeg/tutorial05.html i know get a good consistent PTS value across all video. The downside is that doing int delay = (pts - last_pts)*1000; if (delay <= 0 || delay >= 1000) { delay = last_delay; } last_delay = delay; last_pts = pts; int elapsed = clock.restart(); // milliseconds if (elapsed > delay) { timedebt = 0; } delay -= elapsed + timedebt; timedebt = 0; if (delay < 0) { timedebt = -delay; is->updator(); } else if (!time2die) { is->updator(); QThread::msleep(delay); } my videos play ever so slightly too fast. i can send u the code i use to calculate PTS if you want (its all from that tutorial). On Wed, Sep 23, 2009 at 2:25 PM, slippyr4 <[email protected]> wrote: > Thanks for your guidance. > > > > > > to get the milliseconds per frame in my app i do > > > > 1000 * ticks_per_frame * AV_TIME_BASE * av_q2d(pCodecCtx->time_base) > > > > I'm not sure about this part. AV_TIME_BASE seems to be a define with > a value of 1,000,000 so i can't see how that helps. > > > Can anyone clarify the proper way of calculating the PTS of a given > frame number? > _______________________________________________ > libav-user mailing list > [email protected] > https://lists.mplayerhq.hu/mailman/listinfo/libav-user > _______________________________________________ libav-user mailing list [email protected] https://lists.mplayerhq.hu/mailman/listinfo/libav-user
