moq-cli 0.9.1

Media over QUIC
[package]
name = "moq-cli"
description = "Media over QUIC"
authors = ["Luke Curley <kixelated@gmail.com>"]
repository = "https://github.com/moq-dev/moq"
license = "MIT OR Apache-2.0"

version = "0.9.1"
edition = "2024"
rust-version.workspace = true

keywords = ["quic", "http3", "webtransport", "media", "live"]
categories = ["multimedia", "network-programming", "web-programming"]

# The package is `moq-cli`, but the binary it ships is `moq`.
[[bin]]
name = "moq"
path = "src/main.rs"

[features]
default = ["iroh", "quinn", "websocket", "nvenc", "vaapi", "nvdec", "pipewire"]
iroh = ["moq-native/iroh"]
noq = ["moq-native/noq"]
quinn = ["moq-native/quinn"]
quiche = ["moq-native/quiche"]
websocket = ["moq-native/websocket"]
# Device capture (camera + microphone) + encode/publish. Off by default because
# it pulls in moq-video + moq-audio capture, which add system build deps on Linux
# (camera: `v4l`/v4l2-sys-mit needs libclang + V4L2 headers via bindgen; mic: cpal
# needs ALSA/libasound), plus binary size. macOS/Windows use OS frameworks, no
# extra install. H.264 is vendored static (openh264), so no system ffmpeg/libav.
# Enable with `cargo build -p moq-cli --features capture`.
capture = ["dep:moq-video", "dep:moq-audio", "moq-audio/capture"]
# Just-in-time transcoding (`moq ... transcode`). Off by default for the same
# reason as `capture`: it pulls in moq-video, whose default-on `vaapi` feature
# links libva on Linux. Enable with `cargo build -p moq-cli --features transcode`.
transcode = ["dep:moq-transcode", "dep:moq-video"]
# NVENC / VAAPI / NVDEC hardware codecs for `capture` (Linux), on by default. Each
# just turns on the matching moq-video feature, and only bites when `capture` pulls
# in moq-video. For a `capture` build with no CUDA / libva system deps, drop them, e.g.
#   cargo build -p moq-cli --no-default-features --features "iroh quinn websocket capture"
nvenc = ["moq-video?/nvenc", "moq-transcode?/nvenc"]
vaapi = ["moq-video?/vaapi", "moq-transcode?/vaapi"]
nvdec = ["moq-video?/nvdec", "moq-transcode?/nvdec"]
# Screen capture for `capture --display` on Linux (xdg-desktop-portal + PipeWire),
# on by default like the hardware codecs above and trimmable the same way. Only
# bites when `capture` pulls in moq-video; links libpipewire-0.3 at build time.
pipewire = ["moq-video?/pipewire"]

[dependencies]
anyhow = { version = "1", features = ["backtrace"] }
axum = { version = "0.8", features = ["tokio"] }
axum-server = { version = "0.8", features = ["tls-rustls"] }
bytes = "1"
clap = { version = "4", features = ["derive"] }
hang = { workspace = true }
humantime = "2.3"
moq-audio = { workspace = true, optional = true }
# `server` enables the HTTP egress server for `moq export hls`; the importer is always available.
moq-hls = { workspace = true, features = ["server"] }
moq-mux = { workspace = true }
moq-native = { workspace = true, default-features = false, features = ["aws-lc-rs"] }
moq-rtc = { workspace = true }
moq-rtmp = { workspace = true }
moq-srt = { workspace = true }
moq-transcode = { workspace = true, optional = true }
moq-video = { workspace = true, optional = true }
rustls = { version = "0.23", features = ["aws-lc-rs"], default-features = false }
tokio = { workspace = true, features = ["full"] }
tower-http = { version = "0.7", features = ["cors"] }
tracing = "0.1"
url = "2"

[target.'cfg(unix)'.dependencies]
sd-notify = "0.5"

[dev-dependencies]
# `test-util` enables `tokio::time::pause` so the TS round-trip test simulates the
# exporter drain timeouts instantly instead of waiting on the wall clock.
tokio = { workspace = true, features = ["test-util"] }