[Live-devel] Packet loss in case of high bit rate mpeg4 streams

Ross Finlayson finlayson at live555.com
Thu Oct 11 07:33:33 PDT 2007


As you've noted/realized, any packet loss - other than network packet 
loss - that occurs in a system that uses our code *must* be the fault 
of insufficient buffering inside the OS.  I.e., this is an OS 
problem, and any fix/workaround needs to address this.

Unfortunately there is no good way for our code to handle a failed 
network write (i.e., no good way to 'retry' the write later). 
Instead, we'll need to set things up to ensure (with high 
probability) that network writes do not fail.  Note also that we 
can't try to avoid these write failures by making network sockets 
blocking.  The calls to "makeSocketNonBlocking()" are there for a 
good reason (e.g., to overcome the problem that Marc Neuberger noted 
in 
<http://lists.live555.com/pipermail/live-devel/2007-June/006890.html>), 
so removing those calls is *not* an acceptable solution.

The simplest solution, it seems, is simply to make sure that there is 
reasonable buffering inside the OS on writeable sockets.  To do this, 
add
	increaseSendBufferTo(envir(), clientSocket, 50*1024);
after the call to "makeSocketNonBlocking()" on line 235 of 
"liveMedia/RTSPServer.cpp".

Similarly, add
	increaseSendBufferTo(envir(), fGS->socketNum(), 50*1024);
after the call to "makeSocketNonBlocking()" on line 101 of 
"liveMedia/RTPInterface.cpp".

These additions will be made to the next release of the code.
-- 

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/20071011/9426c3fe/attachment.html 


More information about the live-devel mailing list