Skip to content
 
 

Latest commit

 

History

972 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

moq-rs

An implementation of the Media over QUIC Transport (MoQT) protocol for live media delivery over QUIC, as specified by the IETF MoQ working group.

This codebase was originally created by Luke Curley (@kixelated). Mike English (@englishm) contributed to early design and has maintained this IETF-aligned fork. The project is now maintained by Cloudflare. The implementation targets draft-ietf-moq-transport-16.

Note: This repository includes example client and server applications (moq-pub, moq-sub, moq-clock-ietf, moq-relay-ietf) intended to demonstrate usage of the moq-transport library. These are meant for testing and development purposes and have not been optimized for production use.

Protocol Support

The main branch targets draft-16 of the MoQT specification. For draft-07 compatibility (used in Cloudflare's current production deployment), see the draft-ietf-moq-transport-07 branch.

What's Included

This repository provides:

  • moq-transport: A complete MoQT protocol library implementation
  • moq-relay-ietf: A production-ready relay server
  • Sample clients: An fMP4 publisher (moq-pub) and a demonstration clock application (moq-clock-ietf)

Protocol Feature Support

Supported:

  • CLIENT_SETUP / SERVER_SETUP
  • PUBLISH_NAMESPACE
  • PUBLISH / PUBLISH_OK / PUBLISH_DONE
  • SUBSCRIBE
  • Standalone FETCH: passthrough for local and remote PUBLISH_NAMESPACE origins, and answers from retained groups with --fetch-retention-groups (bounded by --fetch-retention-track-bytes and --fetch-retention-bytes)
  • WebTransport and raw QUIC transport layers
  • Both stream ("subgroup") and datagram delivery modes

Not Supported:

  • SUBSCRIBE_NAMESPACE (Soon)
  • Joining FETCH, and FETCH passthrough to exact PUBLISH origins

Wire Profiles

Transport negotiation selects an exact wire profile: the profile name is the ALPN on native QUIC, and the same value travels in WT-Available-Protocols / WT-Protocol on WebTransport. moqt-16 is the default and is always offered. moq-relay-ietf and moq-pub-mmtp take --wire-profile <name> to additively offer one more:

Profile ALPN Status
draft-16 moqt-16 Default. Full media publish/subscribe/relay.
blockcast01 moqt-blockcast-01 Draft-16 framing with mandatory bounded subgroup history. Full media path.
draft19 moqt-19 Control plane only.

Draft-19 is a different wire from draft-16: two unidirectional control streams instead of one bidirectional, and SETUP type 0x2f00 with delta-coded SetupOptions instead of CLIENT_SETUP/SERVER_SETUP. The implementation covers SETUP, GOAWAY (New Session URI plus millisecond timeout), and request stream lifecycle. It has no draft-19 publisher or subscriber, so:

  • moq-relay-ietf --wire-profile draft19 completes the draft-19 handshake and then refuses every other control message out loud. It routes no media.
  • moq-pub-mmtp --wire-profile draft19 completes the handshake, logs the negotiated profile, and exits. MMTP publish is draft-16 only.

A draft-16 session refuses a draft-19 negotiation with a typed SessionError::ProfileFramingMismatch, so no session can report selected_version() == moqt-19 while writing draft-16 bytes.

Interoperability

A public relay instance running the latest main branch is available for interop testing at:

https://interop-relay.cloudflare.mediaoverquic.com:443

As an implementation targeting the IETF specification, this codebase should be compatible with other implementations targeting the same draft version. See the moq-wg/moq-transport wiki for a list of other implementations.

For streaming format compatibility:

  • video-dev/moq-js: A TypeScript player implementation compatible with moq-pub's fMP4 output. Check draft version compatibility when selecting branches.
  • gst-moq-pub: A GStreamer publisher plugin built on moq-pub, also compatible with moq-js.

Components

This repository contains several crates:

  • moq-transport: A media-agnostic library implementing the core MoQT protocol.
    • moq-native-ietf: QUIC and TLS utilities for native transport.
  • moq-relay-ietf: A relay server that forwards content from publishers to subscribers, with caching and deduplication.
    • moq-api: An HTTP API server for origin discovery and relay coordination, backed by Redis.
  • moq-pub: A publisher client that broadcasts fMP4 streams over MoQT.
    • moq-catalog: Catalog format handling.
    • moq-sub: A subscriber client for consuming MoQT streams.
  • moq-clock-ietf: A simple time publisher/subscriber demonstrating non-media use cases.

Development

Typical development workflow:

  1. Start a local relay in one terminal:

    ./dev/relay
  2. Start a publisher in another terminal:

    ./dev/pub

    Add --tls-disable-verify if you prefer not to install local certificates.

  3. For playback, clone and run moq-js locally, then open it in a browser pointed at your local relay.

See the dev helper scripts for more options and workflows.

Usage

For detailed usage information, see the README in each crate directory:

The moq-transport crate is also published on crates.io with API documentation.

License

Licensed under either:

About

Rust implementation of the IETF MoQ Transport protocol

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages