Recording and clips
A channel can record everything it plays to a Hubfly space Storage bucket, keep a DVR window so viewers can rewind, and cut clips from that window while the show is still live. Recordings and clips land in Storage as video assets you can play, share or put back on air in a playlist.
Before you start
Recordings and clips are written through a storage link with write or read_write access. Link a bucket under Recordings → Storage buckets; it needs storage:admin on the Storage project. See Link a Storage bucket.
Record a channel
A channel's recording settings:
| Field | Meaning |
|---|---|
enabled | Record whenever the channel is live. |
storageLink | The storage link to write to (ssl_…), with write access. |
prefix | Where in the bucket recordings go, for example recordings/main/. |
splitMinutes | 5–720. A long show is saved in parts of this length (60 by default). |
registerAsset | Register each part as a video asset in Storage. |
Set them on the channel under Channels, or with the API or the CLI:
echo '{"recording": {"enabled": true, "storageLink": "ssl_vod00001", "prefix": "recordings/main/",
"splitMinutes": 60, "registerAsset": true}}' | hubfly stream channels update acme-tv Main --file -Start and stop recording
To record only part of a show, start and stop recording live. This overrides enabled until you change it again:
hubfly stream control acme-tv --record-start sch_main0001
hubfly stream control acme-tv --record-stop sch_main0001These send the recording.start and recording.stop control ops (field channel), which need stream:operate. A schedule can run them to record a show at a set time.
Where recordings go
- Each finished part is uploaded to the linked bucket under the channel's prefix. The
recording.completedevent gives itsobject_key. - With
registerAsset, Hubfly space registers each part as a Storage video asset (no second upload) and starts its HLS encoding, so you can play it, share it or add it to a playlist. - Recordings are ordinary objects in your bucket and count against your Storage quota. The stream server does not bill the upload.
- Deleting the stream server removes its DVR and local files. Recordings already in Storage stay.
A recording shows Recording while it runs, then Uploading. In the API its status is recording, uploading, completed, registered (the Storage asset exists) or failed.
DVR
dvrMinutes (0–360) keeps the last minutes of a channel on the media node. Viewers can rewind within that window, and clips are cut from it. The HLS playlist becomes a sliding window with the time of every segment.
hubfly stream channels update acme-tv Main --dvr 120Cut a clip
A clip is a piece of the DVR window saved to Storage while the channel is live, such as a goal or a quote. It needs DVR on the channel and stream:operate.
- In the Dashboard: under Recordings, cut a clip: choose the channel, a name, when it starts (seconds ago) and its length, and where to save it.
- From and to are RFC 3339 times, or negative offsets from now:
-90s,-2m,-500ms,-1h. - Name: up to 200 characters. It becomes the asset's title in Storage.
- Storage: the channel's recording link, or another storage link with write access.
hubfly stream clips create acme-tv --channel sch_main0001 --from -90s --to -0s --name "Winning goal"
hubfly stream clips create acme-tv --channel sch_main0001 \
--from 2026-11-02T18:42:10Z --to 2026-11-02T18:43:00Z --name "Opening" --storage-link ssl_vod00001With the API, POST …/stream/clips/create takes {channelId, from, to, name, storageLinkId} and returns {clipId} (sclp_…). In a POST …/stream/control request, the same work is the clip.create op. Schedules cannot cut clips.
STREAM_NOT_LIVE
409 STREAM_NOT_LIVE. Turn on DVR before the moment you want to clip.List and delete
hubfly stream recordings acme-tv --channel sch_main0001
hubfly stream recordings acme-tv --kind clip
hubfly stream recordings delete acme-tv <recording> # removes the record only
hubfly stream recordings delete acme-tv <recording> --delete-object # also deletes the file and asset in StorageGET …/stream/recordingslists recordings and clips (filter withkindandchannelId), with their storage link, bucket, object key and Storage asset.- Each part of a recording is its own entry, with an id such as
srec_7h2k9q#1; clips use theirsclp_id. Encode#as%23in a URL. DELETE …/stream/recordings/:recordingId/deleteremoves the record and keeps the file. WithdeleteObject: trueit also deletes the object and its asset in Storage, which needsstorage:writeon the Storage project.
Events
| Event | Data |
|---|---|
recording.started | recording, channel |
recording.completed | recording, channel, storage_link, object_key, part, bytes, duration_ms, started_at, ended_at, register_asset. Sent once per part. |
recording.failed | recording, channel, error |
clip.completed, clip.failed | clip, channel, storage_link, object_key, bytes, duration_ms, name, error? |
Receive them with webhooks, for example to post a new recording to your site. See Recordings and storage in the API reference.