Hubfly spaceDocs
Console

hubfly stream

hubfly stream creates and operates Managed Streams servers: live video and audio servers that take streams in over RTMP, RTMPS, SRT, WHIP and Icecast, transcode them, restream them to other platforms and play them back over WebRTC, LL-HLS and HLS. It covers servers, inputs and stream keys, channels, destinations, mixers, playlists, schedules, recordings, playback keys, webhooks and live control, and it can publish a file or camera from your machine and open a channel in a player. hubfly live is an alias.

Basics

  • <server> is a stream server id or name. When two managed projects use the same name, add --project <id|name>.
  • <input>, <channel>, <destination> and the other resources are ids (such as sin_cam1abcd or sch_main0001) or names.
  • Every server has its own host, such as acme-tv.live.hubfly.app. Encoders send to it and viewers play from it.
  • Hubfly space chooses where stream servers run, so there is no --region flag. You choose a speed instead: the outgoing bandwidth cap in Mbps.
  • Commands that print data accept --json. Stream keys and secrets are masked unless you reveal them; new keys and secrets print once when they are created or rotated.
  • Every create and update also takes --file <spec.json|-> with a full Dashboard API body (camelCase). Flags you pass on top change that body.
  • Run hubfly stream help for the full usage text, and hubfly stream <resource> help for one resource.

terminal

$ hubfly stream create acme-tv --project new
$ hubfly stream channels create acme-tv Main --source input:Main
$ hubfly stream push acme-tv show.mp4 --loop
$ hubfly stream play acme-tv Main

Servers And Speed

usage
hubfly stream list [--project <id|name>] [--json]
hubfly stream info <server> [--json]
hubfly stream create [<name>] [--speed <mbps>] [--processing <mbps>] [--timezone <tz>]
                     [--input <name>|--no-input] [--project <id|name|new>] [--project-name <name>]
                     [--yes] [--no-wait] [--timeout <duration>] [--json]
hubfly stream speed <server> <mbps> [--processing <mbps>] [--yes] [--no-wait] [--json]
hubfly stream delete <server> [--yes] [--wait]
CommandWhat it does
stream listStream servers in your managed projects with status, monthly speed price, project and id.
stream infoStatus, host, speed, processing, WebRTC session cap, time zone and configuration state of one server, its ingest URLs, and a live summary (inputs, channels, viewers, outgoing Mbps) while something is on air.
stream createQuotes the speed price, asks you to confirm, creates the server and waits until it is ready. Speed defaults to 25 Mbps. The server comes with a push input named Main (--input renames it, --no-input skips it), and the command prints that input's stream key once together with the OBS settings. --project new creates a managed project for the server (--project-name names it).
stream speedQuotes the new speed price and changes the speed after you confirm. The change applies live: publishers and viewers stay connected. --processing also changes the reserved transcoding capacity.
stream deleteDeletes the server after you type its name (or pass --yes). Deletion protection must be off. --wait follows the deletion until it finishes.

Speed is billed while the server runs, and the first 25 Mbps of every hour are free, shared by all your running servers; the quote shows both the list price and the price if this is your only running server. Processing (transcoding) and bandwidth are billed by use, and ingest is free. See pricing and limits.

terminal

$ hubfly stream create acme-tv --project new
Stream server: acme-tv
Speed: 25 Mbps, $0.75/month ($0.0010/hour)
$0.00/month if this is your only running server (25 Mbps are free)
Project: new managed project 'acme-tv' (Hubfly space chooses the region)
Bandwidth and processing are billed by use; a stopped server pays nothing for speed.
Create this stream server? (y/N): y
Stream server 'acme-tv' is ready.
ID: msi_acme0001
Host: acme-tv.live.hubfly.app
Input 'Main' (sin_cam1abcd). The stream key is shown only now; reveal it later with:
hubfly stream inputs keys reveal acme-tv sin_cam1abcd
OBS (Settings > Stream, Service: Custom):
Server: rtmps://acme-tv.live.hubfly.app:443/live
Stream key: hfls_cam1abcd_…
Output: H.264 (x264 or hardware), CBR 4,500-6,000 kbps, keyframe interval 2 s,
B-frames 0 for WebRTC playback; audio AAC 160 kbps, 48 kHz
# Raise the bandwidth cap later, live
$ hubfly stream speed acme-tv 100

Lifecycle And Settings

usage
hubfly stream start|stop <server> [--no-wait] [--json]
hubfly stream rename <server> <new-name>
hubfly stream protect <server> on|off
hubfly stream operations <server> [--limit <n>] [--json]
hubfly stream settings <server> [--timezone <tz>] [--offline-slate <graphic>|none]
                       [--origins <a,b>|none] [--webrtc-sessions <n>] [--json]
CommandWhat it does
stream stop, startA stopped server takes no publishers and serves no media, and it costs nothing. Players show it as offline and connect again when you start it.
stream rename, protectChange the display name (the host stays) or turn deletion protection on or off.
stream operationsRecent operations (create, speed changes, start, stop, delete) with their status.
stream settingsWithout flags, shows the settings. --timezone is the IANA time zone used by schedules (such as Africa/Kigali). --offline-slate picks the graphic channels show while nothing is live. --origins limits which websites may embed the server's channels (none allows any). --webrtc-sessions caps concurrent WebRTC viewers; past the cap, players fall back to LL-HLS.

terminal

$ hubfly stream settings acme-tv --timezone Africa/Kigali --offline-slate be-right-back
$ hubfly stream settings acme-tv --origins https://acme.tv,https://www.acme.tv
$ hubfly stream stop acme-tv

Inputs And Stream Keys

usage
hubfly stream inputs [list] <server> [--json]
hubfly stream inputs get <server> <input> [--json]
hubfly stream inputs create <server> <name> [--protocols rtmp,rtmps,srt,whip,icecast] [--backup-key]
                            [--pull <url>] [--pull-transport auto|tcp|udp] [--max-bitrate <kbps>]
                            [--allow <cidr>...] [--srt-passphrase-stdin] [--disabled] [--file <spec.json|->] [--json]
hubfly stream inputs update <server> <input> [--name <name>] [--protocols <list>] [--enable|--disable]
                            [--pull <url>] [--max-bitrate <kbps>] [--allow <cidr>...|--allow none]
                            [--srt-passphrase-stdin] [--file <spec.json|->] [--json]
hubfly stream inputs delete <server> <input> [--yes]
hubfly stream inputs keys reveal <server> <input> [--json]
hubfly stream inputs keys rotate <server> <input> [--role primary|backup] [--remove] [--yes] [--json]

An input is where an encoder sends its stream. A push input has a primary stream key and an optional backup key; a pull input (--pull) fetches an rtmp, rtmps, rtsp, rtsps, srt or https HLS URL instead.

Command or flagMeaning
inputs getConnection details for each protocol the input accepts, with the keys masked.
inputs createPrints the new stream key once, with the OBS settings. --backup-key also creates a backup key for a second encoder.
--protocolsThe protocols the input accepts. Turn on whip for browser publishing and icecast for radio sources.
--max-bitrate, --allowRefuse publishers above a bitrate (1–80,000 kbps), or from outside the listed networks (--allow none clears the list).
--srt-passphrase-stdinReads an SRT encryption passphrase (10–79 characters) from standard input.
inputs keys revealShows the primary and backup keys, the SRT passphrase or the pull URL. It needs stream admin permission.
inputs keys rotateReplaces the primary key (or with --role backup, the backup key, adding one if there was none) after you confirm, and prints the new key once. The encoder using the old key is disconnected. --role backup --remove deletes the backup key.
inputs deleteDisconnects the input's publishers and invalidates its keys. It is refused while a channel, mixer or destination uses the input.
ProtocolEncoder URLWhere the key goes
RTMPS (port 443)rtmps://acme-tv.live.hubfly.app:443/liveStream key field
RTMP (port 1935)rtmp://acme-tv.live.hubfly.app/liveStream key field
SRT (UDP 9000)srt://acme-tv.live.hubfly.app:9000?streamid=publish:<key>streamid
WHIPhttps://acme-tv.live.hubfly.app/whip/<input id>Bearer token
Icecast (port 8000)icecast://source:<key>@acme-tv.live.hubfly.app:8000/radio/<input id>Password

See OBS and encoders for encoder settings and radio for Icecast sources.

terminal

$ hubfly stream inputs create acme-tv studio --protocols rtmps,srt --backup-key
$ hubfly stream inputs create acme-tv lobby-cam --pull rtsp://cam.example.com/stream1 --pull-transport tcp
$ hubfly stream inputs keys rotate acme-tv studio

Channels And Playback

usage
hubfly stream channels [list] <server> [--json]
hubfly stream channels get <server> <channel> [--json]
hubfly stream channels create <server> <name> --source input:<id|name>|mixer:<id|name>|playlist:<id|name>
                              [--backup <source>] [--latency standard|low|ultra] [--access public|token]
                              [--allowed-origins <a,b>|none] [--dvr <minutes>] [--max-viewers <n>]
                              [--no-webrtc] [--no-ll-hls] [--disabled] [--file <spec.json|->] [--json]
hubfly stream channels update <server> <channel> [same flags] [--name <name>] [--backup none]
                              [--webrtc[=false]] [--ll-hls[=false]] [--hls[=false]] [--enable|--disable]
hubfly stream channels delete <server> <channel> [--yes]
hubfly stream channels playback <server> <channel> [--json]
hubfly stream channels token <server> <channel> [--ttl 1h] [--sub <viewer>] [--ip <cidr>] [--json]

A channel is what viewers watch. It plays an input, a mixer or a playlist, and can fall back to a backup source when its source goes silent.

Flag or commandMeaning
--source, --backupWhat the channel plays, as input:, mixer: or playlist: followed by an id or name. --backup none removes the backup.
--latencystandard, low or ultra.
--accesspublic, or token to require a signed playback token.
--allowed-originsWebsites allowed to embed this channel.
--dvrMinutes viewers can rewind (0–360). Clips are cut from the DVR.
--max-viewersCap on concurrent viewers.
--no-webrtc, --no-ll-hlsTurn off WebRTC (WHEP) or low-latency HLS output. On update use --webrtc=false, --ll-hls=false or --hls=false, and =true to turn them back on.
channels playbackThe channel's HLS, WebRTC (WHEP), embed, thumbnail and status URLs, any pull and audio outputs, and ready-to-paste embed code.
channels tokenA test playback token for a token channel, signed by the server's newest active playback key. --ttl is 60 seconds to 24 hours (1 hour by default); --sub labels the viewer and --ip binds the token to a network. The token goes to standard output and its expiry to standard error.
OutputURL
HLS and LL-HLShttps://acme-tv.live.hubfly.app/hls/<channel>/index.m3u8
WebRTC (WHEP)https://acme-tv.live.hubfly.app/whep/<channel>
Embed pagehttps://acme-tv.live.hubfly.app/embed/<channel>
Statushttps://acme-tv.live.hubfly.app/status/<channel>.json
Thumbnailhttps://acme-tv.live.hubfly.app/thumb/<channel>.jpg

Token channels take the token as ?token= on these URLs. To build a player into your site, use @hubfly/streams.

terminal

$ hubfly stream channels create acme-tv Main --source input:Main --backup playlist:loop --dvr 60
$ hubfly stream channels update acme-tv Main --access token
$ hubfly stream channels playback acme-tv Main
$ hubfly stream channels token acme-tv Main --ttl 10m --sub qa-team

Destinations

usage
hubfly stream destinations [list] <server> [--json]
hubfly stream destinations get <server> <destination> [--json]
hubfly stream destinations create <server> <name> --platform youtube|twitch|facebook|kick|x|linkedin|custom
                                  --source channel:<id|name>|input:<id|name> --stream-key-stdin [--url <url>]
                                  [--protocol rtmp|rtmps|srt] [--rendition <name>] [--auto-start[=false]]
                                  [--srt-passphrase-stdin] [--disabled] [--file <spec.json|->] [--json]
hubfly stream destinations update <server> <destination> [--name <name>] [--source <source>] [--url <url>]
                                  [--protocol rtmp|rtmps|srt] [--rendition <name>] [--auto-start[=false]]
                                  [--stream-key-stdin] [--enable|--disable] [--file <spec.json|->] [--json]
hubfly stream destinations start|stop <server> <destination> [--json]
hubfly stream destinations delete <server> <destination> [--yes]
  • A destination restreams a channel or an input to another platform. Platform presets fill in the ingest URL; custom and linkedin need --url. You cannot change the platform of an existing destination.
  • The platform's stream key is read from standard input with --stream-key-stdin; there is no flag that takes it as an argument, so it never appears in your shell history or process list. Hubfly space shows only a hint of it afterwards.
  • --auto-start starts the push whenever the source goes live. destinations start and stop turn it on and off by hand.
  • --rendition sends one rendition of a transcoded channel instead of the source quality.

See restreaming.

terminal

# Paste the key from YouTube Studio at the prompt
$ hubfly stream destinations create acme-tv youtube --platform youtube --source channel:Main --stream-key-stdin --auto-start
# From a password manager, without the key touching the screen
$ op read op://acme/twitch/stream-key | hubfly stream destinations create acme-tv twitch --platform twitch --source channel:Main --stream-key-stdin
$ hubfly stream destinations start acme-tv twitch

Mixers, Playlists And Schedules

usage
hubfly stream mixers [list|get|delete] <server> ...
hubfly stream mixers create <server> <name> [--preset vertical|1080p30|1080p60|720p30] [--disabled] [--file <spec.json|->]
hubfly stream mixers update <server> <mixer> [--name <name>] [--enable|--disable] [--default-scene <scene>]
                            [--transition cut|fade:<duration>] [--file <spec.json|->]
hubfly stream scene list <server> <mixer> [--json]
hubfly stream scene switch <server> <mixer> <scene> [--fade <duration>|--cut] [--json]

hubfly stream playlists [list|get|delete] <server> ...
hubfly stream playlists create <server> <name> --item <url|asset:<link>:<asset id>|object:<link>:<key>>...
                               [--loop] [--shuffle] [--encoding auto|reencode] [--file <spec.json|->]
hubfly stream playlists update <server> <playlist> [--name <name>] [--item …]... [--loop[=false]]
                               [--shuffle[=false]] [--encoding auto|reencode] [--file <spec.json|->]

hubfly stream schedules [list|get|delete] <server> ...
hubfly stream schedules create <server> <name> --start <local time> --duration <minutes> [--rrule <rule>]
                               [--timezone <tz>] [--on-start '<op json>']... [--on-end '<op json>']...
                               [--disabled] [--file <spec.json|->]
hubfly stream schedules update <server> <schedule> [same flags] [--rrule none] [--enable|--disable]
hubfly stream schedules preview <server> --start <time> --duration <minutes> [--rrule <rule>] [--timezone <tz>] [--json]
hubfly stream schedules runs <server> <schedule> [--limit <n>] [--before <cursor>] [--json]
ResourceWhat it is
MixerA canvas that composes inputs, graphics and text into scenes, like a studio switcher. Flags cover the canvas preset, the default scene and the transition (cut, or fade:500ms up to 10 seconds). Scenes and their layers are defined in the --file body. Mixers re-encode, so they use processing.
Scene switchscene switch changes a mixer's live scene, by scene id or name, with a fade (500 ms when you give no duration) or a hard cut. scene list shows the scenes and which is the default.
PlaylistFiles played as a live source: http(s) URLs (HLS when the URL contains .m3u8), assets of a storage link (asset:<link>:<asset id>) or objects in its bucket (object:<link>:<key>). Repeat --item to add several. --encoding reencode forces transcoding of mixed files.
ScheduleRuns control operations at a time: --on-start operations at --start (a local time such as 2026-11-02T18:00 in the schedule's time zone, the server's by default) and --on-end operations after --duration minutes (up to 7 days). --rrule repeats it with an RFC 5545 rule such as FREQ=WEEKLY;BYDAY=MO. schedules get lists the next starts, preview computes them without saving, and runs shows past runs.

A --file body uses the Dashboard API field names in camelCase, the same as the API reference. Use - to read it from standard input, and get --json to start from an existing resource. See studio and graphics and playlists and schedules.

mixer.json
{
  "name": "Show",
  "preset": "1080p30",
  "sources": [
    { "id": "cam", "type": "input", "ref": "sin_cam1abcd" },
    { "id": "logo", "type": "image", "ref": "sgr_logo0001" }
  ],
  "scenes": [
    {
      "id": "main",
      "name": "Main",
      "layers": [
        { "source": "cam", "x": 0, "y": 0, "w": 1920, "h": 1080,
          "crop": { "l": 0, "t": 0, "r": 0, "b": 0 }, "z": 0, "opacity": 1, "visible": true },
        { "source": "logo", "x": 40, "y": 40, "w": 160, "h": 160,
          "crop": { "l": 0, "t": 0, "r": 0, "b": 0 }, "z": 1, "opacity": 0.9, "visible": true }
      ],
      "audio": [{ "source": "cam", "gainDb": 0, "muted": false }]
    }
  ],
  "defaultScene": "main"
}

terminal

$ hubfly stream mixers create acme-tv --file mixer.json
$ hubfly stream scene switch acme-tv Show Interview --fade 800ms
$ hubfly stream playlists create acme-tv loop --item https://cdn.example.com/intro.mp4 --item object:media:shows/ep1.mp4 --loop
$ hubfly stream schedules create acme-tv weekly-show --start 2026-11-02T18:00 --duration 90 --rrule 'FREQ=WEEKLY;BYDAY=MO' \
--on-start '{"op":"channel.start","channel":"sch_main0001"}' --on-end '{"op":"channel.stop","channel":"sch_main0001"}'
$ hubfly stream schedules preview acme-tv --start 2026-11-02T18:00 --duration 90 --rrule 'FREQ=WEEKLY;BYDAY=MO'

Recordings And Clips

usage
hubfly stream recordings [list] <server> [--kind recording|clip] [--channel <channel>] [--limit <n>] [--cursor <c>] [--json]
hubfly stream recordings delete <server> <recording> [--delete-object] [--yes]
hubfly stream clips [list] <server> [--channel <channel>] [--json]
hubfly stream clips create <server> --channel <channel> --from <time|-90s> --to <time|-0s> --name <name>
                           [--storage-link <link>] [--json]
hubfly stream clips delete <server> <clip> [--delete-object] [--yes]
  • Recordings are written to an Object Storage bucket through a storage link. Start and stop them with stream control --record-start and --record-stop, or from a schedule.
  • clips create cuts a clip from the channel's DVR, so the channel needs --dvr minutes. --from and --to are RFC 3339 times or offsets from now such as -90s.
  • delete removes the entry; --delete-object also deletes the file from the bucket.

See recording and clips.

terminal

$ hubfly stream clips create acme-tv --channel Main --from -90s --to -0s --name goal-73min
$ hubfly stream recordings acme-tv --channel Main --kind recording

Playback Keys And Bindings

usage
hubfly stream playback-keys [list] <server> [--json]
hubfly stream playback-keys create <server> <name> [--json]          (the secret prints once)
hubfly stream playback-keys rotate <server> <key> [--yes] [--json]   (new secret once; the old key retires in 24 h)
hubfly stream playback-keys delete <server> <key> [--yes]
hubfly stream bindings [list] <server> [--json]
hubfly stream bindings create <server> --to <project> [--playback-key <key>] [--channel <channel>]
                              [--client-prefix none|NEXT_PUBLIC_|VITE_|PUBLIC_] [--json]
hubfly stream bindings delete <server> <binding> [--remove-variables] [--yes]
  • Channels with --access token play only with a token signed by one of the server's playback keys. Your backend signs a short-lived token per viewer with signPlaybackToken, after checking its own session.
  • playback-keys create prints the key's secret once. rotate prints a new secret once and keeps the old key working for 24 hours so you can redeploy. delete invalidates every token signed with the key at once.
  • bindings create writes HUBFLY_STREAM_URL, HUBFLY_STREAM_PLAYBACK_KEY_ID and HUBFLY_STREAM_PLAYBACK_KEY_SECRET (a secret variable) into a Cell project; --client-prefix adds browser copies of the public values, never of the secret. Redeploy the project to load them. bindings delete --remove-variables also removes the variables.

See playback security.

terminal

$ hubfly stream playback-keys create acme-tv web
$ hubfly stream bindings create acme-tv --to web --playback-key web --channel Main --client-prefix NEXT_PUBLIC_

Webhooks

usage
hubfly stream webhooks [list] <server> [--json]
hubfly stream webhooks create <server> --url <https-url> [--events channel.live,input.connected] [--disabled] [--json]
hubfly stream webhooks update <server> <webhook> [--url <url>] [--events <a,b>|all] [--enable|--disable] [--json]
hubfly stream webhooks test <server> <webhook> [--json]
hubfly stream webhooks deliveries <server> <webhook> [--limit <n>] [--after <cursor>] [--json]
hubfly stream webhooks delete <server> <webhook> [--yes]
  • Webhook URLs must use https://. Without --events a webhook receives every event; --events all resets a filter.
  • Events: input.connected, input.disconnected, input.failover, channel.live, channel.offline, destination.connected, destination.failed, destination.stopped, recording.started, recording.completed, recording.failed, clip.completed, clip.failed, schedule.fired, schedule.missed, schedule.failed, processing.rejected, speed.throttled, billing.blocked, billing.unblocked and playlist.item.
  • create prints the webhook's whsec_ signing secret once. Verify the Hubfly space-Signature header of every delivery with it (verifyWebhook).
  • test sends a test delivery and prints the response; deliveries lists recent attempts and their status.

See webhooks.

terminal

$ hubfly stream webhooks create acme-tv --url https://api.acme.tv/hooks/stream --events channel.live,channel.offline,recording.completed
$ hubfly stream webhooks deliveries acme-tv swh_live0001 --limit 50

Graphics, Storage And Domains

usage
hubfly stream graphics [list|get|delete] <server> ...
hubfly stream graphics upload <server> <file> [--name <name>] [--kind image|svg|html|font] [--content-type <type>] [--json]
hubfly stream graphics update <server> <graphic> [--name <name>] [--var <key>=<value>]... [--json]
hubfly stream storage-links [list] <server> [--json]
hubfly stream storage-links create <server> --storage-project <id|name> --bucket <bucket> [--mode read|write|read_write] [--json]
hubfly stream storage-links assets <server> <link> [--search <text>] [--hls-ready] [--json]
hubfly stream storage-links delete <server> <link> [--yes]
hubfly stream domains [list] <server> [--json]
hubfly stream domains create <server> <hostname> [--purpose both|playback|ingest] [--json]
hubfly stream domains verify <server> <domain> [--json]
hubfly stream domains delete <server> <domain> [--yes]
CommandWhat it does
graphics uploadUploads an image (PNG, JPEG, GIF, WebP), SVG, HTML template or font of up to 5 MiB for mixers and slates. The kind and content type come from the file extension unless you set them; the name defaults to the file name.
graphics update --varSets template variables of an HTML or SVG graphic, such as a lower-third name. --var key= removes one. To change them live during a show, use the graphics.set control operation.
storage-links createLinks a bucket of one of your Object Storage projects for recordings, clips, playlists and graphics (read_write by default). assets lists the files in it; --hls-ready shows only assets already encoded for streaming. Deleting a link revokes its access key, and recordings, playlists and graphics that use it stop working.
domains createAdds a custom hostname for playback, ingest or both and prints the CNAME record to add (pointing at the server's *.live.hubfly.app host). Run domains verify once the record is in place.

See custom domains.

terminal

$ hubfly stream graphics upload acme-tv ./lower-third.html --name lower-third
$ hubfly stream graphics update acme-tv lower-third --var name='Ada Lovelace' --var title=Guest
$ hubfly stream storage-links create acme-tv --storage-project media --bucket recordings
$ hubfly stream domains create acme-tv live.acme.tv --purpose playback

Live Control

usage
hubfly stream control <server> [--go-live <channel>]... [--stop <channel>]...
                      [--destination-start <destination>]... [--destination-stop <destination>]...
                      [--record-start <channel>]... [--record-stop <channel>]...
                      [--slate <channel>=on|off]... [--disconnect <input>[:primary|backup]]...
                      [--op '<json>']... [--json]

stream control sends one or more operations to the server in a single request and prints one line per operation, ok or failed with the reason. The command fails when any operation fails. Every shorthand flag can be repeated or given a comma-separated list, and takes ids or names.

FlagOperation
--go-live, --stopchannel.start, channel.stop: put a channel on air, or take it off air (viewers see the offline slate).
--destination-start, --destination-stopdestination.start, destination.stop: start or stop a restream.
--record-start, --record-stoprecording.start, recording.stop: record a channel to its storage link.
--slate <channel>=on|offchannel.slate: cut a channel to its slate and back.
--disconnect <input>[:role]input.disconnect: disconnect an input's publisher, or only its primary or backup.
--op '<json>'Any operation as a JSON object, or an array of them, with resource ids and camelCase fields: mixer.scene, mixer.layer, mixer.audio, mixer.text, graphics.set, channel.source, clip.create, playlist.play, playlist.next and the operations above.

terminal

$ hubfly stream control acme-tv --go-live Main --destination-start youtube,twitch --record-start Main
ok channel.start sch_main0001
ok destination.start sds_yt000001
ok destination.start sds_tw000001
ok recording.start sch_main0001
$ hubfly stream control acme-tv --op '{"op":"graphics.set","graphic":"sgr_lower001","variables":{"name":"Ada Lovelace"}}'
$ hubfly stream control acme-tv --slate Main=on

Live State, Usage And Events

usage
hubfly stream live <server> [--json]
hubfly stream usage <server> [--month YYYY-MM] [--json]
hubfly stream events <server> [--after <cursor>] [--limit <n>] [--json]
hubfly stream stats <server> [--from <time>] [--to <time>] [--channel <channel>] [--json]
CommandWhat it does
stream liveThe state of the server and of every input, channel, destination and mixer right now: who is publishing, what each channel plays, viewers, outgoing Mbps against the speed, and whether the server is throttled at its speed cap or paused by billing.
stream usageSpeed and processing Mbps-hours, bandwidth in GB, the free allowance used, the cost so far and an estimate for the month (the current month by default).
stream eventsServer events, oldest first, 50 at a time by default. When there are more, it prints the --after cursor for the next page. Events are kept for 7 days.
stream statsViewers, viewer minutes and egress per minute, for one channel or all, between two RFC 3339 times.

terminal

$ hubfly stream live acme-tv
$ hubfly stream usage acme-tv --month 2026-10
$ hubfly stream stats acme-tv --channel Main --from 2026-11-02T18:00:00Z --to 2026-11-02T20:00:00Z

Tail The Studio Socket

usage
hubfly stream tail <server> [--meters] [--watch in:<input>,ch:<channel>,mx:<mixer>] [--json]
  • stream tail connects to the server's studio socket, the live feed the Dashboard studio uses, and prints events as they happen and every change of state: the server, and each input, channel, destination and mixer. Press Ctrl-C to stop. It reconnects on its own with a fresh token.
  • --meters adds audio levels (RMS and peak in dBFS, at most once per second per source) for every input and channel, up to 16 sources. --watch chooses the sources instead: in: inputs, ch: channels and mx: mixers, by id or name.
  • With --json it prints one JSON object per line. Secrets are masked in every frame.

terminal

$ hubfly stream tail acme-tv
$ hubfly stream tail acme-tv --watch in:studio,ch:Main
$ hubfly stream tail acme-tv --json | jq 'select(.type == "event")'

Push From Your Machine

usage
hubfly stream push <server> <file|device[:<spec>]> [--input <input>] [--protocol srt|rtmps] [--loop]
                   [--key-stdin] [--role primary|backup] [--bitrate <kbps>] [--ffmpeg <path>] [--dry-run]

stream push publishes a video file or a capture device to an input with your local ffmpeg, which is handy to test a channel without an encoder. ffmpeg only encodes and writes the stream to its standard output; the CLI carries those bytes to the server itself over SRT (default) or RTMPS. The stream key therefore never appears in ffmpeg's arguments, environment or logs, nor in any process listing.

FlagMeaning
<file|device>A file path or URL, or device for the default camera (/dev/video0 on Linux, AVFoundation 0:0 on macOS). device:<spec> picks another one; Windows needs a DirectShow name such as device:video="Integrated Camera":audio="Microphone". A silent audio track is added when the device has no audio.
--inputThe input to publish to. You can leave it out when the server has one push input.
--protocolsrt (default) or rtmps. The input must accept it.
--loopRepeat a file until you press Ctrl-C.
--key-stdinRead the stream key (and, for an SRT input that has one, the passphrase) from standard input. Without it, the CLI reveals the input's key with your account, which needs stream admin permission.
--rolePublish with the primary (default) or backup key.
--bitrateVideo bitrate, 300–80,000 kbps (4,500 by default). Audio is AAC 160 kbps.
--ffmpeg, --dry-runUse another ffmpeg binary, or print the ffmpeg command and where the stream would go without sending anything.

If ffmpeg is missing, the command explains how to install it on your system (for example brew install ffmpeg or winget install Gyan.FFmpeg).

terminal

$ hubfly stream push acme-tv show.mp4 --loop
$ hubfly stream push acme-tv device --input studio --protocol rtmps
$ pbpaste | hubfly stream push acme-tv show.mp4 --input studio --key-stdin
$ hubfly stream push acme-tv show.mp4 --dry-run

Play A Channel

usage
hubfly stream play <server> <channel> [--url-only] [--ttl <duration>] [--player mpv|ffplay] [--json]
  • stream play opens the channel's HLS output in mpv, or ffplay when mpv is not installed (--player chooses one). Low-latency HLS can take a few seconds to start.
  • For a token channel it adds a test token to the URL, valid for --ttl (60 seconds to 24 hours, 1 hour by default).
  • --url-only prints the (signed) URL instead, to open in any HLS player such as Safari or VLC; --json also includes when the token expires.

terminal

$ hubfly stream play acme-tv Main
$ hubfly stream play acme-tv Main --url-only --ttl 15m

Scripting And Secrets

  • JSON output. With --json, standard output carries only JSON; quotes, prompts and progress go to standard error.
  • Confirmations. Creating a server, changing its speed, deleting, and rotating stream or playback keys ask first. Without a terminal they stop and ask you to re-run with --yes; pass it once you have reviewed the change.
  • Secrets. Stream keys, playback key secrets and webhook secrets print once when they are created or rotated; afterwards only inputs keys reveal shows stream keys again. Platform stream keys (--stream-key-stdin), SRT passphrases and the key for push --key-stdin are read from standard input and never taken as arguments. Other output, including events and tail, masks secrets.
  • Waiting. Creating, changing the speed, starting and stopping show progress and wait; --no-wait returns as soon as Hubfly space has accepted the request. Follow it later with hubfly stream operations.
  • Exit codes. Non-zero on failure, with distinct codes for usage errors, authentication, conflicts and timeouts. See exit codes.

Keep stream keys out of code and logs

A stream key lets anyone publish to your input. Give it only to the encoder or the person going live, keep it out of source control and frontend code, and rotate it with hubfly stream inputs keys rotate if it leaks. Viewers never need it: they need only the playback URLs, plus a token for token channels.

From code

To manage servers from your own code, use client.managed.streams in the Hubfly space SDK; for players, publishing and playback tokens, use @hubfly/streams. Start with the get started guide.
Something unclear or out of date? Emailsupport@hubfly.spaceBack to top