Rust library for Media over QUIC
Go to file
Luke Curley ea918a6327 Oops duplicated web requirements. 2023-05-24 14:29:34 -07:00
.github/workflows Split the web player into it's own repo. 2023-05-24 13:29:18 -07:00
cert Split the web player into it's own repo. 2023-05-24 13:29:18 -07:00
media Split the web player into it's own repo. 2023-05-24 13:29:18 -07:00
src Split the web player into it's own repo. 2023-05-24 13:29:18 -07:00
.editorconfig Tabs not spaces u nerds. (#18) 2023-05-23 12:04:27 -07:00
.gitignore Split the web player into it's own repo. 2023-05-24 13:29:18 -07:00
.rustfmt.toml Split the web player into it's own repo. 2023-05-24 13:29:18 -07:00
Cargo.lock Split the web player into it's own repo. 2023-05-24 13:29:18 -07:00
Cargo.toml Split the web player into it's own repo. 2023-05-24 13:29:18 -07:00
LICENSE Initial public release. 2022-06-29 09:17:02 -07:00
NOTICE Initial public release. 2022-06-29 09:17:02 -07:00
README.md Oops duplicated web requirements. 2023-05-24 14:29:34 -07:00

README.md

Media over QUIC

Media over QUIC (MoQ) is a live media delivery protocol utilizing QUIC streams. See the Warp draft.

This repository is a Rust server that supports both contribution (ingest) and distribution (playback). It requires a client, such as moq-js.

Requirements

  • rust: duh
  • ffmpeg: (optional) used to generate fragmented media
  • go: (optional) used to generate self-signed certificates
  • openssl: (options) ...also used to generate self-signed certificates

Media

This demo simulates a live stream by reading a file from disk and sleeping based on media timestamps. Obviously you should hook this up to a real live stream to do anything useful.

Download your favorite media file and convert it to fragmented MP4, by default media/fragmented.mp4:

wget http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4 -O media/source.mp4
./media/generate

Certificates

Unfortunately, QUIC mandates TLS and makes local development difficult. If you have a valid certificate you can use it instead of self-signing.

Otherwise, we use mkcert to install a self-signed CA:

./cert/generate

With no arguments, the server will generate self-signed cert using this root CA. This certificate is only valid for 2 weeks due to how WebTransport performs certificate fingerprinting.

Server

`The Warp server supports WebTransport, pushing media over streams once a connection has been established.

cargo run

This listens for WebTransport connections on https://localhost:4443 by default. Use a MoQ client to connect to the server.