lumen-engine-ffmpeg
lumen-engine-ffmpeg is Lumen's lower-level FFmpeg integration crate. It wraps the FFmpeg C APIs needed for demuxing, decoding, encoding, muxing, and GPU video frame interop.
This crate is experimental. The API is built around Lumen's current renderer and server needs, and may change.
Platform Notes
Supported render/media targets today are:
- Linux with Vulkan and CUDA/NVENC for GPU interop and hardware encode paths.
- macOS with Metal and VideoToolbox-oriented frame/encode paths.
CPU decode/encode helpers exist, but Lumen's production renderer is GPU-first and should be treated as requiring GPU-capable machines.
Features
avcodec,avformat,swresample,swscale: FFmpeg component features enabled by default.metal: enables CoreVideo/Metal interop types used on macOS.vulkan: enables Vulkan video frame interop types.cuda: enables CUDA interop viacudarcand NVENC helpers. Kernel sources live undercrates/ffmpeg/cuda/and are compiled to PTX withnvccat build time (requires the CUDA toolkit on Linux). Override the target withLUMEN_CUDA_ARCH(defaultsm_50) or the compiler withCUDA_NVCC.build-ffmpeg: asksffmpeg-sys-nextto build FFmpeg.gpl: enables GPL FFmpeg build licensing throughffmpeg-sys-next.nonfree: enables nonfree FFmpeg build licensing throughffmpeg-sys-next.
Development