[Live-devel] Two client sessions to different servermedia sessions

Ross Finlayson finlayson at live555.com
Fri Feb 1 11:15:00 PST 2013


> I am using OnDemandServerMediaSession  and added two servermedia sessions with the name “live0” and “live1”. Both serverMediaSessions will stream MJPG video data.
>  
> I have set the reuseFirstSource flag, so that more than one client sessions to the same serverMediaSession(for e.g  “live0”) will be served with the single source, that is working fine and I could get 25 fps per session. But when I try to play two different client sessions to “live0” and “live1” then the I could get 3-5 frames per second in the client side!!!

MJPEG streams tend to be extremely high bitrate.  Wastefully so - which is why, in 2013, nobody should be sending MJPEG anymore!  (See <http://www.live555.com/liveMedia/faq.html#jpeg-streaming>)  You are probably approaching the capacity of your network, increasing the frequency of lost packets (which *significantly* increases the frequency of lost MJPEG frames!).

To help understand this - suppose, for example, that each MJPEG frame is 50 kBytes, and therefore consists of about 35 consecutive RTP packets.  Note that if *any* of these 35 RTP packets gets lost, then the receiver will lose (and therefore drop) the *entire* MJPEG frame.  Suppose that the packet loss rate is 1% - i.e., assume (for this example) a random loss rate of 1/100.  Then, the probability that a (35-packet) MJPEG frame will be received correctly at the receiver's end is (99/100)^35 = 0.70 (approx).  I.e., a 1% packet loss rate produces a 30% frame loss rate!

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130201/13670c9b/attachment.html>


More information about the live-devel mailing list