Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The URL for accessing the live stream can be found by querying the camera type. The platform supports several protocols for video streaming. Protocols vary depending on camera access:

...

  • rtsp - Plain unencrypted RTSP

  • rtsph - Unencrypted RTSP over HTTP

  • rtsphs - Encrypted RTSP over HTTPS

  • rtspws - Unencrypted RTSP over WebSocket

  • rtspwss - RTSP over WebSocket Secure

Security of access to live stream

An API query for a streaming URL generates an RTSP link that is valid for 30 seconds. After 30 seconds or disconnecting the player, it will not be possible to connect the player and the application must request a new RTSP link.

Web Player

To playback live video from the platform we recommend using our web player(link) available in GitLab repository. The player uses a combination of WebSocket Secure and RTSP and is suitable for playing videos anywhere on the interneton your website please contact our support.

Example - find available profiles:

This example shows how to get a video stream for remote player. Most cameras allow streaming of different profiles (resolution and capture, frame rate, compression…).

Query the streamProfile type to find out the available profiles:

Code Block
languagegraphql
query {
   camera(node_id:140094){
    stream_profiles{
      stream_profile_id
      width
      height
    }
  }
}

...


Response:

Code Block
languagegraphql
{
  "data": {
    "camera": {
      "stream_profiles": [
        {
          "stream_profile_id": 120846,
          "width": 800,
          "height": 450
        },
        {
          "stream_profile_id": 120850,
          "width": 1920,
          "height": 1080
        }
      ]
    }
  }
}

The next query gets the RTSP and URL for the currently generated RTSP stream. In Postman example - Get live stream URL / getStreamProfileID

Example - get RTSP URL:

The next query gets the RTSP and URL for the currently generated RTSP stream:

Code Block
languagegraphql
query {
  camera(node_id:140094){
    live_view(stream_profile_id:120850){
      remote{
        rtsp{
          url
        }
      }
    }
  }
}

...


Response:

Code Block
languagejson
{
  "data": {
    "camera": {
      "live_view": {
        "remote": {
          "rtsp": {
            "url": "rtsp://nvhs10.survilla.net:2554/nvhs10~1600421245~9469bb1a2b831031456ef9c4abc182573d7a86a9f305f54df18621a9484d6134"
          }
        }
      }
    }
  }
}

In Postman example - Get live stream URL / getLiveStreamURL

Panel
panelIconIdatlassian-note
panelIcon:note:
bgColor#B3D4FF

If you want to test RTSP stream you can use VLC player - just copy link from response, press CTRL+N (Windows, Linux) / Command + N (macOS) and add your streaming URL. Note that the link to the stream is valid for 30 seconds.
Prerequisite: VLC player for test must be installed on computer. Mind that the RTSP doesn’t support UDP (only TCP is supported).


Some cameras support multiple video channels. For example, cameras with multiple optics or virtual views of 180 ° cameras. The channel can be selected by the optional parameter video_channel_node_id in the type live_view (stream_profile_id: 120850, video_channel_node_id: 1000). A list of video channels of each camera is available in camera type.

...