Skip to main content

Quick Example

The preferred RTStream interface follows the same Understand → Index → Retrieve flow as videos, but runs continuously on new stream windows.
Initial support for the new interface is VLM-only with time-based segmentation. See Understand & Index RTStreams for the complete interface.

Visual Indexing Compatibility

The index_visuals() helper remains available as an explicit compatibility API. It creates a continuous VLM scene index directly from stream frames.

batch_config options

Examples:

Managing scene indexes


Audio Indexing Compatibility

The index_audio() helper remains available for compatibility:

Audio batch_config


Transcription

Real-time speech-to-text:

Query indexed content with natural language:

Search Results

Each shot contains:

Stream Generation

Use generate_stream() to create a playable stream for a time range. You can optionally pass player_config to attach metadata to a shareable player URL.

player_url vs stream_url

generate_stream() returns player_url and stores both URLs on the instance. Use player_url for sharing and embedding, stream_url for custom player integrations.

player_config

player_config is optional. When provided, the player URL includes the metadata for sharing.

Embed Code

After generating a stream, you can produce embeddable HTML:
RTStream does not support auto_generate because generate_stream() requires explicit start and end parameters.

Events and Alerts

Events are reusable detection rules. Alerts wire events to indexes for notifications.

Create Event

Create Alert

Alert Delivery

Manage Alerts


WebSocket Events

Receive real-time events by passing ws_connection_id:

Event Channels

The current V2 alert channel is produced by the V2 index in the quick example: The following channel names are available through RTStream helper APIs:

Next Steps

Stream Lifecycle

Start, stop, and reconnect patterns

RTSP Ingest

Connect RTSP sources