Media over QUIC (MoQ) is a live media delivery protocol utilizing QUIC streams. See [quic.video](https://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. There's currently no way to actually view content with `moq-rs`; you'll need to use [moq-js](https://github.com/kixelated/moq-js) for that. ## Setup ### Certificates Unfortunately, QUIC mandates TLS and makes local development difficult. If you have a valid certificate you can use it instead of self-signing. Use [mkcert](https://github.com/FiloSottile/mkcert) to generate a self-signed certificate. Unfortunately, this currently requires Go in order to [fork](https://github.com/FiloSottile/mkcert/pull/513) the tool. ```bash ./dev/cert ``` Unfortunately, WebTransport in Chrome currently (May 2023) doesn't verify certificates using the root CA. The workaround is to use the `serverFingerprints` options, which requires the certificate MUST be only valid for at most **14 days**. This is also why we're using a fork of mkcert, because it generates certificates valid for years by default. This limitation will be removed once Chrome uses the system CA for WebTransport. ### Media If you're using `moq-pub` then you'll want some test footage to broadcast. ```bash mkdir media wget http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4 -O dev/source.mp4 ``` ## 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. You can run the development server with the following command, automatically using the self-signed certificate generated earlier: ```bash ./dev/relay ``` Notable arguments: - `--bind