# 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.** ```sh 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. **License.** Apache-2.0: the text is in `LICENSE`, and a project `wai create` makes from this example carries it.