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.

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