[Live-devel] RTP TCP problems

Ross Finlayson finlayson at live555.com
Wed Jun 13 01:47:36 PDT 2012


> I have created a RTSPServer which I am using to stream a live VP8 video stream to several clients.  I have created my own FramedSource and I am using this to write the VP8 stream.  This works fine when the client uses UDP, when I change the client to use TCP for less reliable networks I seem to 'lose' frames of video and the result is a broken video stream on the client.  This is quite surprising as I would have thought if I was to have problems I would have had them when using UDP as opposed to TCP.

Your stream is exceeding the bandwidth of your network.  Therefore, you are going to lose data, no matter how you transmit your stream.  Note that - in this case - RTP-over-TCP streaming cannot save you.  If you try to stream over a too-low-bandwidth network using TCP, you'll still get data loss, but it'll occur at the sender (because of its OS buffer overflowing), rather than at the receiver.

This is the important distinction between live media streaming, and on-demand streaming (e.g., using the World-Wide Web).  If you use our software, it's important to understand this distinction.  Or, to put it more bluntly, if you do not understand the paragraph above, you should not be using our software.

In fact, if - as appears to be the case for you - your network is bandwidth-constrained, it is actually better (or at least, 'less bad') to stream using RTP/UDP rather than RTP/TCP.  If you stream over RTP/UDP, the data loss will occur on RTP packet boundaries, which is much better for your decoder.  (You are probably getting data loss even with RTP/UDP streaming, but you're just not realizing it.)

Your only solution is to reduce the bitrate of your stream (by reducing its frame rate and/or video complexity).

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120613/13748508/attachment-0001.html>


More information about the live-devel mailing list