Repository navigation
Broadcasting
Outpace can publish your own MPEG-TS feed as a new signed AceStream live swarm. You feed it media, and it cuts the feed into pieces, signs them with a per-broadcast key, announces the swarm and serves it to peers and local players.
Only broadcast content you have the right to distribute. The output is a public, unencrypted swarm.
- A broadcast has a name (1–64 ASCII letters, digits,
.,_or-; not.or..). The name is local. It is how you refer to the broadcast in URLs and settings. - The first use of a name creates a signing identity: a key, a transport descriptor, a
content id and an infohash. These are saved in
<data dir>/broadcasts/and reused when you restart. - A broadcast takes media from one producer at a time: raw HTTP, RTMP, an HTTP pull source
or SRT. A second producer gets
409 producer_conflict. Different names can run side by side. - Producers can take turns on the same name. The identity stays and piece numbering carries on.
Either run a dedicated broadcast process:
outpace broadcast my-channel --public-host stream.example.comIt creates or resumes the broadcast, prints its ingest URLs and acestream:// link to standard
error, and then runs the normal server. --public-host sets the host name used in those
printed URLs. This command always turns inbound peer serving on, and it refuses to run in
private peer mode.
Or run outpace serve and simply start pushing to a name: the first producer creates the
broadcast.
The node must be reachable by peers for others to watch. Publish and forward TCP 8621; see NAT and Port Mapping.
The input must be MPEG-TS (or RTMP, which Outpace muxes into TS), preferably with H.264 or HEVC video and AAC audio.
# from a file
curl -T movie.ts http://127.0.0.1:6878/broadcast/my-channel
# live from FFmpeg
ffmpeg -re -i input.mp4 -c copy -f mpegts - | curl -T - http://127.0.0.1:6878/broadcast/my-channelThe PUT returns 200 straight away with name, content_id and infohash, while Outpace
keeps reading the body. When the upload ends, the buffered final piece is signed and published.
rtmp://127.0.0.1:1935/live/my-channel
ffmpeg -re -i input.mp4 -c:v libx264 -c:a aac -f flv rtmp://127.0.0.1:1935/live/my-channelIn OBS, use rtmp://<host>:1935/live as the server and my-channel as the stream key. The key
must be exactly the broadcast name. RTMP listens on 127.0.0.1:1935 by default
(OUTPACE_RTMP_BIND). It has no authentication, so expose it only on trusted networks.
Outpace can pull a continuous HTTP(S) MPEG-TS stream and broadcast it, reconnecting on its own when it drops.
Attach one through the API:
curl -X PUT http://127.0.0.1:6878/broadcast/my-channel/source \
-H 'Content-Type: application/json' \
--data '{"url":"https://source.example.com/live.ts"}'
curl http://127.0.0.1:6878/broadcast/my-channel/source
curl -X DELETE http://127.0.0.1:6878/broadcast/my-channel/sourceOr declare sources at startup, so they reattach on every restart:
export OUTPACE_BROADCAST_SOURCES='{"my-channel":{"url":"https://source.example.com/live.ts"}}'
outpace serveThe provided Compose file reads OUTPACE_BROADCAST_SOURCES from .env.
| Field | Default | Range |
|---|---|---|
url |
required |
http:// or https://, at most 8192 bytes, no credentials or fragment |
connect_timeout_secs |
5 | 1–60 |
read_timeout_secs |
15 | 1–300 |
reconnect_initial_secs |
1 | 1–300 |
reconnect_max_secs |
30 | 1–300, at least the initial value |
Things to know:
-
202means accepted, not healthy. CheckGET /broadcast/<name>/sourcefor the actual state:connecting,streaming,backoff,blocked,failedorstopping. You'll also seeattempts,last_errorandretry_in_ms. - Reconnection: retries back off exponentially from the initial delay to the maximum. The backoff resets after 30 seconds of successful streaming. When the source ends, it is treated as a live drop and Outpace reconnects.
-
Address policy: sources on private or loopback addresses are refused unless you set
OUTPACE_ALLOW_NON_GLOBAL_BROADCAST_SOURCE=1. That switch adds private, loopback and CGNAT IPv4 and ULA and loopback IPv6. It never allows link-local or cloud-metadata addresses. Redirects are rejected and proxies are ignored. -
Secrets: source URLs (and tokens in them) never appear in status, logs or saved state.
The environment variable still contains them, so protect your
.envand don't sharedocker compose configoutput. -
Detaching vs deleting:
DELETE .../sourcestops pulling but keeps the identity. Detach before changing a source's URL or timings. API attachments are forgotten on restart. Startup declarations come back on restart even if you detached them, so remove them from the environment to stop them for good.
Only in special builds. SRT isn't in any release binary or published image. Build from a release tag such as
v1.5.1, on native Linux with--features srtand libsrt 1.5.7 or newer; see Installation.
SRT gives you an encrypted input over UDP, useful for publishing from a remote encoder.
install -d -m 700 ~/.config/outpace
(umask 077; openssl rand -hex 24 > ~/.config/outpace/srt.key)
OUTPACE_SRT_BIND=127.0.0.1:9000 \
OUTPACE_SRT_PASSPHRASE_FILE="$HOME/.config/outpace/srt.key" \
outpace serve| Setting | Default | Notes |
|---|---|---|
OUTPACE_SRT_BIND |
unset (off) | Numeric UDP address. Setting it in a non-SRT build fails startup. |
OUTPACE_SRT_PASSPHRASE_FILE |
none (required) | Passphrase of 10–79 bytes, without NUL or line breaks (one trailing newline is fine). The file must be a regular file (not a symlink), owned by the daemon user, with no group or other access. It is read once, so restart to change the key. |
OUTPACE_SRT_LATENCY_MS |
120 |
20–2000. SRT receive latency, not an end-to-end guarantee. |
OUTPACE_SRT_MAX_CONNECTIONS |
4 |
1–16, counting connections that are still opening or closing. |
Publish in caller mode, with the broadcast name as the streamid:
ffmpeg -re -i input.mp4 -c:v libx264 -c:a aac -f mpegts \
"srt://127.0.0.1:9000?mode=caller&streamid=my-channel&passphrase=$(cat ~/.config/outpace/srt.key)&pkt_size=1316"Security notes:
- Encryption is mandatory; there is no plaintext fallback. The sender picks AES-128, -192 or -256.
- The passphrase admits a publisher to any broadcast name. The
streamidisn't a credential. - Encryption protects only the leg from the publisher into Outpace. The broadcast itself is still public and unencrypted.
- The passphrase ends up in the publisher's process arguments, so publish from a trusted host.
- Bind to loopback or a firewalled interface. Unauthenticated UDP still costs some work before it is rejected, so rate-limit or allowlist publishers at the network edge.
- Outpace never maps or advertises the SRT port.
- A disconnect is a live break, not end of file. The partial last piece is discarded, and reconnecting continues the same identity.
OUTPACE_BROADCAST_OPTIONS sets per-name descriptor metadata. It applies to every producer type
and to the broadcast command. Supported fields are listed below. Metatracker/startup-node
settings and tags/logo/description (#269) are explicitly deferred pending complete
wire and runtime evidence; arbitrary metadata is not accepted. See
Releases and Versions.
export OUTPACE_BROADCAST_OPTIONS='{"my-channel":{"title":"My Channel","bitrate_bytes_per_sec":500000,"piece_length":131072,"quality":"HD","categories":["other"]}}'
outpace broadcast my-channelWith Compose, forward it through compose.override.yml; see
Deployment.
| Field | Values | Default when omitted |
|---|---|---|
title |
1–256 bytes of text | The broadcast name |
bitrate_bytes_per_sec |
positive integer, in bytes per second | 8375 |
piece_length |
power of two, 65536–1048576 | 65536 |
quality |
auto, SD or HD
|
auto |
categories |
up to 32 distinct labels of 1–128 bytes | ["other"] |
register |
true or false (from v1.5.0) |
false |
key_name |
true or false (from v1.5.0) |
false |
key_label |
a key name label, or null/"" for none (from v1.5.0); implies key_name
|
The broadcast name in lowercase |
Unknown fields, wrong types and out-of-range values stop startup with
invalid_broadcast_options.
key_name and key_label give the broadcast a key name. Like register, they
aren't part of the descriptor. Two profiles can't use the same label.
register: true opts the broadcast into catalog
registration. Unlike the other fields it isn't part
of the descriptor: it applies to new and existing broadcasts alike, it is saved with the
identity, and setting it back to false or removing it doesn't clear it. In private peer mode
the key is ignored and nothing is saved, so leaving private mode later needs a fresh opt-in.
Profiles apply when an identity is created. For an existing broadcast, any field you set
explicitly (other than register) must match what was stored, or the broadcast fails with
broadcast_options_conflict. To change a broadcast's metadata or trackers, use a new name, or
DELETE the broadcast and recreate it. That gives it a new identity and content id.
OUTPACE_SEED_STORE_BYTES must hold at least one full piece. With the default 128 MiB that is
never a problem; with tiny budgets, startup fails with broadcast_store_too_small.
OUTPACE_TRACKERS (comma-separated tracker URLs) replaces the default tracker for new
broadcasts. Outpace announces itself only to udp:// trackers. To announce to a tracker on a
private address, also set OUTPACE_TRACKER_ALLOW_NON_GLOBAL=1.
The same variable also matters on the receiving side. When another Outpace daemon or
outpace play looks up a broadcast's content id through the peer-metadata fallback, it asks
the built-in public tracker plus the udp:// entries of its own OUTPACE_TRACKERS, and the
public DHT alongside. The built-in tracker counts toward the 64-tracker limit, so if the
combined list is longer, the last entries are left out. If your broadcaster uses custom trackers only, set the same
OUTPACE_TRACKERS on the receivers (and OUTPACE_TRACKER_ALLOW_NON_GLOBAL=1 for a private
address), or they can only meet the broadcaster on the DHT. The DHT is not used while an
outbound proxy is active.
Bootstrap peers take precedence: when a receiver has OUTPACE_ACE_PEERS (or outpace play --peer) set, the lookup asks only those peers and skips trackers and the DHT. In
private peer mode it asks only the allowed peers.
By default a broadcast's acestream:// link is the hash of its own descriptor. Stock AceStream
clients can't resolve it, because they look content ids up in the AceStream catalog and the
broadcast isn't there.
Registering a broadcast with the catalog, as the original engine does when you ask it for a
content id, gives it a catalog acestream:// link that stock clients can play. You can choose
which broadcasts to register:
-
One broadcast (from v1.5.0): run
outpace broadcast <name> --register, callPOST /broadcast/<name>/registeron a running daemon, or set"register": truein the name's profile. -
Every public broadcast (from v1.3.0): set
OUTPACE_BROADCAST_CATALOG_REGISTER=1.
outpace broadcast my-channel --register
# later in the log:
# [broadcast] my-channel: catalog content id 0123456789abcdef0123456789abcdef01234567
curl -X POST http://127.0.0.1:6878/broadcast/my-channel/register
# 202 {"name":"my-channel","catalog_content_id":null} while registering
# 200 {"name":"my-channel","catalog_content_id":"0123456789abcdef0123456789abcdef01234567"} once known- A per-broadcast choice is saved with the broadcast's identity and kept on every later
run, including runs without
--register. Registration can't be withdrawn, so the only way to clear the choice is toDELETEthe broadcast, which also discards its identity. -
POST /broadcast/<name>/registersaves the choice and answers at once. If the broadcast is announcing, registration starts now; otherwise it starts when the broadcast starts announcing, exactly as with--register. It returns200withcatalog_content_idwhen the id is already known, and otherwise202withcatalog_content_id: null. Repeating it is safe and never starts a second registration. It returns404 broadcast_not_foundwhen the broadcast doesn't exist (it never creates one), and422 catalog_disabled_in_private_modein private peer mode. A cross-site browser request (anOriginthat doesn't match theHost) gets403 cross_origin. - Registration only runs while the broadcast is announcing. It asks the catalog whether the descriptor is already known and uploads it if not. The catalog assigns the content id; it is a different value from the descriptor hash printed at startup.
- Failures are logged and retried with backoff from 30 seconds up to 30 minutes.
- The catalog id is saved next to the identity once known, so a restart reuses it without
asking the catalog again, and
outpace broadcastprints it first. The same descriptor always gets the same catalog id. Deleting a broadcast creates a new identity and therefore a new catalog id. - The raw-HTTP
PUTresponse includescatalog_content_id, which isnulluntil registration has succeeded. - This publishes the descriptor to the AceStream catalog operator, including its trackers and public key, and makes the broadcast discoverable by its catalog id. There is no unregister call. It is off by default and never runs in private peer mode, whatever a broadcast has saved.
(from v1.5.0) A key name is a stream name your daemon owns and nobody can delist:
key:<public key>/<label>
key:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef/my-channel
The public key belongs to an ed25519 key kept in the data directory, so the name stays the same when the daemon restarts, and also when the broadcast is deleted and recreated with a new descriptor (and a new content id and infohash). Viewers keep the same name; there is no catalog and no resolver to trust. The name is checked end to end: whoever answers a lookup, the answer must carry your signature. See the open resolver protocol for the format.
Turn it on for one broadcast with outpace broadcast <name> --key-name (optionally
--key-label <label>), or with "key_name": true or "key_label": "…" in its
profile. OUTPACE_BROADCAST_KEY_NAMES=1 gives every broadcast one. It is
off by default.
-
The key. The seed is created on first use as
key-name.ed25519in the data directory (OUTPACE_DATA_DIR, see Storage and cache) as 64 hex digits. On Linux and macOS it is created0600, and Outpace refuses to start if anyone else can read it. On Windows it takes the data directory's permissions, whichoutpace service installmakes private. Back it up: whoever holds it can publish under your names, and losing it loses the names. One key serves every broadcast of the daemon; each broadcast uses its own label. -
The label is 1–64 lowercase letters, digits,
.,_or-, starting with a letter or digit. It defaults to the broadcast name in lowercase. A broadcast name that isn't a valid label (one starting with_, say) needs an explicitkey_label. An empty label (nullor"", or--key-label "") gives the barekey:<public key>. Two broadcasts never share a label: a label is taken when its broadcast is created and freed when it is deleted. An explicitkey_labelalways wins over a default one, whichever broadcast came first. Creating a broadcast whose label is taken fails with409 key_label_in_use; two configured profiles whose default labels clash (Fooandfoo) stop startup. A saved broadcast whose label is taken still resumes, without a key name. -
Publishing. While the broadcast is announcing, Outpace signs a pointer to its current
descriptor and stores it in the BitTorrent DHT (BEP 44),
then stores it again every 45 minutes, because DHT nodes drop items after about two hours.
Each pointer is valid for 2 days and is re-signed once a day. Its sequence number is the
current Unix time, and always above the last one signed: that one is saved per label as
key-name-seq.jsonnext to the seed, so a restarted or recreated broadcast replaces the older pointer even if the clock went back. If the DHT already holds a higher one (the key used on another machine, or a lostkey-name-seq.json), Outpace signs above it and stores it again at once. A clock that reads before 2026 is treated as unset: nothing is signed until it is right. A put no node acknowledges is retried after 30 seconds, doubling up to 45 minutes. One timer per keyed broadcast; nothing else runs. Back upkey-name-seq.jsonwith the seed. - Retrieval. The DHT holds the pointer only. Viewers fetch the descriptor by its hash from your broadcast's peers (outpace broadcasts serve it over the peer wire), or from an open resolver that has it. Inbound peer serving must be on, as for any broadcast.
-
Relays. An Outpace relay looks your name up in the DHT
itself, so its users can play it without reaching the DHT. A relay that lists
records-putalso accepts your pointer and descriptor directly (Publishing to a relay); Outpace doesn't push them there for you yet. - Stopping. A deleted broadcast's name stops answering once its last pointer expires (at most 2 days). A recreated broadcast takes the name over at once.
- Not in private peer mode and not while the outbound proxy is active: both keep Outpace off the DHT.
outpace broadcast prints the name, an outpace play command and a native URL. On a running
daemon, GET /broadcast/<name>/key-name reports it:
curl http://127.0.0.1:6878/broadcast/my-channel/key-name
# {"name":"my-channel","key_name":"key:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef/my-channel",
# "route_id":"key:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef~my-channel","publishing":true,"seq":1796083200,
# "published_at":1796083203,"acknowledged":8,"error":null}error is no_dht_acknowledgement, stale_seq, seq_conflict or put_refused after a
failed put, clock_not_set while the clock reads before 2026, and seq_exhausted if the label
ever reaches the largest sequence number (publishing then stops). An unknown broadcast gets
404 broadcast_not_found, and one without a key name 404 key_name_not_configured. The raw-HTTP
PUT response also carries key_name (null without one). Log lines start with [keyname].
| From | How |
|---|---|
| The same daemon |
http://127.0.0.1:6878/streams/ace/<content_id>. It resolves locally, with no catalog lookup. |
| A stock AceStream client or any Outpace daemon | The catalog acestream:// link, once the broadcast is registered. outpace broadcast prints it when the id is already saved; otherwise it appears in the log, in the raw-HTTP PUT response and in the POST /broadcast/<name>/register response. |
| Another Outpace daemon | Set OUTPACE_BEP9_CONTENT_ID_FALLBACK=1 on that daemon and play the content id, or play the descriptor URL below. |
| Any client that takes a transport-file URL |
http://<host>:6878/broadcast/<name> serves the descriptor. |
The descriptor-hash acestream:// link that Outpace prints (labelled Outpace-only when a
catalog link is printed too) uses the descriptor's own hash as its content id. Other Outpace
daemons can only resolve it through the peer-metadata fallback above, because that value
isn't the id the public catalog knows.
How the fallback finds the broadcaster: without bootstrap peers, the receiver asks its lookup
trackers (see OUTPACE_TRACKERS above) and, unless an outbound proxy is active, the DHT at the same time, and tries up to four candidate peers
at once as they arrive. The first peer whose descriptor matches the content id wins. The
lookup does not advertise the receiver on the tracker (it announces port 0), because a
receiver has nothing to serve under that key.
| Request | Effect |
|---|---|
GET /broadcasts |
Lists every broadcast, ordered by name, as {"broadcasts":[...]}. See Listing broadcasts. |
GET /broadcast/<name> |
The transport descriptor, or 404 before the identity exists. |
DELETE /broadcast/<name> |
Stops all producers and announcements, and permanently deletes the identity, including its saved catalog choice and id. Returns 204 when finished. |
POST /broadcast/<name>/register |
Saves the broadcast's catalog registration choice, and starts registering it if the broadcast is announcing (otherwise once it starts announcing). 200 with catalog_content_id when known, 202 otherwise. Publishes the descriptor and can't be undone. A browser request whose Origin differs from the Host it was sent to gets 403 cross_origin, so a web page can't trigger it; curl and other clients that send no Origin are unaffected. |
DELETE /broadcast/<name>/source |
Stops only the pull source. The identity stays. |
Errors use {"error":{"code":"..."}}:
| Status | Codes |
|---|---|
400 |
invalid_name, invalid_source_config, invalid_source_url, source_address_blocked
|
403 |
cross_origin (cross-site browser POST /broadcast/<name>/register) |
404 |
broadcasts_disabled, source_not_found, broadcast_not_found
|
422 |
catalog_disabled_in_private_mode |
409 |
producer_conflict, source_conflict, broadcast_options_conflict, broadcast_stopping, key_label_in_use
|
413, 415
|
source_request_too_large, source_content_type_required
|
500 |
broadcast_persistence_failed, broadcast_state_invalid, piece_index_exhausted
|
503 |
broadcast_service_stopping, broadcast_cleanup_timeout (retry the DELETE later) |
None of these routes require authentication. Keep the HTTP API on loopback or behind an authenticating proxy.
GET /broadcasts answers 404 broadcasts_disabled when broadcasting is off, like the other
broadcast routes. Otherwise each item has the same identity fields PUT /broadcast/<name>
returns, plus its state:
{
"broadcasts": [
{
"name": "my-channel",
"content_id": "0123456789abcdef0123456789abcdef01234567",
"infohash": "0123456789abcdef0123456789abcdef01234567",
"catalog_content_id": null,
"key_name": null,
"state": "ingesting",
"ingest": "pull",
"source": {"state": "streaming", "attempts": 1, "last_error": null, "retry_in_ms": null},
"catalog": "pending"
}
]
}| Field | Meaning |
|---|---|
state |
ingesting while a producer is attached, idle otherwise (the identity exists but nothing feeds it). A pull source keeps its producer while it waits to retry, so check source.state to tell whether data is actually arriving. |
ingest |
The active producer: http_put, rtmp, srt or pull, or null when idle. |
source |
The pull source's status, exactly as GET /broadcast/<name>/source reports it, or null without one. The source URL, its host and any credentials are never shown. |
catalog |
off (not registering), pending (registration chosen, waiting to announce or in progress), registered (catalog_content_id is set) or disabled (private peer mode). |
catalog_content_id, key_name
|
As in the PUT /broadcast/<name> answer: null until registered, or without a key: name. |
Broadcasts that are being deleted are not listed.
- Back up
<data dir>/broadcasts/(it contains private signing keys) and keep it private. - Piece numbers are reserved on disk in blocks of 128. After a restart, the unused part of the last block is skipped, so small gaps in numbering are normal.
- Never restore an old copy of a broadcast's state while keeping its identity, and never run two daemons on one data directory. Either could republish piece numbers that were already used.
- To downgrade Outpace while you have an active broadcast, stop it, delete the broadcast, roll back, and then create a fresh one.
These pages are generated from docs/wiki/ in the main repository and published both as the GitHub wiki and as the documentation site. To fix or improve a page, open a pull request there; both are republished automatically when it merges, and edits made in the wiki web UI are overwritten.
Start
Watching
Integrations
Publishing and peers
- Broadcasting
- Seeding and Peers
- Engine Camouflage
- NAT and Port Mapping
- Private Peer Mode
- Outbound Proxy
Running it
- Deployment
- Routers and Small Devices
- Migrating from AceStream Engine
- Support Sources and Operations
- Event Feed
- Dashboard
- Troubleshooting
- Releases and Versions
Success stories