Chapter 09
Your First MoQ System
On this page
You can try MoQ in a browser, run a relay yourself, or build a publisher and subscriber with a transport library. The MoQ Alliance getting-started guide brings these options together, with links to demos, media tools, and implementations in several languages.
Start with something small: one publisher, one relay, and one viewer. Once media is playing, add another viewer and see how the relay shares the publication.
Find a starting point
The Alliance guide is a useful place to choose a project based on what you want to build:
- Try live video. Follow its browser demo links to publish in one tab and watch in another.
- Run your own relay. Look at the linked relay projects and follow their setup guides.
- Use an existing media source. Explore the tools for connecting native media pipelines to MoQ.
- Send application data. Look at the transport libraries if your objects contain messages or state rather than audio and video.
For a complete media demo, moq.dev’s setup guide is one option. For other implementations, browse the Alliance’s open-source repository list. Use the chosen project’s documentation for installation commands and supported features.
Before combining projects, check their protocol revision and media format. Two libraries can both implement MoQ and still disagree on the messages or payloads they expect. Record the versions you use so you can reproduce your setup later.
Follow the media
A source produces media. An encoder compresses it. The media format supplies timing and decoder configuration, and the publisher makes the content available as tracks. The relay forwards requested objects to the viewer, which decodes and presents them.
Use the project’s sample media first if it provides any. That gives you a known source while you get the connection and player working. Then try your camera or another live source.
Add another viewer
Open a second player for the same publication. Both viewers should receive the content, and closing one should leave the other playing. If the relay exposes traffic metrics, compare its upstream and downstream traffic as viewers join.
Try joining after the publisher has been running for a while too. The new viewer needs decoder configuration and a suitable starting point in the media. Watch how long it takes to show the first picture.
Change the network
Reduce the bandwidth available to one viewer, then restore it. Watch whether the player lowers its video quality, pauses, or falls behind. When the connection recovers, does playback return near live?
Use a network test tool that affects the connection you’re using. Browser HTTP throttling may not affect WebTransport traffic. Change one condition at a time so you can tell what caused the result.
You can also briefly disconnect a viewer. Check whether it reconnects on its own and whether it resumes with fresh media or plays through older content first.
Run it outside your machine
Follow your chosen implementation’s deployment guide for certificates, network access, and relay configuration. A local demo may allow anonymous publishing and viewing. Before using private content, configure who can publish and subscribe, then test those permissions. The Security and Access chapter explains the decisions involved.