segment
Record HLS (.ts segments + playlist) to S3, GCS, or Azure.
Example
Section titled “Example”{ "name": "hls_rec", "type": "segment", "inputs": ["mix_video", "mix_audio"], "config": { "storageType": "s3", "storageConfig": { "bucket": "my-recordings", "region": "us-east-1", "accessKeyId": "<key>", "secretAccessKey": "<secret>", "prefix": "shows/{date}/", "filename": "composite" }, "segmentDurationSec": 6, "maxPlaylistEntries": 10, "caption": { "showSpeaker": true, "textSplit": { "enabled": true, "length": 42, "lines": 2 } }, "encoding": { "videoCodec": "h264" } }}Config
Section titled “Config”| Field | Type | Default | Description |
|---|---|---|---|
storageType | string | required | s3 | gcp | azure. |
storageConfig | object | required | Provider credentials and path. See Storage config. |
format | string | "hls" | Output format (hls). |
segmentDurationSec | int | — | Segment length in seconds (0–60). |
maxPlaylistEntries | int | — | Live sliding-window playlist size (0–1000). VOD / finalize includes all segments regardless. |
encoding | object | — | See shared encoding. H.264 + AAC recommended. |
caption | object | — | HLS WebVTT caption options. See caption. |
prefix and filename support path templates. Filename has no extension; the engine appends by format (default basename index → index.m3u8).
caption
Section titled “caption”Omit caption to use defaults: speaker names are shown and one WebVTT cue is written per ASR final. caption.textSplit splits long captions only for this HLS subtitle rendition; other downstream consumers still receive the original avflow.asrText event.
| Field | Type | Default | Description |
|---|---|---|---|
showSpeaker | bool | true | Include speaker name in WebVTT cues when ASR is wired. |
textSplit.enabled | bool | false | Turn on HLS caption display splitting. |
textSplit.length | int | 42 | Max display columns per line (Latin=1, CJK/fullwidth/emoji=2). When enabled, 0 / omitted → 42. Cap 200. |
textSplit.lines | int | 2 | Max lines per WebVTT cue when enabled; 0 / omitted → 2. Cap 10. |
Wiring
Section titled “Wiring”Must connect to a single mixed stream — use video_mixer + audio_mixer for RTC rooms.
Wire asr into inputs for subtitle renditions. Each definite ASR result is written as a WebVTT cue as it arrives; caption.textSplit can split long cues for HLS display. The VTT (and subtitle playlist) are uploaded on finalize.
Storage config
Section titled “Storage config”Works with AWS S3, Cloudflare R2, MinIO, and other S3-compatible APIs.
| Field | Type | Description |
|---|---|---|
bucket | string | Bucket name (required). |
region | string | AWS region (optional for some S3-compatible endpoints). |
accessKeyId | string | Access key id (required). |
secretAccessKey | string | Secret access key (required). |
sessionToken | string | Optional STS session token. |
endpoint | string | Custom S3 API endpoint (R2, MinIO, …). |
forcePathStyle | bool | Force path-style addressing (often needed for MinIO / custom endpoints). |
prefix | string | Key prefix (may include templates). |
filename | string | Playlist basename without extension (default index). |
| Field | Type | Description |
|---|---|---|
bucket | string | GCS bucket (required). |
credentialsJson | object | Service-account JSON object (required, inline). |
prefix | string | Object prefix (templates allowed). |
filename | string | Playlist basename (default index). |
| Field | Type | Description |
|---|---|---|
container | string | Blob container (required). |
accountName | string | Storage account name (required). |
accountKey | string | Account key (use this or sasToken). |
sasToken | string | SAS token (use this or accountKey). |
prefix | string | Blob prefix (templates allowed). |
filename | string | Playlist basename (default index). |
Path templates
Section titled “Path templates”prefix and filename may contain {var} placeholders:
| Variable | Meaning |
|---|---|
jobId | Job id |
jobName | Job name |
roomName | Room name (from upstream RTC source when available) |
date | YYYY-MM-DD |
time | HH-MM-SS |
timestamp | Unix milliseconds |
identity | Participant identity (when applicable) |
trackSource | Track source |
trackSid | Track SID |
trackName | Track name |
sourceName | Source component name (e.g. room_src) |
Known variables with no value expand to empty; unknown {…} tokens are left unchanged.
Pricing
Section titled “Pricing”Encoding tier by encoded resolution and codec, plus successful upload egress. Image sinks keep their separate per-image pricing and do not use this A/V egress model. Sink pricing.