Request combined video

Request one video that combines several cameras of an event, arranged in a layout. The combined video download feature must be enabled for your account.

The response is the jobId of the video: the job that created it when the video already exists, the job in progress when an identical request was already made, or a new job. Get the download link with GET /devices/{imei}/combined-video/{jobId} once the job is completed.

When the job ends, a system message webhook of type combinedVideo is sent if the combinedVideo setting is enabled in the device system messages webhook settings. It contains the jobId, status (COMPLETED, FAILED, CANCELLED or DEADLINE_EXCEEDED), cameraIds, layout (the layout name, also when the default was used) and startingTime.

  • For COMPLETED, it also contains the fileSize in bytes and, when known, the duration in seconds, width, height and completedAt.

  • Otherwise it contains an errorCode: SOURCE_MEDIA_MISSING, SOURCE_MEDIA_CORRUPT, LENS_COVERAGE_GAP (the cameras do not record the same period), INPUT_TOO_LARGE, INVALID_REQUEST, DEADLINE_EXCEEDED or INTERNAL_ERROR.
Without the webhook, call GET /devices/{imei}/combined-video/{jobId}: it answers 400 until the job is completed.

The cameras are aligned by their capture time. The video runs from the earliest camera start to the latest camera end, and a camera that starts later or ends earlier is shown as black for those few seconds. Audio is taken from the first camera in cameraIds that has an audio track.

Request
Security:
path Parameters
imei
required
string (IMEI)

The IMEI of the device. The IMEI number can be found on a sticker on the device itself or on the back of the device box.

Example: 357660101000198
eventId
required
string

The ID of the event. Obtain this from GET /devices/{imei}/events.

Example: 62
Request Body schema: application/json
cameraIds
required
Array of integers [ 2 .. 6 ] items unique

The IDs of the cameras to combine, in layout order: the first camera fills the first cell (the main cell in main-* layouts). Obtain them from the event object.

layout
string (Combined video layout)

How the cameras are arranged: the name of a layout. Each layout takes a set number of cameras, filled in cameraIds order. Optional: without a layout, 2 cameras are side by side (1x2), 3 or 4 in a 2x2 grid, 5 or 6 in a 2x3 grid.

  • 1x2 (2 cameras): side by side.
  • 2x1 (2 cameras): one above the other.
  • pip (2 cameras): the first camera full size, the second as a picture-in-picture inset in the bottom-right corner, in Full HD (1920x1080).
  • 1x3 (3 cameras): one row of three.
  • main-side (3 cameras): the first camera large on the left, the other two stacked on the right.
  • 2x2 (3 or 4 cameras): a grid of 2 rows of 2.
  • main-3 (4 cameras): the first camera large on top, the other three in a row below.
  • 2x3 (5 or 6 cameras): a grid of 2 rows of 3.

Enum: "1x2" "2x1" "pip" "1x3" "main-side" "2x2" "main-3" "2x3"
conceal
boolean
Default: false

True to combine the concealed (blurred) video of each camera. The conceal service must be enabled, and each concealed video must already be ready.

Responses
200

The job of the combined video.

400

Bad request error

401

Unauthorized error

403

Forbidden error

404

Not found error

409

Conflict error

429

Too many requests error - try again later

500

Internal server error

post/devices/{imei}/events/{eventId}/combined-video
Request samples
application/json
{
  • "cameraIds": [
    ],
  • "layout": "pip"
}
Response samples
application/json
{
  • "data": {
    },
  • "requestId": "06327cae-e075-42ca-b620-c5cfdd3b4e37"
}