Quick Start
The default demo starts a relay, publishes a test video, and opens the web player. Everything runs on your machine.
git clone https://github.com/moq-dev/moq
cd moqWith Nix (recommended)
Install Nix with flakes enabled, then:
nix develop --command justThe dev shell pins every tool the repository uses. With nix-direnv, entering the directory loads the shell and the command becomes just.
Without Nix
Install Just, Rust, Bun, and FFmpeg, then:
just install
justWindows users should run setup.bat first; see Development.
What starts
- moq-relay on
localhost:4443with a generated certificate and anonymous access. - moq-cli publishing Big Buck Bunny through the relay.
- The web demo at localhost:5173, where you can watch the stream or publish your camera.
Skip the relay
A public test relay runs at https://cdn.moq.dev/anon. Anything published there is public and discoverable, so pick a unique name and don't publish private media.
# Publish a file, then open https://moq.dev/watch?name=<your-name>
ffmpeg -re -i video.mp4 -c copy -f mpegts - | \
moq --client-connect https://cdn.moq.dev/anon --broadcast <your-name>.hang import tsEvery client, in every language, connects the same way: a relay URL whose path scopes authentication, plus a broadcast name. Media broadcasts end in .hang.
Next steps
- Install the relay and CLI as packages instead of building them.
- Publish from OBS, GStreamer, or RTMP/SRT/WebRTC.
- Embed a player with the web components or pick a library.
- Deploy a relay with real TLS and authentication.