open-standards/wai/examples/encoder-ingest
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science 15d6a51e9d CI: the examples run on every leg that hosts them, and the release builds the archive
.github/workflows/wai-examples.yml runs each example through wai create and
wai dev: the portable ones on linux, the archive as the release builds it,
the quickstart's readiness check (wai dev --check from the unpacked archive),
the browser examples and apple-app on macos, android-app on linux-arm64.
wai-conformance.yml runs tests/floor.rs and tests/cli_dx.rs, and fires on
wai/examples/ (the templates are compiled into wai). wai-release.yml, on a
tag wai-v<version>, builds the room client once and the archive on each
runner, attaches them with their SHA-256, and writes the Homebrew formula
and the Scoop manifest; wai/quickstart/install.sh installs a release.

Two clippy notes of the new code fixed (a type alias for a template's files;
hex only where hello and verify are built).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-26 22:58:39 -04:00
..
src CI: the examples run on every leg that hosts them, and the release builds the archive 2026-10-26 22:58:39 -04:00
test wai/examples: encoder-ingest subscribes once the gateway publishes; tests take CARGO_TARGET_DIR 2026-10-26 22:58:39 -04:00
.gitignore wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00
Cargo.toml wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00
README.md wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00
wai.json wai: the developer's path, hello, create, dev and verify, a floor build with no system library, and nine examples 2026-10-26 22:58:39 -04:00

Stream from an encoder into a room

What it shows. An encoder's stream entering a room over SRT. The room's authority grants the encoder's key a publisher's place; an ingest gateway opens an SRT session for that grant once the encoder's side proves it holds the key, and publishes what arrives as the room's video and audio tracks. The gateway signs each group's receipt as the first hop; the relay checks every object against it at its door, and a subscriber checks each one again.

Run it.

wai create my-ingest --template encoder-ingest
cd my-ingest
cargo run --release

It prints an srt://127.0.0.1:… address. Point an SRT encoder at it (MPEG-TS with H.264 or HEVC video and AAC audio, caller mode, the stream ID and passphrase as given).

What you see. A line for the first groups of each track as they arrive, each verified against the receipt the gateway signed. cargo run --release -- --synthetic 5 sends five seconds of a synthetic program itself (shaped like H.264 and AAC, not watchable) and exits 0 once every group verified.

Make it yours. The gateway also takes RTMP and WHIP, and serves WHEP to players; its configuration file is gateway.example.toml in the repository's joule-moq-ingest crate. The first build fetches the repository and compiles the relay and the gateway.

With a coding assistant. Run wai setup-agent in this directory: it writes the instructions an assistant reads and connects it to WAI's tools.