[Libav-user] How to calculate pts/dts ???
wolverin82 at mail.ru
Mon Jan 2 17:51:01 EET 2023
>Did I understand you correctly that I need to multiply time_base and system time between adjacent frames and add the resulting time to the previous PTS?
>PTS is just timebase * seconds represented as int64 number
>There are no additions with next/prev pts values.
Then pts is the time of one frame?
>>I used av_rescale_q to scale time_base from an incoming MJPEG stream to an outgoing H264 one, but for some reason timestamps pts/dts are meaningless in this case.
>Show your code.
I have greatly simplified it to understand how I am trying to use avscale, as it is done in different threads using buffers to use other ARM cores.
pFrm->pts = av_rescale_q(pPktInp->pts, pFmtCtxInp->streams->time_base, pCdcCtxInp->time_base);
pPktOut->pts = av_rescale_q(pFrm->pts, pCdcCtxInp->time_base, pCdcCtxOut->time_base);
pPktOut->dts = pPktOut->pts;
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Libav-user