Rust library for Media over QUIC
Go to file
kixelated c5b3e5cb8d
Rename some TLS flags (#97)
2023-10-17 14:50:17 +09:00
.github Support multiple TLS certificates. (#95) 2023-10-16 13:05:40 +09:00
.vscode Add vscode recommendations. 2023-07-10 10:08:00 -07:00
dev Rename some TLS flags (#97) 2023-10-17 14:50:17 +09:00
moq-api Support multiple TLS certificates. (#95) 2023-10-16 13:05:40 +09:00
moq-pub Support multiple TLS certificates. (#95) 2023-10-16 13:05:40 +09:00
moq-relay Rename some TLS flags (#97) 2023-10-17 14:50:17 +09:00
moq-transport Bump rustls-webpki from 0.100.1 to 0.100.3 in /moq-transport (#88) 2023-10-13 10:49:20 +09:00
.dockerignore Major moq-transport API simplification (#68) 2023-09-15 12:06:28 -07:00
.editorconfig Add support for multiple origins (#82) 2023-10-12 13:09:32 +09:00
.gitignore Split the web player into it's own repo. 2023-05-24 13:29:18 -07:00
.rustfmt.toml Serve the certificate fingerprint over HTTP (#20) 2023-05-24 17:20:44 -07:00
Cargo.lock Support multiple TLS certificates. (#95) 2023-10-16 13:05:40 +09:00
Cargo.toml Add support for multiple origins (#82) 2023-10-12 13:09:32 +09:00
Dockerfile Why bother test. 2023-09-17 00:22:57 -07:00
LICENSE-APACHE Dual license (#40) 2023-07-05 14:55:40 -07:00
LICENSE-MIT Dual license (#40) 2023-07-05 14:55:40 -07:00
README.md Rename some TLS flags (#97) 2023-10-17 14:50:17 +09:00
fly-relay.sh Rename some TLS flags (#97) 2023-10-17 14:50:17 +09:00
fly.toml Update fly.io deployment (#71) 2023-09-15 16:10:13 -04:00

README.md

Media over QUIC

Media over QUIC (MoQ) is a live media delivery protocol utilizing QUIC streams. See quic.video for more information.

This repository contains a few crates:

  • moq-relay: A relay server, accepting content from publishers and fanning it out to subscribers.
  • moq-pub: A publish client, accepting media from stdin (ex. via ffmpeg) and sending it to a remote server.
  • moq-transport: An async implementation of the underlying MoQ protocol.
  • moq-api: A HTTP API server that stores the origin for each broadcast, backed by redis.

There's currently no way to view media with this repo; you'll need to use moq-js for that.

Development

Use the dev helper scripts for local development.

Usage

moq-relay

moq-relay is a server that forwards subscriptions from publishers to subscribers, caching and deduplicating along the way. It's designed to be run in a datacenter, relaying media across multiple hops to deduplicate and improve QoS. The relays register themselves via the moq-api endpoints, which is used to discover other relays and share broadcasts.

Notable arguments:

  • --listen <ADDR> Listen on this address, default: [::]:4443
  • --tls-cert <CERT> Use the certificate file at this path
  • --tls-key <KEY> Use the private key at this path
  • --dev Listen via HTTPS as well, serving the /fingerprint of the self-signed certificate. (dev only)

This listens for WebTransport connections on UDP https://localhost:4443 by default. You need a client to connect to that address, to both publish and consume media.

moq-pub

This is a client that publishes a fMP4 stream from stdin over MoQ. This can be combined with ffmpeg (and other tools) to produce a live stream.

Notable arguments:

  • <URL> connect to the given address, which must start with https:// for WebTransport.

NOTE: We're very particular about the fMP4 ingested. See this script for the required ffmpeg flags.

moq-transport

A media-agnostic library used by moq-relay and moq-pub to serve the underlying subscriptions. It has caching/deduplication built-in, so your application is oblivious to the number of connections under the hood.

See the published crate and documentation.

moq-api

This is a API server that exposes a REST API. It's used by relays to inserts themselves as origins when publishing, and to find the origin when subscribing. It's basically just a thin wrapper around redis that is only needed to run multiple relays in a (simple) cluster.

License

Licensed under either: