[Live-devel] Slow connection problem with RTP over RTSP/TCP

Matt Schuckmann matt at schuckmannacres.com
Wed Nov 18 08:33:40 PST 2009


Ross, I have to disagree with you a little here.
Shouldn't it be the servers responsibility to provide the best possible 
experience to the client given the network conditions, the content 
delivery method and the content requested by the client.
And if the server can detect that the network is to slow or congested to 
send all of the requested data (by detecting that the network buffers in 
the OS are full) make an attempt to intelligently send enough data to 
provide a working, all be it degraded, experience to the client rather 
than just randomly dropping parts of frames so that nothing may work.

I haven't looked at his patch so I can't say if it's good or bad but I 
do know we ended up doing something similar for our branch of the 
RTSPServer because we can not guarantee all the conditions our product 
will be used in and we wanted to the best we could to provide a working 
system as much as possible.

Matt S.


Ross Finlayson wrote:
> No, this is nonsense.  TCP is intended to be a reliable byte-stream 
> protocol; it's the job of the operating system's TCP implementation - 
> not application-level code (such as LIVE555) - to provide reliable 
> delivery.  If, however, your stream's bitrate is too large for your 
> network, then you're inevitably going to get packet loss (usually 
> because an OS buffer in the sender OS will overflow).  There's nothing 
> you can do to avoid this.  If your stream's bitrate is really too 
> large for your network, then you should not be sending it (and you 
> should certainly not be sending it over TCP).
>
> If, however, your stream's *average* bitrate is within the capacity of 
> your network, you can reduce the probability of your server OS's TCP 
> implementation losing data by increasing its OS socket buffer. Note 
> that we provide a function "increaseSendBufferTo()" that does this.  
> Our RTSP server implementation - by default - sets this buffer size 
> (for each server and stream socket) to 50 kBytes (search for 
> "increaseSendBufferTo" in the code).  However, you could use a larger 
> value this (e.g., by subclassing "RTSPServer").


More information about the live-devel mailing list