The Linux release ffmpeg is built statically from source, and ffmpeg only autodetects --enable-vaapi when libva headers are present at configure time. Neither build path installed them, so every release shipped a static ffmpeg with no h264_vaapi encoder -- the zero-copy export silently fell back to software 100% of the time. - Containerfile + build.yml: install libva-dev + libdrm-dev so the from-source ffmpeg gets VAAPI. - build.yml: assert the release binary links libva, so a missing dep can't silently regress to a software-only build again. - deb/rpm: libva (libva2/libva-drm2/libdrm2, libva/libdrm) is a hard runtime dep -- the vaapi-enabled ffmpeg DT_NEEDEDs it, so the app won't launch without it. The VA driver is a soft recommends (absent it, export falls back to software): va-driver-all (deb), intel-media-driver/mesa-va-drivers (rpm). build.rs needs no change: releases link ffmpeg statically (its bundling path is skipped) and the AppImage is thin, taking libva from the host like libvulkan.
68 lines
1.8 KiB
Docker
68 lines
1.8 KiB
Docker
FROM ubuntu:24.04
|
|
|
|
# Avoid interactive prompts
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Build essentials + Rust build deps
|
|
RUN apt-get update && apt-get install -y \
|
|
build-essential \
|
|
pkg-config \
|
|
clang \
|
|
nasm \
|
|
curl \
|
|
git \
|
|
rsync \
|
|
wget \
|
|
file \
|
|
squashfs-tools \
|
|
# ALSA (cpal)
|
|
libasound2-dev \
|
|
# Wayland (winit/eframe)
|
|
libwayland-dev \
|
|
libwayland-cursor0 \
|
|
# X11 (winit/eframe)
|
|
libx11-dev \
|
|
libxkbcommon-dev \
|
|
libxcb-shape0-dev \
|
|
libxcb-xfixes0-dev \
|
|
# Clipboard (arboard)
|
|
libxdo-dev \
|
|
# GLib (rfd/muda/gio)
|
|
libglib2.0-dev \
|
|
libgtk-3-dev \
|
|
# Vulkan headers (wgpu)
|
|
libvulkan-dev \
|
|
# FFmpeg build-from-source deps (ffmpeg-sys-next build feature)
|
|
yasm \
|
|
libx264-dev \
|
|
libx265-dev \
|
|
libvpx-dev \
|
|
libmp3lame-dev \
|
|
libopus-dev \
|
|
# VAAPI hardware H.264 encode (zero-copy export). FFmpeg autodetects --enable-vaapi
|
|
# only when these headers are present at configure time; without them the static
|
|
# ffmpeg has no h264_vaapi encoder and the editor silently uses the software path.
|
|
libva-dev \
|
|
libdrm-dev \
|
|
# PulseAudio (cpal optional backend)
|
|
libpulse-dev \
|
|
# Packaging tools
|
|
dpkg \
|
|
rpm \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Install Rust
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
|
|
ENV PATH="/root/.cargo/bin:${PATH}"
|
|
|
|
# Install cargo packaging tools
|
|
RUN cargo install cargo-deb cargo-generate-rpm
|
|
|
|
# Download AppImage runtime for building AppImages
|
|
RUN wget "https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-x86_64" \
|
|
-O /opt/appimage-runtime && \
|
|
chmod +x /opt/appimage-runtime && \
|
|
echo "Runtime size: $(wc -c < /opt/appimage-runtime) bytes"
|
|
|
|
WORKDIR /build
|