[Live-devel] H.264 streaming -- Not receiving all packets
Matt Schuckmann
matt at schuckmannacres.com
Thu Mar 19 14:21:32 PDT 2009
Chances are your socket receiver buffers in the OS are too small.
Try increasing them with calls to setReceiveBufferTo() or
increaseReceiveBufferTo(), I think you can find examples of this in the
OpenRTSP example and I think there are some references to this in the
FAQ. Check out the FAQ because there maybe some registry/config settings
(in the case of windows) you need to change to allow bigger buffers.
There are companion methods for the send buffers on the server side but
I don't think your having a problem with that if WireShark shows all the
data is making it to the client.
>
> On the server side, when the frame is larger than the destination
> buffer, I copy as much as I can. The remaining data will be copied
> when doGetNextFrame is called again.
I'd be interested to know if this works because I got the impression
that it doesn't.
There is a similar buffer on the client side that is used to pass data
to the afterGettingFrame() method of your videoSink, if the data is too
big for that buffer then the numTrucatedBytes parameter is set to number
of bytes that are lost and as far as I can tell that data is gone.
I don't think I've come across a case where this has occurred but in
theory it could happen, I'm still not sure how you'd increase this
buffer size.
Another thing you might try is to have your H.264 encoder slice up the
frames into multiple slices, I think this will push your NAL packet
sizes down which should reduce the buffer size requirements. I haven't
tired this either but I've been meaning to just to see what happens.
Matt S.
iMove Inc.
mschuck at imoveinc.com
More information about the live-devel
mailing list