Quick Example
import videodb
conn = videodb.connect()
coll = conn.get_collection()
# Get existing stream
rtstream = coll.get_rtstream("rts-xxx")
# Control lifecycle
rtstream.stop() # Pause ingestion
rtstream.start() # Resume ingestion
import { connect } from 'videodb';
const conn = await connect();
const coll = await conn.getCollection();
// Get existing stream
const rtstream = await coll.getRTStream("rts-xxx");
// Control lifecycle
await rtstream.stop(); // Pause ingestion
await rtstream.start(); // Resume ingestion
Lifecycle Control
Start/Stop
# Pause ingestion (stream remains configured)
rtstream.stop()
# Resume ingestion
rtstream.start()
// Pause ingestion
await rtstream.stop();
// Resume ingestion
await rtstream.start();
Status Values
| Status | Description |
|---|---|
connected | Actively ingesting |
stopped | Paused, can resume |
error | Connection issue |
Export a Stopped Stream
After stopping a stream, you can export it as a video or audio asset in your collection usingexport().
# Export a stopped stream as a video/audio asset
result = rtstream.export(name="my_recording")
# RTStreamExportResult attributes
print(result.video_id) # "m-xxx"
print(result.stream_url) # HLS stream URL
print(result.player_url) # Player URL (None for audio-only)
print(result.duration) # Duration in seconds
# Generate embed code from export
embed_html = result.get_embed_code()
// Export a stopped stream as a video/audio asset
const result = await rtstream.export("my_recording");
// RTStreamExportResult attributes
console.log(result.videoId); // "m-xxx"
console.log(result.streamUrl); // HLS stream URL
console.log(result.playerUrl); // Player URL (null for audio-only)
console.log(result.duration); // Duration in seconds
// Generate embed code from export
const embedHtml = result.getEmbedCode();
Export Parameters
| Parameter | Type | Description |
|---|---|---|
name | str (optional) | Name for the exported asset. Defaults to "{stream_name} - Recording" |
RTStreamExportResult
| Attribute | Description |
|---|---|
video_id | The ID of the exported video/audio asset |
stream_url | HLS stream URL for playback |
player_url | Shareable player URL (None for audio-only channels) |
name | Name of the exported asset |
duration | Duration of the recording in seconds |
Index Lifecycle
Indexes can also be started/stopped independently:scene_index = rtstream.get_scene_index(index_id)
# Pause indexing (stream continues)
scene_index.stop()
# Resume indexing
scene_index.start()
const sceneIndex = await rtstream.getSceneIndex(indexId);
// Pause indexing
await sceneIndex.stop();
// Resume indexing
await sceneIndex.start();
Meeting Recording
Record from Zoom, Google Meet, or Microsoft Teams. A bot joins your meeting, records, and uploads directly to VideoDB.
Start Recording
meeting = conn.record_meeting(
meeting_url="https://meet.google.com/abc-defg-hij",
bot_name="Meeting Recorder",
bot_image_url="https://your-domain.com/bot-avatar.jpg",
meeting_title="Weekly Standup",
callback_url="https://your-backend.com/webhooks/meeting",
callback_data={"internal_id": "123"}
)
print(f"Recording started: {meeting.id}")
const meeting = await conn.recordMeeting({
meetingUrl: "https://meet.google.com/abc-defg-hij",
botName: "Meeting Recorder",
botImageUrl: "https://your-domain.com/bot-avatar.jpg",
meetingTitle: "Weekly Standup",
callbackUrl: "https://your-backend.com/webhooks/meeting",
callbackData: { internalId: "123" }
});
console.log(`Recording started: ${meeting.id}`);
Recording to Collection
coll = conn.get_collection("your-collection-id")
meeting = coll.record_meeting(
meeting_url="https://zoom.us/j/123456789",
bot_name="Team Recorder",
meeting_title="Sprint Planning",
callback_url="https://your-backend.com/webhooks"
)
const coll = await conn.getCollection("your-collection-id");
const meeting = await coll.recordMeeting({
meetingUrl: "https://zoom.us/j/123456789",
botName: "Team Recorder",
meetingTitle: "Sprint Planning",
callbackUrl: "https://your-backend.com/webhooks"
});
Track Recording Status
# Poll status
meeting.refresh()
print(f"Status: {meeting.status}")
# Wait for completion
if meeting.wait_for_status("done", timeout=3600, interval=60):
print("Recording complete!")
video = coll.get_video(meeting.video_id)
// Poll status
await meeting.refresh();
console.log(`Status: ${meeting.status}`);
// Wait for completion
const success = await meeting.waitForStatus("done", 3600, 60);
if (success) {
console.log("Recording complete!");
const video = await coll.getVideo(meeting.videoId);
}
Recording Status Values
| Status | Description |
|---|---|
initializing | Bot is being set up |
processing | Actively recording |
done | Recording complete |
failed | Recording failed |
Callback Payload
Success:{
"success": true,
"message": "Meeting recording completed.",
"data": {
"video_id": "m-xxx",
"speaker_timeline": [
{"speaker_name": "Alice", "start_time_seconds": 9.94}
],
"stream_url": "...",
"player_url": "..."
}
}
{
"success": false,
"message": "Failed to record meeting."
}
Access Recording
meeting = coll.get_meeting("meeting-id")
# Get the recorded video
video = coll.get_video(meeting.video_id)
understanding = video.understand(
analyzers=[{"type": "spoken_words", "name": "transcript"}],
)
understanding.wait_until_complete()
transcript_analyzer = understanding.get_analyzer("transcript")
transcript_index = video.index(
name="meeting_transcript",
source=transcript_analyzer,
use_for=["semantic"],
fields={"semantic": ["text"]},
)
transcript_index.wait_until_complete()
const meeting = await coll.getMeeting("meeting-id");
// Get the recorded video
const video = await coll.getVideo(meeting.videoId);
const understanding = await video.understand([
{ type: "spoken_words", name: "transcript" },
]);
await understanding.waitUntilComplete();
const transcriptAnalyzer = await understanding.getAnalyzer("transcript");
const transcriptIndex = await video.index(transcriptAnalyzer, {
name: "meeting_transcript",
useFor: ["semantic"],
fields: { semantic: ["text"] },
});
await transcriptIndex.waitUntilComplete();
Supported Platforms
| Platform | URL Format |
|---|---|
| Google Meet | https://meet.google.com/xxx-xxxx-xxx |
| Zoom | https://zoom.us/j/123456789 |
| Microsoft Teams | Teams meeting link |
Meeting Features
- Brand-able Bot - Custom name and avatar
- Speaker Timeline - Per-speaker timestamps (Google Meet)
- Webhook Callbacks - Get notified on completion
- Collection Storage - Video lands directly in your collection

Next Steps
RTSP Ingest
Connect camera streams
Real-time APIs
Index and search live streams