About: Using Cloud RTSP with your Aware integrations

Last modified: Wednesday November 22, 2023.

You can use the Avigilon Alta Cloud RTSP service to view video from Aware Cloud directly from your application. This service allows you to request video streams from an Avigilon Alta deployment using real time streaming protocol over TLS (RTSPS).

The Avigilon AltaCloud RTSP feature uses secured real time streaming protocol, and so must only be used with applications that support real time streaming protocol over TLS(RTSPS).

This service takes care of requesting the streams using the Aware Cloud API's and handles the media path negotiations to the source of the video stream.

CloudRTSP flow
Figure 1 – Video flow using Cloud RTSP

Table 1 – Key to Figure 1

Item Description
callout 1 The client application makes an RTSPS request to the Cloud RTSP service.
callout 2 The Cloud RTSP service uses the credentials from that RTSPS request to authenticate with the Aware Cloud deployment.
callout 3 After successfully authenticating, Cloud RTSP performs the API requests to the Aware Cloud deployment to set up the required WebRTC stream. This includes information about the camera to stream, whether it is a live stream or playback, the time to start the playback, as well as other parameters.
callout 4 The WebRTC negotiation includes the Smart Path™ negotiation, with the client end being the Cloud RTSP service.
callout 5 Media flows from the requested device to the Cloud RTSP service. The Cloud RTSP service then sends the video data to the client application using RTSPS.

Use the Aware Cloud API to collect the information needed to form the RTSPS URL needed to request and stream the video from an Aware Cloud deployment to your application.

URL structure

The URL is in the format: rtsps://<deploymentname>.rtsp.<region>.aware.avasecurity.com:322/<streamMode>?deviceId=<deviceId>&<parameters>

For example, to view live video from https://example.us1.aware.avasecurity.com:

rtsps://example.rtsp.us1.aware.avasecurity.com:322/deviceStreams?deviceId=a1a1a1a1a1a1-a1a1-a1a1-a1a1-a1a1a1a1a1a1&height=360&width=720

To view video playback from https://example.us1.aware.avasecurity.com:

rtsps://example.rtsp.us1.aware.avasecurity.com:322/devicePlayback?deviceId=a1a1a1a1a1a1-a1a1-a1a1-a1a1-a1a1a1a1a1a1&startTimestamp=2022-09-28T07:20:00.00Z

 Where:

  • Only RTSPS streams encrypted with TLS, running on port 322, are allowed.
  • <deployment> is the first part of the name of your Alta Aware deployment. This is the information at the beginning of the URL you use at access your Aware Cloud deployment, or that you use to log into the Alta Aware mobile app.
  • <region> to keep the shortest routing of the video, use the region to which your deployment is associated. For example, us1 or eu1.
  • <streamMode> is deviceStreams for viewing live video, or devicePlayback to view historic video.
  • <deviceId> is the GUID for the camera to stream.
  • <parameters> are the additional information needed for your chosen stream. For example:
    • When streaming live video, you can optionally specify the height and width for the stream, for example, &height=360&width=720.
    • When playing back historic video, specify the time that the video should start, for example, &startTimestamp=2021-09-23T07:20:00.00Z
  • Authentication of the application user is done via the credentials supplied with the RTSPS request. The same credentials can be used for the RTSPS and other API requests.

    The RTSP stream users credentials used for local streaming do not work for Cloud RTSP.

    You can take the URL you use to connect to your Aware deployment, and edit it by replacing https with rtsps, and then adding .rtsp between the deployment name and the region. You then need to add the <streamMode>, <deviceId>, and <parameters> for your chosen RTSP stream.

    Any existing streams set up with the previous format for defining the cloud RTSP streams will continue to function, but any new streams being configured should use the format given in this topic, as the older format has been deprecated.

To embed the username and password into the RTSP URL, edit the string to include <username>:<password>@ immediately before the deployment information, as follows: rtsps://<username:password>@<deploymentname>.rtsp.<region>.aware.avasecurity.com:322/<streamMode>?deviceId=<deviceId>&<parameters>

For security reasons, you might prefer to not embed the user credentials in the URL, and to rely on any credentials dialog within the application that is consuming the RTSP streams.

When entering the email address used as the user name within the URL, replace the @ sign in the email address with %40.
Example: rtsps://user%40example.com:<password>@<deploymentname>.rtsp.<region>.aware.avasecurity.com:322/<streamMode>?deviceId=<deviceId>&<parameters>

Use the credentials for a configured Alta Aware user that has the relevant permissions for the selected device.

Required permissions

When using the Cloud RTSP service, ensure that the Aware user account used to with the Cloud RTSP service has the relevant permissions:

  • View device information permission for the relevant device.
  • For streaming of live video — the Aware Cloud user account must include the View live video general permission for the relevant device.
  • For playback of historic video — the Aware Cloud user account must include the View historic video general permission for the relevant device.
  • Additionally, the user must have access to the relevant Aware tools: Devices, Video view, Alarms, Rules, Search, or Counts.