[Live-devel] UDP packet loss

Nadir Raimondo raimondo at ismb.it
Tue Oct 14 06:22:02 PDT 2014


Dear all,

I'm trying to adapt testReplicator to restream a transport stream from a 
unicast address to a multicast one.
It works correctly if the UDP packet size in the input stream is fixed 
to 1316 bytes. The problem occurs if the packets size is allowed to 
change freely assuming values which are not multiples of 188 bytes  (e.g 
using ffmpeg as input encoder/streamer). In such a case I notice a 
random loss of entire burst of UDP packets and live555 does not log this 
anyhow. As a consequence of that artifacts are introduced in the output 
stream which loses the sequentiality of the ts-stream sync-byte.

This loss seems not to be directly related to the packet size since 
packets of same dimensions can be either received or dropped.
This cannot be due to fragmentation issues because packets size is 
anyway lower that the UDP max size of 1480 bytes and happens even if 
working in localhost.
On the other side if I receive the stream directly from a socket without 
using live555 all the data arrive correctly (no packet loss).

So some questions arise:
1) Should live555 be hable to handle input UDP stream with variable 
packet lengths? Or should the length be always multiple of 188?
2) Any advice about which class of live555 can be responsible for this loss?

Thank you in advance,

Yours,

Nadir





More information about the live-devel mailing list