From 1cf8a7617ccb047a560f783241818cf9b0f39189 Mon Sep 17 00:00:00 2001 From: kixelated Date: Thu, 12 Oct 2023 13:13:45 +0900 Subject: [PATCH 1/3] Update links in README.md --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 392a03ba..4a7bd844 100644 --- a/README.md +++ b/README.md @@ -12,11 +12,11 @@ This repository contains a few crates: - **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 `moq-rs`; you'll need to use [moq-js](https://github.com/kixelated/moq-js) for that. +There's currently no way to view media with this repo; you'll need to use [moq-js](https://github.com/kixelated/moq-js) for that. ## Development -See the [dev/README.md] helper scripts for local development. +Use the [dev helper scripts](dev/README.md) for local development. ## Usage @@ -24,11 +24,11 @@ See the [dev/README.md] helper scripts for local development. **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. +The relays register themselves via the [moq-api](moq-api) endpoints, which is used to discover other relays and share broadcasts. Notable arguments: -- `--listen ` Listen on this address [default: [::]:4443] +- `--listen ` Listen on this address, default: `[::]:4443` - `--cert ` Use the certificate file at this path - `--key ` Use the private key at this path - `--fingerprint` Listen via HTTPS as well, serving the `/fingerprint` of the self-signed certificate. (dev only) @@ -43,15 +43,14 @@ This can be combined with ffmpeg (and other tools) to produce a live stream. Notable arguments: -- `` connect to the given address, which must start with https:// for WebTransport. +- `` connect to the given address, which must start with `https://` for WebTransport. -**NOTE**: We're very particular about the fMP4 ingested. See [dev/pub] for the required ffmpeg flags. +**NOTE**: We're very particular about the fMP4 ingested. See [this script](dev/pub] for the required ffmpeg flags. ### moq-transport -A media-agnostic library used by [moq-relay] and [moq-pub] to serve the underlying subscriptions. +A media-agnostic library used by [moq-relay](moq-relay) and [moq-pub](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. -Somebody build a non-media application using this library and I'll link it here! See the published [crate](https://crates.io/crates/moq-transport) and [documentation](https://docs.rs/moq-transport/latest/moq_transport/). @@ -59,7 +58,7 @@ See the published [crate](https://crates.io/crates/moq-transport) and [documenta 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. +It's basically just a thin wrapper around redis that is only needed to run multiple relays in a (simple) cluster. ## License From 163bc986057998ad61fee6ec452ba4166bb63ef6 Mon Sep 17 00:00:00 2001 From: kixelated Date: Thu, 12 Oct 2023 13:14:56 +0900 Subject: [PATCH 2/3] Missed a link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4a7bd844..f259b174 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ Notable arguments: - `` connect to the given address, which must start with `https://` for WebTransport. -**NOTE**: We're very particular about the fMP4 ingested. See [this script](dev/pub] for the required ffmpeg flags. +**NOTE**: We're very particular about the fMP4 ingested. See [this script](dev/pub) for the required ffmpeg flags. ### moq-transport From c95bb8209fe2e0c5a5b24f15bcb71357cdc2e35c Mon Sep 17 00:00:00 2001 From: kixelated Date: Thu, 12 Oct 2023 13:24:28 +0900 Subject: [PATCH 3/3] Fix local development. (#87) --- dev/README.md | 13 +++++++++++-- dev/relay | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/dev/README.md b/dev/README.md index d952b72e..88e0a066 100644 --- a/dev/README.md +++ b/dev/README.md @@ -1,6 +1,6 @@ -# dev +# Local Development -This is a collection of helpful scripts for local development ONLY. +This is a collection of helpful scripts for local development. ## Setup @@ -70,6 +70,10 @@ This listens for WebTransport connections on WebTransport `https://localhost:444 ./dev/relay ``` +It will print out a URL when you can use to publish. Alternatively, you can use `dev/pub` instead. + +> Publish URL: https://quic.video/publish/?server=localhost:4443 + ### moq-pub The following command runs a development instance, broadcasing `dev/source.mp4` to WebTransport `https://localhost:4443`: @@ -78,6 +82,11 @@ The following command runs a development instance, broadcasing `dev/source.mp4` ./dev/pub ``` +It will print out a URL when you can use to watch. +This will contain a random broadcast name so the below link won't work: + +> Watch URL: https://quic.video/watch/REPLACE_WITH_NAME?server=localhost:4443 + ### moq-api The following commands runs an API server, listening for HTTP requests on `http://localhost:4442` by default. diff --git a/dev/relay b/dev/relay index c5fd3792..175f8718 100755 --- a/dev/relay +++ b/dev/relay @@ -22,12 +22,12 @@ ARGS="" # Connect to the given URL to get origins. # TODO default to a public instance? -if [ -n "$API" ]; then +if [ -n "${API-}" ]; then ARGS="$ARGS --api $API" fi # Provide our node URL when registering origins. -if [ -n "$NODE" ]; then +if [ -n "${NODE-}" ]; then ARGS="$ARGS --node $NODE" fi