[Live-devel] Dealing with frames having missing rtp packets

Ross Finlayson finlayson at live555.com
Thu Mar 17 00:31:42 PDT 2016


> A quick question about live555 behaviour with packet loss.
> 
> Let's consider a (video) frame consisting of five packets [ ]. Packets have the following RTP sequence enumeration:
> 
> [11] [12] [13] [14] [15]
> 
> (all packets have the same rtp timestamp as they belong to the same frame)
> 
> Now, let's imagine that a single packet is lost in the transmission and we get the following sorted sequence of RTP packets:
> 
> [11] [12] [14] [15]
> 
> Does live555 scrap frames with missing RTP sequence numbers, or does it consider them as valid frames, passing them on to afterGettingFrame?

It depends on whether (i) the RTP packets each contained a single frame, or (ii) the RTP packets, taken together, made up a single frame.

In case (i) - which occurs only if the frames are small - each frame gets passed on.

In case (ii) - which usually occurs if the frames are large (e.g., ‘key frames’) - then all packets making up the frame must be received for the data to be useful.  If *even one* of the packets is lost, then the frame cannot be recovered, and thus the rest of the data gets discarded.

This is why - for H.264 video - it is important that, for streaming, a large ‘key frame’ get encoded as a sequence of smaller ‘slice’ NAL units, rather than being encoded as a single (very large) NAL unit - because very large NAL units are very vulnerable to packet loss.

I have discussed this *many* times on this mailing list in the past; see
	http://lists.live555.com/pipermail/live-devel/2011-December/014190.html
	http://lists.live555.com/pipermail/live-devel/2012-August/015615.html
	http://lists.live555.com/pipermail/live-devel/2013-May/016994.html
	http://lists.live555.com/pipermail/live-devel/2014-June/018426.html
	http://lists.live555.com/pipermail/live-devel/2014-June/018432.html
	http://lists.live555.com/pipermail/live-devel/2014-June/018433.html
	http://lists.live555.com/pipermail/live-devel/2014-June/018434.html
	http://lists.live555.com/pipermail/live-devel/2015-March/019135.html
	http://lists.live555.com/pipermail/live-devel/2015-April/019228.html

Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list