5

I'm trying to setup a RTSP server by using gstreamer. And I can use some help to define the server.

The concept of the project is:
We have several camera modules (let's say 'cam0' and 'cam1') and each of these have some video channels (HD and SD) and some audio channels (language0 and language1). The user(RTSP client) should be able to switch between the different video and audio channels. If a user is watching the HD stream with language0, he doesn't want to receive the other streams(reducing the required bandwidth).

The question is, how should I implement the RTSP server to handle these requirements?

Which of the following proposals is the best? Or if there is a better way to do it, let me know.

  1. Use one RTSP server per camera module and this server has multiple URI's, like:
    server0: rtsp://IP:port/HD
    server0: rtsp://IP:port/SD
    server0: rtsp://IP:port/lang0
    server0: rtsp://IP:port/lang1
  2. Use multiple RTSP servers per camera module and each server has one URI, like:
    server0: rtsp://IP:port0/HD
    server1: rtsp://IP:port1/SD
    server2: rtsp://IP:port2/lang0
    server3: rtsp://IP:port3/lang1
  3. Use one RTSP server per camera module and one URI with several substreams, like:
    server0: rtsp://IP:port/stream (contains substreams HD, SD, lang0, lang1)

So is one of these suggestions the right way to implement the RTSP server? And only the streams that are being watched have to be on the network.

Notes:
I use gst-rtsp-server for the RTSP server.
I'm using rtspsrc to receive the streams.

Update: I use a combination of case 1 and 3. So I have two video streams s1 and s2. And for s1 I use case 3 to have two sub streams, hd and sd. I was not able to split those two because they come from the same videosrc. So both are send if one is requested.

To get case 1, you have to use two media-factories and give them a different uri. I gave them both a different multicast address and port range.

Toon Heyrman
  • 101
  • 2
  • 7

0 Answers0