Skip to main content
Open In Colab

What You’ll Build

This quickstart covers the reusable multicam pattern behind VideoDB’s live-intelligence examples:
  • Connect and store four RTSP feeds
  • Run an independent visual index for every camera
  • Detect three events on every feed
  • Receive and attribute alerts over one WebSocket
  • Retrieve the detected interval from all cameras
  • Compose a synchronized 2×2 video with the Timeline Editor
The sample uses four public-plaza feeds and detects people with trolley bags, crowd formation, and unattended luggage. Replace the URLs and prompts to adapt the pattern to your own cameras.

Setup

1. Connect the Camera Feeds

Keep store=True enabled. Multicam replay depends on requesting the same historical time range from every camera.

2. Index Every Camera

3. Create Events and Alerts

Open one WebSocket and attach every camera-event combination to it:
This creates 12 alerts: four cameras multiplied by three event types.

4. Receive Alerts from Every Camera

An alert’s top-level rtstream_id identifies the camera. The observed data envelope can include the event label, confidence, explanation, detected start and end timestamps, and a clip URL; inspect live messages because optional fields are delivery-dependent.

5. Retrieve a Synchronized Time Window

This uses the same Unix timestamp range across every stream, so the camera clocks must already be aligned for frame-level synchronization.
generate_stream() returns a player URL. Read stream.stream_url after the call when you need the HLS media URL for downloading or composition.

6. Compose the Multi-Angle Video

The notebook completes the replay in three stages:
  1. Download each HLS URL with FFmpeg.
  2. Upload the four MP4 clips with coll.upload(file_path=...).
  3. Place each VideoAsset(id=...) on its own Timeline Editor track.
Open the notebook for the complete FFmpeg, upload, duration matching, camera label, and playback cells.

Cleanup

Open the Multicam Quickstart

Run the complete four-camera workflow in Google Colab.

Next Steps

Public Safety Surveillance

Apply the pattern to a public-plaza monitoring use case

Basketball Analytics

Adapt multicam alerts and composition to live sports