[Live-devel] Tracked down the problem with latency
Chris Van Brederode
cvanbrederode at gmail.com
Tue Mar 5 13:17:15 PST 2013
I believe I have tracked down the problem with latency and slow connections:
When the video feed (from a 3D rendering engine) is more or less static,
the data size of frames from XVID is very small, on the order of 100-200
bytes per frame, sometimes down to a minimum of 57 bytes per frame, for
many frames in a row. If I make the video non-static (by turning/moving
the camera), the average size of the frames jumps to several thousand bytes
each. I have far less problems connecting clients when the camera is
moving, and the latency is on the order of a few seconds, instead of 30
seconds.
If I understand things correctly, getNextFrame is being called with maxSize
set to the available space in the buffer. Since
MPEG4VideoFileServerMediaSubsession does not specify preferredFrameSize on
creation of its ByteSTreamFileSource, the file reads (on Windows) will
block until maxSize bytes have been read, causing the long stream startups
and high latency.
Is there any recourse for this other than overloading
MPEG4VideoFileMediaSubsession (with a version that sets preferredFrameSize
to a lower value)? What kind of problems can crop up if I set
preferredFrameSize to something on the order of 200 bytes?
Chris V.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130305/37a2fe16/attachment.html>
More information about the live-devel
mailing list