Integrating RTSP streams from Alta Video
Last modified: Wednesday January 08, 2025.
You can use the Avigilon Alta RTSP service to view video directly from Alta Video in 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 Alta RTSP feature uses the secure Real-Time Streaming Protocol, and you must use them only with applications that support Real-Time Streaming Protocol over TLS(RTSPS).
This service takes care of requesting the streams using the Alta Video cloud API and handles the media path negotiations to the source of the video stream.
Item | Description |
---|---|
The client application makes an RTSPS request to the RTSP service. | |
The RTSP service uses the credentials from that RTSPS request to authenticate with the Alta Video deployment. | |
After successfully authenticating, RTSP performs the API requests to the Alta Video deployment to set up the required WebRTC stream. This includes information about the camera to stream, whether it is a live stream or playback, starting time stamp, and so on. | |
The WebRTC negotiation includes the Smart Path negotiation, with the client end being the RTSP service. | |
Media flows from the requested device to the RTSP service. The RTSP service then sends the video data to the client application using RTSPS. |
Use the Alta Video cloud API to collect the information needed to form the RTSPS URL needed to request and stream the video from an Alta Video cloud deployment to your application.
URL structure
The URL is in the format: rtsps://<deploymentname>.stream.<region>.alta.avigilon.com:322/<streamMode>?deviceId=<deviceId>&<parameters>
For example, to view live video from https://example.us1.alta.avigilon.com:
rtsps://example.stream.us1.alta.avigilon.com:322/deviceStreams?deviceId=a1a1a1a1a1a1-a1a1-a1a1-a1a1-a1a1a1a1a1a1&height=360&width=720
To view video playback from https://example.us1.alta.avigilon.com:
rtsps://example.stream.us1.alta.avigilon.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 Video deployment. This is the information at the beginning of the URL you use at access Alta Video, or that you use to log into the Alta Video 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 starting time stamp, 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 RTSP.You can take the URL for your Alta Video deployment and replace https with rtsps and then add .rtsp between the deployment name and the region. Add the <streamMode>, <deviceId>, and <parameters> for your chosen RTSP stream.
The original format has been deprecated. Any existing streams using the previous format will continue to function. For new streams, use the format given in this topic.
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>.stream.<region>.alta.avigilon.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
Example: rtsps://user%40example.com:<password>@<deploymentname>.stream.<region>.alta.avigilon.com:322/<streamMode>?deviceId=<deviceId>&<parameters>
Use the credentials for a configured Alta Video user that has the relevant permissions for the selected device.
Required permissions
When using the RTSP service, ensure the relevant Alta Video user account has the required permissions:
View device information permission for the relevant device.- To stream live video, the Alta Video user account must include the
View live video general permission for the relevant device. - To play back historic video, the Alta Video user account must include the
View historic video general permission for the relevant device. - Additionally, the user must have access to the relevant Alta Video tools:
Devices ,Video view ,Alarms ,Rules ,Search , orCounts .