On 5/18/11 4:27 PM, [email protected] wrote:
Hello,
thank you lucas for your answer.
On 5/18/11 11:07 AM, Irwin Lourtet wrote:
Hello,
I am developping a program which allows to send a mpeg-ts over rtp
stream. I would like to know if libav has an option to send packet over
rtp at the time it must be displayed. Because now I read packet and I
send them when they are ready, for example I send a 55s video in 30s.
So I would like to send this video in 55s. If I am not enough clear I
would be please to give you more details.
the -re option implemented in ffmpeg.c should give you guidance in this
regard I guess.
I found in ffmpeg.c how they implement the -re option. the code is the
following :
int64_t pts = av_rescale(ist->pts, 1000000, AV_TIME_BASE);
int64_t now = av_gettime() - ist->start;
if (pts> now)
usleep(pts - now);
usleep takes microseconds as argument so you rescale the pts to be in
that time unit.
lu
_______________________________________________
libav-api mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-api