[libav-api] problem with RTP and real time

i.lourtet at gmail.com i.lourtet at gmail.com
Wed May 18 16:27:53 CEST 2011


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);

Though I dont know exactly what should be the argument of av_rescale(). I un 
derstand the first ad the last argument but I don't know what is the 2nd one 
> > I have got another problem which I think is linked with the previous one.
> > I send the video over rtp with my program based on libav, and I receive
> > the video with vlc. So my problem is when I send the video in 320*240
> > there is no problem, but more the resolution increase, less I can
> > receive with vlc. For example when I take the higher resolution of my
> > video ( 1920*1080) I could only see one frame, and if I want to see
> > other one I have to stop and play again vlc. It is really strange.
> first try to model those stuff with a script using the ffmpeg command
> and then try to report in code what is the expected result.
> I hope that helps a little
> lu
> _______________________________________________
> libav-api mailing list
> libav-api at libav.org
> https://lists.libav.org/mailman/listinfo/libav-api

Thank you for your help,


More information about the libav-api mailing list