Overview
The Streams service enables you to create and manage live video streams with professional features including low-latency delivery (±4 seconds), DVR functionality, automatic recording, and real-time HTML overlays.Stream Object
The Stream object contains all configuration and status information for a live stream.Stream ID
Stream name. Often used as a human-readable identifier.Examples: “Conference in July”, “Stream #10003”, “Open-Air Camera #31 Backstage”
Stream on/off switch. When false, PULL is deactivated and PUSH returns an error.
Whether the main server is currently receiving and transcoding the stream
Whether the backup server is currently receiving the stream (PUSH method only)
true: Stream is received by PULL method from external serverfalse: Stream is received by PUSH method from encoder/OBS/mobile app
URL to PUSH stream using RTMP/RTMPS protocols. Change “rtmp://” to “rtmps://” for encrypted connection.
URL to PUSH stream using SRT protocol for low-latency over unreliable networks
URL to PUSH WebRTC stream using WHIP protocol for browser-based streaming
Backup RTMP/RTMPS URL for geographic redundancy
Backup SRT URL for geographic redundancy
URL to pull stream from (PULL method only). Can specify multiple addresses separated by space for round-robin backup.
HLS output URL with CMAF chunks (.m3u8). Recommended for all HLS streams. Supports low-latency (±5 sec default, ±3 sec available).
Legacy HLS output with MPEG-TS chunks (.ts). For compatibility with legacy devices. Does not support low-latency.
MPEG-DASH output URL (.mpd). Supports low-latency (±4 sec default, ±2 sec available).
Built-in HTML web player URL. Can be embedded in iframe on your website.
Whether DVR (rewind) functionality is enabled
DVR window duration in seconds. Range: [30…14400]. Maximum 4 hours.
Enables automatic recording when stream starts. Recordings are saved to video hosting.
Recording source:
origin: Record original RTMP/SRT sourcetranscoded: Record output with overlays and effects
Current recording duration in seconds (when recording is active)
360° visualization mode:
regular: Normal flat streamvr360: 360° modevr180: 180° modevr360tb: 3D 360° Top-Bottom
Enable real-time HTML overlay widgets on stream
Array of HTML overlay widgets configuration
List of qualities the stream is being transcoded to
Transcoding speed ratio. Should be 1.0 for real-time. Lower values indicate delivery issues.
URL to latest screenshot (updated every 10 seconds while live). JPEG format, 1080px wide.
Create Stream
Create a new live stream entity for broadcasting.stream.go
Stream name for identification
Enable stream processing. Default: true
true: PULL stream from external server (requiresuri)false: PUSH stream to our servers (default)
URL to pull stream from (required if
pull=true). Can specify multiple URLs separated by space.Enable DVR functionality. Default: false
DVR window in seconds. Range: 30-14400 (4 hours). Default: 3600
Automatically start recording when stream goes live. Default: false
Recording source:
origin or transcoded. Default: origin360° mode:
regular, vr360, vr180, vr360tb. Default: regularEnable HTML overlay widgets. Default: false
Custom quality set ID for transcoding
Custom user ID in your system
Custom metadata (JSON or any format)
Update Stream
Update stream configuration. All parameters are optional.stream.go
Get Stream
Retrieve stream details including current status and URLs.stream.go
List Streams
Retrieve a paginated list of all streams.stream.go
Delete Stream
Delete a live stream. Associated recordings remain as independent video entities.stream.go
Consider using
active: false instead of deleting if you want to temporarily disable the stream.Start Recording
Manually start recording a live stream. Stream must be live.stream.go
Recording takes ±3-7 seconds to initialize. Check the
recording and recording_duration fields to confirm recording status.Stop Recording
Stop recording and save the video.stream.go
The created video entity from the recording. Returns empty if no recording was active.
Clear DVR
Clear the DVR buffer for a stream.stream.go
Protocol-Specific Examples
RTMP Push Example
stream.go
SRT Push Example
stream.go
HLS Pull Example
stream.go
WebRTC WHIP Example
stream.go
WebRTC requires H.264 video and OPUS audio. Both tracks must be present.
Best Practices
Recording Management
- Long broadcasts are automatically split into 4-hour videos
- If stream drops, recording waits 10 seconds before finalizing
- Use
auto_recordfor unattended recording - Choose
record_type: transcodedto include overlays
Backup Streams
- Use backup URLs for geographic redundancy
- System switches to backup after 3-10 seconds of main stream failure
- Only one protocol can be active at a time (don’t push RTMP and SRT simultaneously)
DVR Configuration
- Set
dvr_durationbased on your use case (typical: 1-4 hours) - DVR consumes storage proportional to duration
- Use
ClearDvr()to free buffer space
Performance Monitoring
- Check
transcoding_speed: should be ~1.0 for real-time - Monitor
liveandbackup_livestatus - Use
screenshotURL for monitoring thumbnails
