Streaming

Note

The StreamingClient constructs HLS playlist URLs for live and historical camera streams. It does not handle the HTTP stream itself — pass the returned URL to a media player (e.g. VLC, ffmpeg) or embed it in an <video> tag. Requires a Streaming API Key, not a standard API key.

Client

class pykada.camera_stream.StreamingClient(api_key=None, token_manager=None)[source]

Bases: BaseClient

Client for interacting with Verkada Footage Streaming. This client provides methods to construct HLS playlist URLs for live and historical camera streams. Make sure to use specifically Streaming API Keys for this client, as regular API keys will not work.

Initialize the client with either an API key or a token manager. If not key is provided, a default token manager will be used based on the environment configuration (VERKADA_API_KEY in a .env file).

Parameters:
get_stream_playlist_url(org_id, camera_id, start_time=0, end_time=0, codec='hevc', resolution='low_res', stream_type='stream')[source]

Construct the HLS .m3u8 playlist URL for live or historical streaming.

Parameters:
  • org_id (str) – The organization ID.

  • camera_id (str) – The camera ID.

  • start_time (Optional[int]) – Epoch seconds; use 0 for live streaming (defaults to 0).

  • end_time (Optional[int]) – Epoch seconds; use 0 for live streaming (defaults to 0).

  • codec (str) – Codec for the stream (defaults to “hevc”).

  • resolution (str) – Stream resolution (“low_res” or “high_res”; defaults to “low_res”).

  • stream_type (str) – Reserved parameter, must be “stream” (defaults to “stream”).

Return type:

str

Returns:

Fully‐qualified URL to the HLS playlist (.m3u8).

Raises:

ValueError – If any required string parameter is empty.