[Live-devel] one rtsp - many rtp

Ross Finlayson finlayson at live555.com
Tue Mar 9 19:50:29 PST 2010


>i want to send many sessions from one point.
>
>I have read aboput the threading faq, and i
>know it may be simple to attach many videosinks
>to one task scheduler, but i want to use different
>threads since i want to spread the video compression
>across all possible cores.
>
>right now i create one rtspserver per thread
>and 'attach' rtp+rtcp to it.
>would it be possible to crate one rtsp server
>with many sessions handled in different threads?

No, definitely not, because (as noted in the FAQ) our software uses a 
single-threaded event loop - rather than threads - for concurrency.

However, because these streams are all independent, you could - for 
simplicity - use multiple RTSP server *processes* (i.e., multiple 
instances of a RTSP server application), rather than multiple RTSP 
server threads.  Each RTSP server instance would need to use a 
different TCP port (i.e., other than the default port: 554), and 
therefore each stream's "rtsp://" URL would need to include the port 
number.

On the other hand, because you really want parallelism (use of 
multiple cores) only for the encoding portion of your application, 
you could make the encoding part of your server - which would not use 
LIVE555 code at all - multi-threaded, and then have this (somehow) 
feed encoded data into a single (and of course single-threaded) RTSP 
server application that uses LIVE555.  That would require more 
programming, but might be the best solution if you want to have only 
a single RTSP server.

-- 

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


More information about the live-devel mailing list