Skip to main content
Use client.livestream to run continuous analysis on a live video source such as an HLS .m3u8 stream. A session pulls the stream, chunks it, runs the rapid-review query on each chunk, and appends detected events to the session. Open the livestream demo in Colab

Start a Session

source_url should point to a reachable live stream. HLS .m3u8 URLs are the common path for browser-viewable livestreams. Parameters:

Listen for Events

iter_events() polls the session and yields each new event once. Use poll_interval to control how often the SDK checks for new events and timeout to stop listening after a fixed number of seconds.
Parameters:

End and Fetch the Final Session

Completed sessions include the final chunk count and the accumulated event list. end_session(stream_id, session_id) stops an active session. get_session(stream_id, session_id) returns the current or final session payload.

Session Fields

Event Timing Fields

Livestream event timestamps are relative to the session timeline. Example event shape:

Signed Playback Manifest

After chunks are available, get_signed_manifest() returns a short-lived signed HLS manifest URL for playback.
Use the returned url with an HLS-capable player.