RTSP Streaming & Discovery

RTSP Usage Flow

The diagram below shows the common sequence for advertising and accessing RTSP video streams.

Camera Streaming RTSP flow

Video Advertising (Avahi)

In order to use this service DCM must be built with Avahi enabled.

The Avahi implementation of the Zeroconf protocol is used to advertise available video streams. All streams are published as RTPS services with path, ip and port necessary to access the resource. Extra information about video is published using txt-record field from the Avahi resource.

It is possible to use the application avahi-browse to retrieve the information published by the Camera Manager. A basic output of the command is the following:

$ avahi-browse -arl
+ wlp58s0 IPv4 /video0                                       _rtsp._udp           local
+ wlp58s0 IPv4 /video1                                       _rtsp._udp           local
= wlp58s0 IPv4 /video0                                       _rtsp._udp           local
   hostname = [hostname.local]
   address = []
   port = [8554]
   txt = ["name=Integrated_Webcam_HD" "frame_size[0]=YUYV(640x480,160x120,320x180,320x240,424x240,640x360,640x480)" "frame_size[1]=MJPG(848x480,960x540,1280x720)"]
= wlp58s0 IPv4 /video1                                       _rtsp._udp           local
    hostname = [hostname.local]
    address = []
    port = [8554]
    txt = ["name=USB_Camera_1" "frame_size[0]=YUYV(640x480,160x120,320x180,320x240,424x240,640x360,640x480)"]

See also Manual Tests > List Available Streams with Avahi for a similar example using avahi-browse -r _rtsp._udp.

Video Streaming

The Camera Manager uses GStreamer RTSP servers to handle video streaming. The streams are accessed using a RTSP URI created using the information from zeroconf output.

The base URI to access video streams is:



  • ADDRESS is the hostname or IP of the remote server, informed in zeroconf IP field.
  • PORT is the port of the RTSP server, informed in zeroconf port field.
  • VIDEO_STREAM_ID is the name of the video stream, informed in zeroconf name field.

The supported optional parameters option1, option2,...,optionN, as long as its values are any from:

  • height - The height of the video stream
  • width - The width of the video stream

For example, all following requests are supported for the videos published in the previous section:

URI Stream
rtsp:// Play video0 stream using default configuration.
rtsp:// Play video1 stream using YUYV format and resolution 640x480
rtsp:// Play video1 stream using default configuration because 800x600 resolution is not available for format YUYV.
© Dronecode 2017. License: CC BY 4.0            Updated: 2018-06-19 05:20:14

results matching ""

    No results matching ""