Files
Claude ac187fe39e packages: every codec backend, and the libraries the app needs
voelin-media builds dav1d (AV1 decoding) by default, like every other
codec backend: Linux images already had libdav1d-dev; Windows CI takes it
from vcpkg next to libvpx and the MinGW image builds it static (dav1d
1.5.4, pinned commit; checked to cross-compile).

Windows packages ship FFmpeg's LGPL DLLs (BtbN's 8.1 shared build,
checked against the release's checksums by scripts/fetch-ffmpeg-windows.sh)
next to voelin.exe, where the app looks first, with their license and a
note on the build and its source; the installer installs and removes them.

The Linux .tar.gz carries libvpx and libdav1d in lib/ (RUNPATH
$ORIGIN/../lib, set with patchelf), whose sonames differ between
distributions, and bin/voelin-install-deps, which installs FFmpeg, VA-API
drivers, PipeWire, the desktop portal and a keyring with apt, dnf, pacman
or zypper. The .deb recommends those packages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VZBWxxMsxUzp4PSTKVzbZN
2026-10-04 22:12:17 +00:00

117 lines
5.5 KiB
TOML

[package]
name = "voelin-media"
version = "0.1.0"
description = "Video frames, pixel conversion, video codecs (VP8/VP9, H.264, AV1) and screen / system-audio capture for streams."
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
publish.workspace = true
[features]
# Every codec backend: desktop builds have all encoders and decoders.
default = ["vpx", "openh264", "openh264-download", "ffmpeg", "av1", "x11", "pipewire", "wlroots", "segment"]
# VP8 and VP9 through the system libvpx (pkg-config `vpx`).
vpx = ["dep:libvpx-native-sys"]
# H.264 through Cisco's prebuilt OpenH264 library, loaded at runtime. The
# OpenH264 source is never compiled in (see docs/media.md).
openh264 = ["dep:openh264"]
# Download of Cisco's OpenH264 binary over HTTPS with a SHA-256 check.
openh264-download = ["openh264", "dep:reqwest", "dep:bzip2", "dep:sha2"]
# Video encoders through FFmpeg loaded at runtime (never linked or shipped):
# VA-API, NVENC, Quick Sync, AMF, Media Foundation, VideoToolbox, x264,
# SVT-AV1, ... whatever the installed FFmpeg has (see docs/media.md).
ffmpeg = ["dep:libloading", "dep:rustix"]
# AV1 decoding through libdav1d (pkg-config `dav1d` >= 1.3; on Windows
# vcpkg's or our MinGW build, see .github/actions/system-deps and
# docker/windows.Dockerfile).
av1 = ["dep:dav1d"]
# X11 screen capture (Linux).
x11 = ["dep:x11rb", "dep:memmap2", "dep:rustix"]
# Wayland screen capture (ScreenCast portal + PipeWire, shared memory or
# LINEAR DMA-BUFs) and PipeWire system audio (Linux).
# MJPEG cameras are decoded with zune-jpeg (already in the tree through
# `image`).
pipewire = ["dep:ashpd", "dep:pipewire", "dep:memmap2", "dep:rustix", "dep:zune-core", "dep:zune-jpeg"]
# Screen capture on wlroots compositors (Sway, Hyprland, river, ...) without
# the portal: ext-image-copy-capture-v1 or wlr-screencopy-unstable-v1 (Linux).
wlroots = ["dep:wayland-client", "dep:wayland-protocols", "dep:wayland-protocols-wlr", "dep:memmap2", "dep:rustix"]
# The studio's background replacement finds the person with a segmentation
# model (PP-HumanSeg, ONNX, bundled in `models/`) run on the CPU by tract.
# Without it the background is cut around a centred oval.
segment = ["dep:tract-onnx"]
# Conversion between `Codec` and `str0m::format::Codec`.
str0m = ["dep:str0m"]
# The studio's WHIP output: a WebRTC session (str0m) set up over HTTP. Needs
# str0m's crypto provider, the same one voelin-stream uses.
whip = ["str0m", "str0m/aws-lc-rs", "dep:reqwest"]
[dependencies]
bzip2 = { version = "0.6.1", optional = true }
dav1d = { version = "0.11.1", optional = true }
libloading = { version = "0.8.9", optional = true }
libvpx-native-sys = { version = "5.0.17", optional = true }
openh264 = { version = "0.9.8", default-features = false, features = ["libloading"], optional = true }
reqwest = { version = "0.13.5", default-features = false, features = ["rustls"], optional = true }
# Lock-free single-producer rings from capture threads to the stream mixer.
rtrb = "0.4.0"
# Scene graphs are serialised into the `studio.scenes` setting.
serde = { version = "1", features = ["derive"] }
# Studio sources: text rasterising and image files.
ab_glyph = "0.2.32"
image = { version = "0.25.10", default-features = false, features = ["jpeg", "png"] }
sha2 = { version = "0.10.9", optional = true }
str0m = { version = "0.23.1", default-features = false, optional = true }
thiserror = "2.0.21"
tract-onnx = { version = "0.23.8", optional = true }
tokio = { version = "1", features = ["sync"] }
tracing = "0.1.44"
yuv = "0.8.19"
[target.'cfg(target_os = "linux")'.dependencies]
ashpd = { version = "0.13.13", default-features = false, features = ["camera", "screencast", "tokio"], optional = true }
memmap2 = { version = "0.9.11", optional = true }
pipewire = { version = "0.10.1", optional = true }
rustix = { version = "1.1.5", features = ["event", "fs", "stdio"], optional = true }
wayland-client = { version = "0.31.15", optional = true }
wayland-protocols = { version = "0.32.13", features = ["client", "staging"], optional = true }
wayland-protocols-wlr = { version = "0.3.12", features = ["client"], optional = true }
x11rb = { version = "0.13.2", features = ["randr", "shm", "xfixes"], optional = true }
zune-core = { version = "0.5.3", default-features = false, optional = true }
zune-jpeg = { version = "0.5.15", optional = true }
[target.'cfg(target_os = "android")'.dependencies]
ndk = { version = "0.9.0", default-features = false, features = ["media", "api-level-29"] }
[target.'cfg(windows)'.dependencies]
wasapi = "0.24.0"
# Process names for the list of applications with audio sessions,
# and studio cameras (Media Foundation).
windows = { version = "0.62", features = ["Win32_Foundation", "Win32_Media_MediaFoundation", "Win32_System_Com", "Win32_System_Threading"] }
windows-capture = "2.0.1"
[dev-dependencies]
criterion = "0.8"
# Opus packets to feed the RTMP output's AAC encoder in tests (the voice
# codec's crate, already in the tree through voelin-audio).
opus2 = "0.4"
serde_json = "1"
# The H.264 `profile-level-id` the signalling offers, to check it against the
# SPS the encoders really emit (`tests/ffmpeg.rs`). No cycle: voelin-stream
# does not depend on this crate.
voelin-stream = { path = "../voelin-stream" }
# Logs of integration tests (`RUST_LOG`).
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread", "time"] }
[[bench]]
name = "convert"
harness = false
[[bench]]
name = "mix"
harness = false
[lints]
workspace = true