Stream Footage (Live or Historical)

Introduction: Although many Verkada customers access camera footage via Command, we offer a flexible solution for integrating third-party applications with Verkada cameras. Streaming API allows users to stream both live and historical footage from cameras using the HLS (HTTP Live Streaming) protocol. HLS is an open protocol designed for streaming media content over the internet, supported by many video players. This document serves as a guide for integrating camera footage into third-party applications.

Prerequisites: Before integrating with the Streaming API, ensure you have the following:

  1. Access to the Verkada API. Read our Quick Start Guide
  2. An application equipped with a video player capable of streaming via HLS protocol (i.e HLS.js)
  3. A backend server capable of communicating with Verkada API servers

Steps to Stream Footage: Follow these steps to stream footage using the Streaming API:

Step 1: Acquire a JSON Web Token (JWT) via Get Streaming Token endpoint

To access the streaming endpoint, obtain a JWT via the Get Streaming Token endpoint. While the streaming endpoint doesn't require an API Key, it requires a valid JWT as a query parameter for streaming footage.

Step 2: Assemble the API endpoint URL Construct the full API endpoint URL with the necessary parameters. Determine whether you're streaming live or historical footage, specify the resolution (low or high), identify the camera, and identify the organization. Refer to the parameter documentation for detailed specifications.

Certain parameters must have a single value, while others don't need to be manually specified. Ensure all parameters have the correct values. Upon completing this step, you will have a fully constructed URL for the endpoint, which will return an m3u8 playlist file in response.

Note: Specify the key as stream.m3u8 to start HLS streaming for live or historical footage.

Step 3: Call the endpoint to stream footage

Once you've assembled the endpoint URL, you can either directly call the endpoint or let compatible video players handle the streaming process. Most HLS-compatible players will automatically interact with the endpoint, manage the m3u8 playlist response, and request subsequent video segments.

Alternatively, if you want to directly handle the m3u8 playlist output in your frontend code, you can parse the list of video segment files and render footage according to your application's requirements.

Response Codes:

Response Code Message Troubleshooting Steps
500 Failed authentication step Check if a valid JSON web token was submitted.
500 Internal Server Error Verkada's server might be experiencing issues. Submit a support ticket if it fails repeatedly.
500 Error Fetching Live Video m3u8 Check if all query parameters have correct values.
500 Error Fetching Historical Video m3u8 Check if all query parameters have correct values and the footage needed (i.e. timestamp specified) is within the camera's days of retention.
500 Error Fetching Live Video Init mp4 File Check if all query parameters have correct values.
500 Error Fetching Historical Video Init mp4 File Check if all query parameters have correct values and the footage needed (i.e. timestamp specified) is within the camera's days of retention.
500 Error Fetching Historical Video m4s File Check if all query parameters have correct values.
500 Error Fetching Live Video m4s File Check if all query parameters have correct values.
500 Error Fetching Historical Video Encryption Key Check if all query parameters have correct values.

For standard HTTP response codes, refer to our General Troubleshooting page.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required
Query Params
string
required

The unique identifier of the organization.

string
required

The unique identifier of the camera.

integer
Defaults to 0

The start time of the video stream on a specified camera. Formatted as epoch time in seconds. For live footage stream, set to 0. For history footage stream, start_time - end_time should be less than or equal to 3600.

Default: 0

integer
Defaults to 0

The end time of the video stream on a specified camera. Formatted as epoch time in seconds. For live footage stream, set to 0. For history footage stream, start_time - end_time should be less than or equal to 3600.

Default: 0

string
Defaults to hevc

The codec used for the video stream.

Default: hevc

string
Defaults to low_res

The resolution of the video stream. For live video stream, set to high_res for the high resolution stream, and set to low_res for the low resolution stream. For history video streaming, set to high_res for a mix of low and high resolution video stream with high resolution footage prioritized when available and set to low_res for only low resolution footage.

Default: low_res

string
Defaults to stream

The video type. This parameter is reserved for solely future compatibility. Set to stream.

Default: stream

string
required

A short lived token that will be used to verify the permission to stream live or history footage from the camera. This can be acquired with the Get Streaming Token endpoint.

string

File name to fetch the video segments. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

List of segments to preload. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

The unique identifier of the camera. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

The source of video segments. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

The encryption state of video segments. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

The location for cloud backup segment. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

The start time of video segments. Used for recent historical segments. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

The timestamp of video segments. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

The offset of video segments. Only relevant for recent historical segments. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

boolean
Defaults to false

If a segment should be transcoded to H264. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

The location of video segments. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

The byte range of video segments. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

The byte range of init segment. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

The initialization vector of video segments. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

The key name of video segments. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

The init segment of video segments. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

string

The stream identifier of video segments. The API User should not have to manually specify this parameter. It should be pre-loaded in the URLs contained in the HLS playlist file.

Response
200

ok

Language
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!