Page 1 of 1

How do I prevent video before RTCP SR arrival?

Posted: 22 Jan 2015 19:56
by davecove
I have a problem, streaming from IP cameras using RTSP, wherein I get video for a few seconds, then the screen goes gray, and then the video comes back for good.

I have discovered the cause: When the video first appears, after the first buffer period, the first few presentation times (PCRs) - before the RTCP sync occurs - are just 'guesses' made by the receiving code (based on the receiver's system clock and the RTP timestamp). Once the RTCP sync report (SR) occurs, all subsequent presentation times will be accurate, but the ones in the buffer from before the SR are inaccurate.

In the VLC log, I very clearly see this:

Code: Select all

live555 debug: tk->rtpSource->hasBeenSynchronizedUsingRTCP() main error: ES_OUT_RESET_PCR called
The first line is a notification that the RTCP synchronization has just happened. The second indicates that the buffer has been flushed because their PCRs are incorrect. Buffering then happens again and video begins playing consistently after that.

I need to tell VLC to hold off on rendering until after the RTCP SR arrives and not show video using those 'guessed' values before the SR arrives. Can anyone tell me how?

Re: How do I prevent video before RTCP SR arrival?

Posted: 25 Jan 2015 06:19
by RĂ©mi Denis-Courmont
This is a sender bug. It should send a RTCP-SR element before the first RTP packets. As for the receiving code, it lies inside liblive555, not VLC; but since this is a sender bug, don't expect the liblive555 developer to do anything.