170 lines
4.3 KiB
Markdown
170 lines
4.3 KiB
Markdown
# every.channel
|
|
|
|
A global, disaggregated mesh of relays that turns local ATSC antennas into a coherent, worldwide stream. The stack is Rust-first, MoQ-native, and designed for deterministic chunking so identical broadcasts yield identical data.
|
|
|
|
## Goals
|
|
|
|
- Free, global access to broadcast TV through user-run relays.
|
|
- Deterministic encoding and chunking to make availability a coordination problem.
|
|
- Clean layering: capture -> transcode -> MoQ publish -> relay -> client playback.
|
|
- Cross-platform clients: Tauri app, CLI, and a static web UI.
|
|
|
|
## Repository layout
|
|
|
|
- `crates/ec-core`: shared types and determinism profiles.
|
|
- `crates/ec-hdhomerun`: HDHomeRun discovery and lineup scaffolding.
|
|
- `crates/ec-linux-iptv`: Linux DVB ingest scaffolding.
|
|
- `crates/ec-iroh`: iroh transport scaffolding.
|
|
- `crates/ec-crypto`: stream key derivation helpers.
|
|
- `crates/ec-ts`: MPEG-TS timing and table parsing.
|
|
- `crates/ec-chopper`: deterministic ffmpeg chunking scaffolding.
|
|
- `crates/ec-moq`: MoQ data model and relay scaffolding.
|
|
- `crates/ec-node`: node runner (ingest + publish).
|
|
- `crates/ec-cli`: CLI for discovery and node control.
|
|
- `apps/tauri`: desktop client shell.
|
|
- `apps/tauri/ui`: Dioxus web frontend embedded in the Tauri app.
|
|
- `docs/USAGE.md`: runbook for viewer and ingest pipelines.
|
|
- `docs/IROH_EXAMPLES.md`: summary of iroh repos/examples used for design.
|
|
- `docs/`: architecture, roadmap, and MoQ notes.
|
|
|
|
## Development
|
|
|
|
Nix:
|
|
|
|
```sh
|
|
nix develop
|
|
```
|
|
|
|
Rust:
|
|
|
|
```sh
|
|
cargo build
|
|
```
|
|
|
|
Runbook:
|
|
|
|
```sh
|
|
cat docs/USAGE.md
|
|
```
|
|
|
|
Git hosting topology:
|
|
|
|
```sh
|
|
cat docs/GIT_HOSTING.md
|
|
```
|
|
|
|
## WebTransport Watch (MoQ)
|
|
|
|
Publish (node -> Cloudflare relay):
|
|
|
|
```sh
|
|
cargo run -p ec-node -- wt-publish \
|
|
--url https://cdn.moq.dev/anon \
|
|
--name la-nbc \
|
|
--input http://<hdhr-host>/auto/v4.1 \
|
|
--control-announce \
|
|
--control-endpoint-addr-out /tmp/la-nbc-control-endpoint.json
|
|
```
|
|
|
|
`wt-publish` defaults to `--passthrough=true` so relay and archive retain exact CMAF fragment bytes.
|
|
|
|
Watch (web):
|
|
|
|
```txt
|
|
https://every.channel/watch?url=https%3A%2F%2Fcdn.moq.dev%2Fanon&name=la-nbc
|
|
```
|
|
|
|
Archive (relay -> CAS objects + JSONL manifests):
|
|
|
|
```sh
|
|
cargo run -p ec-node -- wt-archive \
|
|
--url https://cdn.moq.dev/anon \
|
|
--name la-nbc \
|
|
--output-dir /tank/every-channel/archive \
|
|
--manifest-dir /var/lib/every-channel/manifests
|
|
```
|
|
|
|
Replay server (archive -> HLS DVR endpoints):
|
|
|
|
```sh
|
|
cargo run -p ec-node -- wt-archive-serve \
|
|
--output-dir /tank/every-channel/archive \
|
|
--manifest-dir /var/lib/every-channel/manifests \
|
|
--listen 0.0.0.0:7788
|
|
```
|
|
|
|
Control protocol (iroh gossip, relay + direct transport discovery):
|
|
|
|
```sh
|
|
# Listener (on node A)
|
|
cargo run -p ec-node -- control-listen --gossip-peer <node-b-endpoint-addr-json>
|
|
|
|
# Announcer (on node B)
|
|
cargo run -p ec-node -- control-announce \
|
|
--stream-id la-nbc \
|
|
--relay-url https://cdn.moq.dev/anon \
|
|
--relay-broadcast la-nbc \
|
|
--gossip-peer <node-a-endpoint-addr-json>
|
|
|
|
# Resolver (consumer picks best announced path)
|
|
cargo run -p ec-node -- control-resolve \
|
|
--stream-id la-nbc \
|
|
--prefer direct-first \
|
|
--gossip-peer <node-a-endpoint-addr-json>
|
|
|
|
# Bridge iroh control announcements to every.channel public web list
|
|
EVERY_CHANNEL_WEB_UPSERT_TOKEN=<token> \
|
|
cargo run -p ec-node -- control-bridge-web \
|
|
--directory-url https://every.channel \
|
|
--gossip-peer <node-a-endpoint-addr-json>
|
|
```
|
|
|
|
`wt-publish`, `control-announce`, `control-listen`, `control-resolve`, and `control-bridge-web` print both
|
|
`control endpoint id` and `control endpoint addr` on startup. Use the `endpoint addr` JSON for
|
|
`--gossip-peer` when bootstrapping.
|
|
|
|
Coverage:
|
|
|
|
```sh
|
|
./scripts/coverage.sh
|
|
```
|
|
|
|
Build static web:
|
|
|
|
```sh
|
|
./scripts/build-web.sh
|
|
```
|
|
|
|
Deploy to Cloudflare Workers (static site):
|
|
|
|
```sh
|
|
./scripts/deploy-workers.sh
|
|
```
|
|
|
|
Remote website E2E (local publisher -> deployed every.channel web):
|
|
|
|
```sh
|
|
./scripts/e2e-remote-website-direct.sh
|
|
```
|
|
|
|
Remote website E2E (public list/signaling -> website selects stream automatically):
|
|
|
|
```sh
|
|
./scripts/e2e-remote-website-directory.sh
|
|
```
|
|
|
|
Tauri viewer (Dioxus + Trunk):
|
|
|
|
```sh
|
|
cd apps/tauri/ui
|
|
trunk serve --port 1420 --public-url /
|
|
```
|
|
|
|
```sh
|
|
cd ../
|
|
cargo run
|
|
```
|
|
|
|
## Status
|
|
|
|
This repository is intentionally minimal. It captures the initial architecture and scaffold for a MoQ-first network and will expand as proposals are accepted.
|