[Live-devel] shared audio stream
Ross Finlayson
finlayson at live555.com
Wed Oct 23 04:48:24 PDT 2024
> On Oct 23, 2024, at 3:22 PM, Lutz Fiebach <lutz at fiebach.de> wrote:
>
> Hello live555 Team,
>
> In our project we use a single mono stream which we play out with two different video streams via RTSP.
> If a client connects and disconnects stream 0 and then immediately connects stream 1, the RTSP server
> recognizes after a short time that stream 0 has been disconnected and terminates the video but also the audio stream.
>
> I think this happens because it was the last user of stream 0 and the RTSP server is not aware that the audio stream is still being used by another channel.
>
> Do we have a way to prevent this ?
Yes, make sure that the “reuseFirstSource” parameter (in the “OnDemandServerMediaSubsession” subclass for your audio stream) is set to
True
when you create it.
That tells the RTSP server to use the existing audio source when a second (or more) client requests the stream (rather than opening the audio source each time for each new client).
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list