diff --git a/CLAUDE.md b/CLAUDE.md index e25a675..d00ea73 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -158,7 +158,9 @@ cargo run -rp punktfunk-client-rs -- --mode 1280x720x120 --out /tmp/a.h265 --inp ``` Pinned crate facts: `ashpd` 0.13 + `pipewire` 0.9 (must match ashpd's) + `ffmpeg-next` 8.x -(system FFmpeg 8 / libavcodec 62). Env knobs: `PUNKTFUNK_VIDEO_SOURCE=virtual|portal`, +(`ffmpeg-sys-next` auto-detects the system FFmpeg, so it builds against **FFmpeg 7.x/libavcodec 61 +or 8.x/libavcodec 62** — validated live on Ubuntu 26.04 (8) and Bazzite F43 (7.1); the zero-copy +FFI also link-needs `libGL`/`libgbm`/`libcuda` at build time). Env knobs: `PUNKTFUNK_VIDEO_SOURCE=virtual|portal`, `PUNKTFUNK_COMPOSITOR=kwin|gamescope|mutter`, `PUNKTFUNK_ZEROCOPY=1`, `PUNKTFUNK_GAMESCOPE_APP=...`, `PUNKTFUNK_INPUT_BACKEND=...`, `PUNKTFUNK_PERF=1` (per-stage timing), `PUNKTFUNK_VIDEO_DROP=N` (FEC test), `PUNKTFUNK_FEC_PCT=N`. diff --git a/crates/punktfunk-host/src/encode/linux.rs b/crates/punktfunk-host/src/encode/linux.rs index 384be78..a7469ed 100644 --- a/crates/punktfunk-host/src/encode/linux.rs +++ b/crates/punktfunk-host/src/encode/linux.rs @@ -1,4 +1,6 @@ -//! NVENC encoder via `ffmpeg-next` (binds the system FFmpeg 8.x / libavcodec 62). +//! NVENC encoder via `ffmpeg-next` (binds the system FFmpeg — `ffmpeg-sys-next` auto-detects the +//! installed version, so this builds against FFmpeg 7.x/libavcodec 61 *or* 8.x/libavcodec 62; +//! validated live on Ubuntu 26.04 (FFmpeg 8) and Bazzite F43 (FFmpeg 7.1)). //! //! Input is a packed RGB/BGR CPU frame; `*_nvenc` accepts `rgb0`/`bgr0`/`rgba`/`bgra` //! directly and does the RGB→YUV conversion on the GPU, so the host stays off the diff --git a/packaging/rpm/punktfunk.spec b/packaging/rpm/punktfunk.spec index 7149d7d..7c4f67d 100644 --- a/packaging/rpm/punktfunk.spec +++ b/packaging/rpm/punktfunk.spec @@ -47,9 +47,19 @@ BuildRequires: pkgconfig(wayland-client) BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(opus) # FFmpeg dev headers with NVENC — from RPM Fusion (ffmpeg-devel), NOT ffmpeg-free. +# Version-agnostic: ffmpeg-sys-next auto-detects the installed FFmpeg, so this builds +# against FFmpeg 7.x (libavcodec 61, e.g. Fedora 43 / Bazzite) or 8.x (libavcodec 62). BuildRequires: pkgconfig(libavcodec) BuildRequires: pkgconfig(libavformat) BuildRequires: pkgconfig(libavutil) +# Zero-copy GPU path: src/zerocopy/ links libGL + libgbm (mesa) via hand-rolled FFI. +BuildRequires: pkgconfig(gl) +BuildRequires: pkgconfig(gbm) +# It ALSO links the NVIDIA CUDA driver lib (-lcuda) via FFI, so libcuda.so must be present +# at LINK time. A normal NVIDIA host (or Bazzite -nvidia) has it; a headless COPR/koji builder +# without a GPU does NOT — point %build at the CUDA toolkit stub (…/stubs/libcuda.so) there, +# e.g. `ln -s $(rpm -ql cuda-cudart-devel | grep stubs/libcuda.so | head -1) /usr/lib64/`. +# (Proper fix tracked separately: make the cuda/gbm/GL FFI dlopen-based like khronos-egl.) # --- Runtime ----------------------------------------------------------------- Requires: pipewire