Thanks to visit codestin.com
Credit goes to lib.rs

18 releases

Uses new Rust 2024

new 0.7.23 May 18, 2026
0.7.22 May 15, 2026
0.7.20 Apr 20, 2026
0.7.12 Mar 25, 2026
0.7.7 Feb 12, 2026

#3 in Multimedia

MIT/Apache

445KB
10K SLoC

moq-cli

A command-line tool for publishing and subscribing to media over MoQ. It works with FFmpeg for encoding and decoding.

Install

cargo install moq-cli

Docker

docker pull moqdev/moq-cli

Multi-arch images (linux/amd64 and linux/arm64) are published to Docker Hub.

Usage

moq-cli reads media from stdin (or writes media to stdout) and exchanges it with a MoQ relay. Pick a subcommand based on whether you want to publish or subscribe, and whether your relay is local or remote.

Publish to a remote relay

ffmpeg -i input.mp4 -f mp4 -movflags cmaf - | \
    moq-cli publish --url https://relay.example.com --broadcast my-stream fmp4

Subscribe from a remote relay

moq-cli subscribe --url https://relay.example.com --broadcast my-stream --format fmp4 | \
    ffplay -

Self-host: publish into a local relay (serve)

Runs a relay and publishes a single broadcast read from stdin into it. Useful for local testing without a separate relay process.

ffmpeg -i input.mp4 -f mp4 -movflags cmaf - | \
    moq-cli serve --broadcast my-stream fmp4

Self-host: subscribe to an inbound broadcast (accept)

Runs a relay and writes the first incoming broadcast's media to stdout. The inverse of serve.

moq-cli accept --broadcast my-stream --format fmp4 | ffplay -

Input formats (publish / serve)

  • avc3 raw H.264 Annex-B from stdin
  • fmp4 fragmented MP4 from stdin
  • hls --playlist <url-or-path> ingest from an HLS playlist

Dependencies

~100–150MB
~3M SLoC