[Live-devel] live555 onDemand RTSP server

Ross Finlayson finlayson at live555.com
Sun Aug 10 16:09:56 PDT 2014


> I have managed to write code to stream MJPG RTSP using onDemandServer and everything is working, but I want to be able to allow multiple viewers, when I try to set up another connection everything begins to run super slow.  Does OnDemandServer allow this

Yes; however, be sure that your "OnDemandServerMediaSubsession" subclass sets the "reuseFirstSource" parameter (in the "OnDemandServerMediaSubsession" constructor) to True, so that the input source will get read only once, even if there's more than one concurrent client.

You should note, though, that JPEG is a very bandwidth-inefficient codec for streaming, and therefore you risk running into bandwidth limits, especially if you transmit more than one stream, as you are doing.


> or do I have do some multicast stuff?

Yes, multicast would be better (provided, of course, that your receivers can all be reached - from the source - by IP multicast routing).  To stream via multicast, you *don't* use a "OnDemandServerMediaSubsession"; instead, you use a "PassiveServerMediaSubsession".  To see examples of multicast servers that use "PassiveServerMediaSubsession"s, note the various "test*Streamer" demo applications.

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/20140810/e7572467/attachment.html>


More information about the live-devel mailing list