Skip to content
Console

segment

Record HLS (.ts segments + playlist) to S3, GCS, or Azure.

{
"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" }
}
}
FieldTypeDefaultDescription
storageTypestringrequireds3 | gcp | azure.
storageConfigobjectrequiredProvider credentials and path. See Storage config.
formatstring"hls"Output format (hls).
segmentDurationSecintSegment length in seconds (060).
maxPlaylistEntriesintLive sliding-window playlist size (01000). VOD / finalize includes all segments regardless.
encodingobjectSee shared encoding. H.264 + AAC recommended.
captionobjectHLS WebVTT caption options. See caption.

prefix and filename support path templates. Filename has no extension; the engine appends by format (default basename indexindex.m3u8).

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.

FieldTypeDefaultDescription
showSpeakerbooltrueInclude speaker name in WebVTT cues when ASR is wired.
textSplit.enabledboolfalseTurn on HLS caption display splitting.
textSplit.lengthint42Max display columns per line (Latin=1, CJK/fullwidth/emoji=2). When enabled, 0 / omitted → 42. Cap 200.
textSplit.linesint2Max lines per WebVTT cue when enabled; 0 / omitted → 2. Cap 10.

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.

Works with AWS S3, Cloudflare R2, MinIO, and other S3-compatible APIs.

FieldTypeDescription
bucketstringBucket name (required).
regionstringAWS region (optional for some S3-compatible endpoints).
accessKeyIdstringAccess key id (required).
secretAccessKeystringSecret access key (required).
sessionTokenstringOptional STS session token.
endpointstringCustom S3 API endpoint (R2, MinIO, …).
forcePathStyleboolForce path-style addressing (often needed for MinIO / custom endpoints).
prefixstringKey prefix (may include templates).
filenamestringPlaylist basename without extension (default index).
FieldTypeDescription
bucketstringGCS bucket (required).
credentialsJsonobjectService-account JSON object (required, inline).
prefixstringObject prefix (templates allowed).
filenamestringPlaylist basename (default index).
FieldTypeDescription
containerstringBlob container (required).
accountNamestringStorage account name (required).
accountKeystringAccount key (use this or sasToken).
sasTokenstringSAS token (use this or accountKey).
prefixstringBlob prefix (templates allowed).
filenamestringPlaylist basename (default index).

prefix and filename may contain {var} placeholders:

VariableMeaning
jobIdJob id
jobNameJob name
roomNameRoom name (from upstream RTC source when available)
dateYYYY-MM-DD
timeHH-MM-SS
timestampUnix milliseconds
identityParticipant identity (when applicable)
trackSourceTrack source
trackSidTrack SID
trackNameTrack name
sourceNameSource component name (e.g. room_src)

Known variables with no value expand to empty; unknown {…} tokens are left unchanged.

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.