DEV Community

Akeel Almas
Akeel Almas

Posted on

MoQ Support Is Now Available in Ant Media Server

Home

Announcement

MoQ Support Is Now Available in Ant Media Server
moq-hero

Petar Ostojic
Author
Apr 17, 2026
12 min read
We are excited to announce that MoQ support is now available in Ant Media Server. Media over QUIC (MoQ) is one of the most interesting developments in live streaming right now, and we wanted to get early support out so you can start experimenting with it alongside us.

In this post, we walk through what the AMS MoQ plugin offers, how it works under the hood, and everything you need to know to get started.

moq-hero
Table of Contents
What Is MoQ?
Introducing MoQ Support in Ant Media Server
MoQ vs. WebRTC vs. HLS
moq-lite vs. Full IETF moq-transport: Where Things Stand
How It Works: Architecture Overview
Built-In Browser Player and Publisher
Supported Codecs
Getting Started
Playing Streams via MoQ
Publishing Streams into AMS via MoQ
Configuration
Frequently Asked Questions
Conclusion
What Is MoQ?
Media over QUIC (MoQ) is an emerging live media protocol built on QUIC and WebTransport. It is being standardized by the IETF working group and has backing from Google, Cisco, Akamai, Cloudflare, and others, which gives a clear signal of where the industry is heading.

At its core, MoQ is built on QUIC, a modern transport protocol that handles multiple streams of data independently over a single connection. This means a delayed video frame will not hold up the ones behind it, which is a known limitation of older TCP-based delivery used by protocols like HLS. On top of QUIC, MoQ uses WebTransport to make this accessible directly from the browser, with no plugins or native apps required. The end result is latency in the range of WebRTC, with a delivery model that scales through a CDN just like HLS does.

If you want a deeper technical comparison, read our article WebRTC vs. MoQ — Two Protocols, One Platform Completely Built for Both. In this post, we focus on the practical: what the AMS MoQ plugin does and how to use it.

Introducing MoQ Support in Ant Media Server
Heads up
MoQ is still an evolving protocol. The IETF standard is actively being developed, and the current plugin is based on moq-lite, a pragmatic and deployable subset of the specification. We are continuously monitoring the standard’s progress and will ship updates as it matures. We recommend keeping that in mind when planning your integration.
The AMS MoQ plugin adds bidirectional MoQ support to any Ant Media Server deployment:

Egress
AMS → Browser Viewer
Live streams on AMS are automatically published as MoQ broadcasts. Browser clients connect via WebTransport and receive video with sub-second latency. No plugins, WebRTC peer connections, or SFU infrastructure required.
Ingest
External MoQ Relay → AMS
AMS can pull streams from any moq-compatible relay and treat them as regular AMS broadcasts, available for recording, transcoding, or re-distribution via WebRTC, HLS, or RTMP.
The plugin ships with an embedded moq-lite-relay (running on port 4443), so there is no extra infrastructure to stand up for a first test. If you already have a moq-lite-compatible relay running, whether self-hosted or a third-party service like Cloudflare’s MoQ CDN edge, you can point the plugin at that instead. A ready-to-use browser player and publisher page are also included out of the box.

MoQ vs. WebRTC vs. HLS
Feature MoQ WebRTC HLS / DASH
Origin ~2022–present, IETF draft 2011, W3C & IETF standard 2009, RFC 8216+
Latency Sub-second (configurable) Flexible ~0.2–0.5s Ultra-low 3–30 seconds
Architecture Pub/Sub + CDN relay SFU CDN / origin
CDN Cacheable Yes No Yes
Browser Support Chrome, Edge Limited All major browsers Universal All major browsers Universal
Transport QUIC / WebTransport UDP / DTLS-SRTP TCP / HTTP
moq-lite vs. Full IETF moq-transport: Where Things Stand
It is worth being precise about what “MoQ support” means today, because there are two distinct layers to understand.

moq-lite
Deployable Today
A deliberately simplified and forwards-compatible subset of the IETF draft. The philosophy: rather than waiting years for a finalized standard, ship something real today and stay compatible as the spec evolves. moq-lite already interoperates with moq-transport CDNs such as Cloudflare’s MoQ edge.
This is what the AMS MoQ plugin is based on.
IETF moq-transport
Full Specification (In Progress)
Covers full session negotiation, complex track namespacing, subscribe and announce filtering, priority ordering, and delivery preferences. Still an active draft, so it continues to change. Support for moqtail.dev is on our roadmap as it matures.
Think of it like early HTTP: the core ideas were solid and deployable long before the formal RFCs were complete. moq-lite takes the same approach for live media.
How It Works: Architecture Overview
The plugin integrates at the muxer level inside AMS. When a broadcast starts, a MoQMuxer is attached to the stream’s mux pipeline: one for the source quality and one for each adaptive rendition. Encoded frames flow from the encoder directly into the muxer, which forwards them to the embedded relay for fan-out over WebTransport.

Egress (AMS → Browser)
ams-moq-to-browser
Ingest (Browser → AMS)
WebBrowserToAMS
This architecture keeps AMS at the center. Whether you are sending video out to MoQ viewers or pulling video in from a MoQ source, the stream is fully integrated into the AMS ecosystem. The REST API, management console, recording, and all other AMS features apply as normal.

Built-In Browser Player and Publisher
The plugin ships two ready-to-use HTML pages built on the moq-lite TypeScript web components.

AMS MoQ Player
Browser Compatibility Note
The MoQ player currently works on Chromium-based browsers only (Chrome, Edge, Brave, etc.). Safari does not support WebTransport. Firefox has partial WebTransport support but is currently unstable for MoQ playback. We expect this to improve as browser vendors continue adopting the WebTransport specification.
The player page (play.html) is built on the web component and requires no JavaScript beyond what is bundled. Key capabilities:

Dual Render Mode
Auto-selects between WebCodecs (canvas-based, lowest latency) and MSE (video element, broader compatibility), or can be forced manually.
Relay URL Probing
Automatically tries multiple relay URL candidates and connects to the first that responds. Useful when the relay is on a different port or behind a proxy.
Live Debug Panel
Real-time FPS, buffer size, stall events, latency, codec in use, and video bytes received. Invaluable during integration and testing.
AMS MoQ Publisher
The publisher page (publish.html) is built on the web component and allows browser-based publishing directly to the MoQ relay:

Camera & Screen Capture
Capture from camera or screen share with a single click.
Audio & Video Controls
Toggle audio mute and video off independently.
Relay URL Probing
Live relay URL probing with per-candidate status indicators.
Supported Codecs
Track Supported Codecs
Video H.264 (AVC) H.265 (HEVC)
Audio AAC Opus
H.264 streams use Annex B SPS/PPS extraction to ensure correct decoder initialization on the receiver side. Codecs outside this list (such as VP8) are not yet supported. Expect this to expand as the MoQ ecosystem matures.

Getting Started
Requirements: Ant Media Server 3.0.0 or later, Linux x86_64, sudo access.

Download MoQPlugin-release.zip and upload it to your server, then run:

1. Unzip the release

unzip MoQPlugin-release.zip

2. Install the plugin and relay binaries

cd MoQ-Plugin
sudo chmod +x install-moq-plugin.sh
sudo ./install-moq-plugin.sh

3. Copy the MoQ player pages to your AMS application

sudo mkdir -p /usr/local/antmedia/webapps/live/moq
sudo cp -r moq-ams-player-build/* /usr/local/antmedia/webapps/live/moq

4. Restart AMS

sudo service antmedia restart
The install script copies MoQPlugin.jar to the plugins directory and extracts the relay binaries. After restart, the play.html and publish.html pages will be available at https://your-server:5443/live/moq/play.html.

Once the server is running, open the publish and play pages in your browser, that’s all it takes!

MoQ Publish Page
publish.html — broadcast over MoQ
MoQ Play Page
play.html — watch with sub-second latency
The standalone MoQ player pages are temporary. MoQ playback and publishing will be built directly into the main Ant Media Server web player in a future release.
A couple of things to check before you open the pages:
HTTPS required on real servers. MoQ uses WebTransport, and browsers only allow it over HTTPS. If your server is on a real domain or IP address, it needs a valid SSL certificate. Localhost is the one exception browsers allow without SSL.
Open port 4443. The embedded MoQ relay listens on UDP/TCP port 4443. If your server is behind a firewall, make sure that port is open to inbound traffic or the browser won’t be able to reach the relay.
Playing Streams via MoQ
Once a stream is live on AMS, viewers can connect directly via the built-in MoQ player or any moq compatible client. Each quality level is available as a separate named track:

Source quality: moq://ams-server-ip:4443/streamId/source
720p rendition: moq://ams-server-ip:4443/streamId/720p
When the player opens, you will see a list of available tracks for the stream. The source track is the original quality as published into AMS. Named renditions like 720p or 480p are adaptive bitrate versions that AMS transcoded on the way through.

About the “publish” track
If you see a publish track in the list, the stream was sent to the relay directly from the browser publisher, without passing through AMS at all. Selecting it plays the stream straight from the MoQ relay, skipping AMS encoding, transcoding, and recording entirely. It is the most direct path with the lowest overhead, though that also means no ABR renditions, no recording, and none of AMS’s pipeline features.
The browser player connects to the relay via WebTransport and subscribes to the preferred track. The relay handles all fan-out, so a single stream can support any number of concurrent viewers without the per-connection overhead that makes WebRTC challenging at scale.

Publishing Streams into AMS via MoQ
AMS also accepts incoming MoQ streams. Beyond the built-in browser publisher, any moq-compatible client can publish directly to the relay and AMS will pick it up as a regular broadcast. Two ways to do it:

Browser
Built-in Publisher Page
Open publish.html from the plugin, enter your relay address, and start publishing from your camera or screen. No setup required.
Any MoQ Client
Direct Relay Publish
Publish directly to the relay URL using any moq-lite-compatible tool:
moq://relay-ip:4443/moq/streamId/publish
Once received, the stream becomes a standard AMS broadcast, ready for recording, transcoding, or re-distribution over WebRTC, HLS, or RTMP.

Configuration
Configuration is optional. The plugin works out of the box with the defaults shown below. To override any value, go to your application’s Settings > Advanced in the AMS web panel and add your MoQ settings nested inside customSettings, under the plugin.moq key:

{
"customSettings": {
"plugin.moq": {
"useEmbeddedRelay": true,
"ingestEnabled": true,
"externalRelayUrl": "https://relay.example.com:9000/moq",
"ingestPollIntervalMs": 2000
}
}
}
Setting Default Description
useEmbeddedRelay true Use the bundled moq-relay on port 4443. Set to false to use an external relay.
ingestEnabled true Enable MoQ ingest via announce polling. Set to false if AMS is publish-only.
externalRelayUrl localhost:4443 URL of the external relay. Only used when useEmbeddedRelay is false.
ingestPollIntervalMs 2000 How often (in ms) to poll the relay’s /announced endpoint for new streams.
When useEmbeddedRelay is true, the relay URL resolves automatically to http://localhost:4443/moq and the external URL setting is ignored.

Frequently Asked Questions
Is the MoQ plugin ready for production use?
The plugin is functional and actively maintained. That said, MoQ as a protocol is still being standardized, so your production readiness depends on your tolerance for an evolving spec. If you are planning a serious integration, we recommend starting with a staging environment and reaching out to us to discuss your use case.

Which browsers support MoQ playback?
MoQ playback requires WebTransport. Chrome and Edge have stable support. Safari does not currently support WebTransport at all. Firefox has partial WebTransport support but is unstable for MoQ playback. We expect browser coverage to improve as the WebTransport specification matures.

Can I use my own external MoQ relay instead of the embedded one?
Yes. Set useEmbeddedRelay: false in the plugin configuration and provide your relay URL via externalRelayUrl. Any moq-compatible relay works, including self-hosted deployments or Cloudflare’s MoQ CDN offering.

Does MoQ replace WebRTC in Ant Media Server?
No, they serve complementary roles. WebRTC remains the right choice for interactive, two-way communication such as video conferencing or ultra-low-latency broadcast (under 200ms). MoQ targets one-to-many broadcast scenarios where you need both sub-second latency and CDN-scale delivery at the same time. Both protocols are supported by AMS and can run side by side on the same server. For a detailed breakdown, see our article WebRTC vs. MoQ — Two Protocols, One Platform Completely Built for Both.

What is moqtail.dev, and when will AMS support it?
moqtail.dev represents the next step in the MoQ ecosystem as the IETF standard matures. We are monitoring its development closely. Support will be added to the AMS MoQ plugin as the library stabilizes and it becomes practical to integrate.

Conclusion
The AMS MoQ plugin is an early but functional step toward the next generation of live streaming infrastructure. By building on moq-lite today, Ant Media Server gives developers a hands-on way to explore what MoQ brings to the table: sub-second latency, CDN-scale fan-out, and a modern browser stack built on WebTransport and WebCodecs. No need to wait for the IETF to wrap up the spec.

We will keep shipping updates as moq-lite evolves and as moqtail.dev support becomes practical to integrate. If you are experimenting with the MoQ plugin or building something on top of it, tell us about it on our community forum or reach out directly.

Top comments (0)