{"id":34497379,"url":"https://github.com/moq-dev/moq","last_synced_at":"2026-06-04T06:00:34.290Z","repository":{"id":44679286,"uuid":"508763694","full_name":"moq-dev/moq","owner":"moq-dev","description":"Media over QUIC library in Rust+Typescript","archived":false,"fork":false,"pushed_at":"2026-06-03T17:50:52.000Z","size":12829,"stargazers_count":1302,"open_issues_count":62,"forks_count":180,"subscribers_count":16,"default_branch":"main","last_synced_at":"2026-06-03T19:08:03.467Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://moq.dev","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moq-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2022-06-29T16:16:37.000Z","updated_at":"2026-06-03T17:41:28.000Z","dependencies_parsed_at":"2026-03-03T19:02:56.207Z","dependency_job_id":null,"html_url":"https://github.com/moq-dev/moq","commit_stats":null,"previous_names":["kixelated/moq","kixelated/moq-rs","kixelated/warp-demo","moq-dev/moq"],"tags_count":634,"template":false,"template_full_name":null,"purl":"pkg:github/moq-dev/moq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moq-dev%2Fmoq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moq-dev%2Fmoq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moq-dev%2Fmoq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moq-dev%2Fmoq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moq-dev","download_url":"https://codeload.github.com/moq-dev/moq/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moq-dev%2Fmoq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33887124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-12-24T01:00:50.339Z","updated_at":"2026-06-04T06:00:34.281Z","avatar_url":"https://github.com/moq-dev.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003cimg height=\"128px\" src=\"https://github.com/moq-dev/moq/blob/main/.github/logo.svg\" alt=\"Media over QUIC\"\u003e\n\u003c/p\u003e\n\n![License](https://img.shields.io/badge/license-MIT%2FApache--2.0-blue)\n[![Discord](https://img.shields.io/discord/1124083992740761730)](https://discord.gg/FCYF3p99mr)\n[![Crates.io](https://img.shields.io/crates/v/moq-net)](https://crates.io/crates/moq-net)\n[![npm](https://img.shields.io/npm/v/@moq/net)](https://www.npmjs.com/package/@moq/net)\n\n# Media over QUIC\n\n[Media over QUIC](https://moq.dev) (MoQ) is a next-generation live media protocol that provides **real-time latency** at **massive scale**.\nBuilt using modern web technologies, MoQ delivers WebRTC-like latency without the constraints of WebRTC.\nThe core networking is delegated to a QUIC library but the rest is in application-space, giving you full control over your media pipeline.\n\n**Key Features:**\n\n- 🚀 **Real-time latency** using QUIC for prioritization and partial reliability.\n- 📈 **Massive scale** designed for fan-out and supports cross-region clustering.\n- 🌐 **Modern Web** using [WebTransport](https://developer.mozilla.org/en-US/docs/Web/API/WebTransport_API), [WebCodecs](https://developer.mozilla.org/en-US/docs/Web/API/WebCodecs_API), and [WebAudio](https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API).\n- 🎯 **Multi-language** with both Rust (native) and TypeScript (web) libraries.\n- 🔧 **Generic** for any live data, not just media. Includes text chat as both an example and a core feature.\n\n\u003e **Note:** This project implements [moq-lite](https://doc.moq.dev/concept/layer/moq-lite), a forwards-compatible subset of the IETF [moq-transport](https://datatracker.ietf.org/doc/draft-ietf-moq-transport/) draft. moq-lite works with any moq-transport CDN (ex. [Cloudflare](https://moq.dev/blog/first-cdn/)). The focus is narrower, prioritizing simplicity and deployability.\n\n## Installing on Linux\n\nDebian/Ubuntu users can install pre-built packages from `apt.moq.dev`,\nFedora/RHEL/Rocky/AlmaLinux/openSUSE users from `rpm.moq.dev`. The\nrelay ships with a hardened systemd unit and a default config; the\nGStreamer plugin lands in the right multiarch plugin directory and is\nvisible to `gst-inspect-1.0` after one install. See\n[Linux Installation](https://doc.moq.dev/setup/linux) for the apt/dnf\none-liners and the list of available packages.\n\n## Demo\n\nThis repository is split into multiple binaries and libraries across different languages.\nIt can get overwhelming, so there's an included [demo](demo/web) with some examples.\n\n**Note:** this demo uses an insecure HTTP fetch intended for *local development only*.\nIn production, you'll need a proper domain and a matching TLS certificate via [LetsEncrypt](https://letsencrypt.org/docs/) or similar.\n\n### Quick Setup\n\n**Requirements:**\n\n- [Nix](https://nixos.org/download.html)\n- [Nix Flakes enabled](https://nixos.wiki/wiki/Flakes)\n\n```sh\n# Runs a relay, demo media, and the web server\nnix develop -c just\n```\n\nThen visit \u003chttps://localhost:8080\u003e to see the demo.\nNote that this uses an insecure HTTP fetch for local development only; in production you'll need a proper domain + TLS certificate.\n\n*TIP:* If you've installed [nix-direnv](https://github.com/nix-community/nix-direnv), then only `just` is required.\n\n### Full Setup\n\nIf you don't like Nix, then you can install dependencies manually:\n\n**Requirements:**\n\n- [Just](https://github.com/casey/just)\n- [Rust](https://www.rust-lang.org/tools/install)\n- [Bun](https://bun.sh/)\n- [FFmpeg](https://ffmpeg.org/download.html)\n- ...probably some other stuff\n\n**Run it:**\n\n```sh\n# Install some more dependencies\njust install\n\n# Runs a relay, demo media, and the web server\njust\n```\n\nThen visit \u003chttp://localhost:5173\u003e to see the demo.\n\n## Architecture\n\nMoQ is designed as a layered protocol stack.\n\n**Rule 1**: The CDN MUST NOT know anything about your application, media codecs, or even the available tracks.\nEverything could be fully E2EE and the CDN wouldn't care. **No business logic allowed**.\n\nInstead, [`moq-relay`](rs/moq-relay) operates on rules encoded in the [`moq-net`](https://docs.rs/moq-net) header.\nThese rules are based on video encoding but are generic enough to be used for any live data.\nThe goal is to keep the server as dumb as possible while supporting a wide range of use-cases.\n\nThe media logic is split into another protocol called [`hang`](https://docs.rs/hang).\nIt's pretty simple and only intended to be used by clients or media servers.\nIf you want to do something more custom, then you can always extend it or replace it entirely.\n\nThink of `hang` as like HLS/DASH, while `moq-lite` is like HTTP.\n\n```\n┌─────────────────┐\n│   Application   │   🏢 Your business logic\n│                 │    - authentication, non-media tracks, etc.\n├─────────────────┤\n│      hang       │   🎬 Media-specific encoding/streaming\n│                 │     - codecs, containers, catalog\n├─────────────────├\n│    moq-lite     │  🚌 Generic pub/sub transport\n│                 │     - broadcasts, tracks, groups, frames\n├─────────────────┤\n│  WebTransport   │  🌐 Browser-compatible QUIC\n│      QUIC       │     - HTTP/3 handshake, multiplexing, etc.\n└─────────────────┘\n```\n\n## Libraries\n\nThis repository provides both [Rust](rs) and [TypeScript](js) libraries with similar APIs but language-specific optimizations.\n\n### Rust\n\n| Crate                       | Description                                                                                                                           | Docs                                                                           |\n|-----------------------------|---------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [moq-net](rs/moq-net)            | The networking layer: real-time pub/sub with built-in caching, fan-out, and prioritization. Negotiates either the `moq-lite` or `moq-transport` wire protocol. | [![docs.rs](https://docs.rs/moq-net/badge.svg)](https://docs.rs/moq-net)       |\n| [moq-relay](rs/moq-relay)   | A clusterable relay server. This relay performs fan-out connecting multiple clients and servers together.                             |                                                                                |\n| [moq-token](rs/moq-token)   | An authentication scheme supported by `moq-relay`. Can be used as a library or as [a CLI](rs/moq-token-cli) to authenticate sessions. |                                                                                |\n| [moq-native](rs/moq-native) | Opinionated helpers to configure a Quinn QUIC endpoint. It's harder than it should be.                                                | [![docs.rs](https://docs.rs/moq-native/badge.svg)](https://docs.rs/moq-native) |\n| [libmoq](rs/libmoq)         | C bindings for `moq-net`.                                                                                                             | [![docs.rs](https://docs.rs/libmoq/badge.svg)](https://docs.rs/libmoq)         |\n| [hang](rs/hang)             | Media-specific encoding/streaming layered on top of `moq-net`. Can be used as a library.                      | [![docs.rs](https://docs.rs/hang/badge.svg)](https://docs.rs/hang)             |\n| [moq-cli](rs/moq-cli)       | A CLI for publishing media to MoQ relays.                                                                                             |                                                                                |\n| [moq-mux](rs/moq-mux)       | Media muxers and demuxers (fMP4/CMAF, HLS) for importing content into MoQ broadcasts.                                                 | [![docs.rs](https://docs.rs/moq-mux/badge.svg)](https://docs.rs/moq-mux)       |\n| [moq-gst](rs/moq-gst)       | A GStreamer plugin for publishing or consuming MoQ broadcasts. Not built by default; requires GStreamer dev libraries.                         |                                                                                |\n\n### TypeScript\n\n| Package                                  | Description                                                                                                        | NPM                                                                                                   |\n|------------------------------------------|--------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|\n| **[@moq/net](js/net)**             | The networking layer: real-time pub/sub with built-in caching, fan-out, and prioritization. Negotiates either the `moq-lite` or `moq-transport` wire protocol. Intended for browsers, runs server-side with a WebTransport polyfill. | [![npm](https://img.shields.io/npm/v/@moq/net)](https://www.npmjs.com/package/@moq/net)     |\n| **[@moq/token](js/token)**             |  Authentication library \u0026 CLI for JS/TS environments (see [Authentication](doc/app/relay/auth.md))                               | [![npm](https://img.shields.io/npm/v/@moq/token)](https://www.npmjs.com/package/@moq/token)   |\n| **[@moq/hang](js/hang)**           | Core media library: catalog, container, and support. Shared by `@moq/watch` and `@moq/publish`. | [![npm](https://img.shields.io/npm/v/@moq/hang)](https://www.npmjs.com/package/@moq/hang) |\n| **[@moq/demo](demo/web)** | Examples using `@moq/hang`.                                                                                  |                                                                                                       |\n| **[@moq/watch](js/watch)**         | Subscribe to and render MoQ broadcasts (Web Component + JS API).                                                        | [![npm](https://img.shields.io/npm/v/@moq/watch)](https://www.npmjs.com/package/@moq/watch)     |\n| **[@moq/publish](js/publish)**     | Publish media to MoQ broadcasts (Web Component + JS API).                                                               | [![npm](https://img.shields.io/npm/v/@moq/publish)](https://www.npmjs.com/package/@moq/publish) |\n| **[@moq/ui-core](js/ui-core)**     | Shared UI components (Button, Icon, Stats, CSS theme) used by `@moq/watch/ui` and `@moq/publish/ui`.                    | [![npm](https://img.shields.io/npm/v/@moq/ui-core)](https://www.npmjs.com/package/@moq/ui-core) |\n\n## Documentation\n\nAdditional documentation and implementation details:\n\n- **[Authentication](doc/app/relay/auth.md)** - JWT tokens, authorization, and security\n\n## Protocol\n\nRead the specifications:\n\n- [moq-lite](https://moq-dev.github.io/drafts/draft-lcurley-moq-lite.html)\n- [hang](https://moq-dev.github.io/drafts/draft-lcurley-moq-hang.html)\n- [use-cases](https://moq-dev.github.io/drafts/draft-lcurley-moq-use-cases.html)\n\n## Development\n\n```sh\n# See all available commands\njust\n\n# Build everything\njust build\n\n# Run tests and linting\njust check\n\n# Automatically fix some linting errors\njust fix\n\n# Run the demo manually\njust relay    # Terminal 1: Start relay server\njust pub tos  # Terminal 2: Publish a demo video using ffmpeg\njust web      # Terminal 3: Start web server\n```\n\nThere are more commands: check out the [justfile](justfile).\n\n## Iroh support\n\nThe `moq-native` and `moq-relay` crates optionally support connecting via [iroh](https://github.com/n0-computer/iroh). The iroh integration is disabled by default, to use it enable the `iroh` feature.\n\nWhen the iroh feature is enabled, you can connect to iroh endpoints with these URLs:\n\n- `iroh://\u003cENDPOINT_ID\u003e`: Connect via moq-lite over raw QUIC.\n- `moql+iroh://\u003cENDPOINT_ID\u003e`: Connect via moq-lite over raw QUIC (same as above)\n- `moqt+iroh://\u003cENDPOINT_ID\u003e`: Connect via IETF MoQ over raw QUIC\n- `h3+iroh://\u003cENDPOINT_ID\u003e/optional/path?with=query`: Connect via WebTransport over HTTP/3.\n\n`ENDPOINT_ID` must be the hex-encoded iroh endpoint id. It is currently not possible to set direct addresses or iroh relay URLs. The iroh integration in moq-native uses iroh's default discovery mechanisms to discover other endpoints by their endpoint id.\n\nYou can run a demo like this:\n\n```sh\n# Terminal 1: Start a relay server\njust relay --iroh-enabled\n# Copy the endpoint id printed at \"iroh listening\"\n\n# Terminal 2: Publish via moq-lite over raw iroh QUIC\n#\n# Replace ENDPOINT_ID with the relay's endpoint id.\n#\n# We set an `anon/` prefix to match the broadcast name the web ui expects\n# Because moq-lite does not have headers if using raw QUIC, only the hostname\n# in the URL can be used.\njust pub-iroh bbb iroh://ENDPOINT_ID  anon/\n# Alternatively you can use WebTransport over HTTP/3 over iroh,\n# which allows to set a path prefix in the URL:\njust pub-iroh bbb h3+iroh://ENDPOINT_ID/anon\n\n# Terminal 3: Start web server\njust web\n```\n\nThen open [localhost:5173](http://localhost:5173) and watch BBB, pushed from terminal 1 via iroh to the relay running in terminal 2, from where the browser fetches it over regular WebTransport.\n\n`just serve` serves a video via iroh alongside regular QUIC (it enables the `iroh` feature). This repo currently does not provide a native viewer, so you can't subscribe to it directly. However, you can use the [watch example from iroh-live](https://github.com/n0-computer/iroh-live/blob/main/iroh-live/examples/watch.rs) to view a video published via `moq-native`.\n\n## License\n\nLicensed under either:\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoq-dev%2Fmoq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoq-dev%2Fmoq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoq-dev%2Fmoq/lists"}