Skip to main content
Skip table of contents

How to Switch Media Profile

The majority of IP cameras have several profiles or streams that are streaming video in different formats and quality. When the camera is connected to VXG Cloud it starts streaming using the profile in H.264 encoding, has the highest resolution, contains compatible audio and supports PTZ. The profile/stream can be changed using the VXG API:

1. Get the list of media profiles on the camera:

CODE
curl -X GET "https://web.skyvr.videoexpertsgroup.com:443/api/v2/cameras/<CAMID>/media_streams/" -H "accept: application/json" -H "Authorization: Acc <ACCESS_TOKEN>"

Response example:

CODE
{
  "live_ms_id": "2",
  "mstreams_supported": [
    {
      "as_id": "1",
      "id": "0",
      "vs_id": "EncCfg_L1S1"
    },
    {
      "as_id": "1",
      "id": "1",
      "vs_id": "EncCfg_L1S2"
    },
    {
      "as_id": "1",
      "id": "2",
      "vs_id": "EncCfg_L1S3"
    },
    {
      "as_id": "1",
      "id": "3",
      "vs_id": "EncCfg_L1S4"
    }
  ],
  "rec_ms_id": "2""
}

where "live_ms_id" and "rec_ms_id" show the profile ID that is used for live and recorded video correspondingly. In this example in both cases the profile "EncCfg_L1S3" ("id": "2") is used.

2. Change the profile used for live and/or recorded video by entering the ID of preferred profile. For example, if you want to change both to "EncCfg_L1S2" ("id": "1"):

CODE
curl -X PUT "https://web.skyvr.videoexpertsgroup.com:443/api/v2/cameras/<CAMID>/media_streams/" -H "accept: application/json" -H "Content-Type: application/json" -H "Authorization: Acc <ACCESS_TOKEN>" -d "{ \"live_ms_id\": \"1\", \"rec_ms_id\": \"1\"}"

This functionality also can be used to support multi-stream cameras with several lenses - the same camera can be connected to VXG Cloud several times, each time selecting different profile for the corresponding lense. In this case, the video bitrate should be overseen to keep the camera CPU usage from peaking.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.