Log in

View Full Version : detect packet loss in h.264


karthick1990r
1st September 2012, 13:23
Hi,

I 'm working on a live streaming application. At the client side, i would like to detect packet losses so that retransmission of the packets can be requested. Right now, if a packet is lost , i 'm requesting a retransmission. But i think, losing a packet may not produce high distortion at the client always. So, under what conditions, should the retransmission requests to be made?

akupenguin
1st September 2012, 18:56
If the packet was marked as disposable (i.e. non-referenced, i.e. nal_ref_idc=0), then dropping it won't propagate any distortion to other frames. There aren't any easily-definable conditions under which distortion is predictably small but nonzero.

Alternately, if there's only a small number of clients per stream, you could use reference invalidation (x264_encoder_invalidate_reference) instead of retransmission. This accepts the loss of a frame, and just prevents the distortion from propagating.