Codec fixes: clearer errors, hardware-aware encoder availability, Linux hw ffmpeg, Intel VideoToolbox#21
Merged
Conversation
When an encoder ffmpeg fails (e.g. a hardware encoder not present in the
bundled ffmpeg), vspipe dies with SIGPIPE writing to the closed pipe, and
the worker reported that symptom ("vspipe exited with signal 13") instead
of the cause. Now:
- pipeline_executor checks ffmpeg's status first and includes the tail of
its stderr in the error, so the user sees e.g. "Unknown encoder
'h264_qsv'". A vspipe SIGPIPE is no longer reported when it's just the
downstream pipe closing (ffmpeg's result is authoritative).
- The settings UI now disables (not just warns on) hardware encoders that
ffmpeg didn't report as compiled into this build, with a clear "Not
available in this build" reason — preventing a guaranteed-to-fail encode.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…iltered codecs - download-deps-linux.sh: switch FFmpeg from the John Van Sickle static build (software-only) to BtbN's static GPL build, which ships hardware encoders (x64: QSV/NVENC/AMF/VAAPI; arm64: NVENC/AMF/V4L2M2M) while still running software-only where no GPU/driver is present. - deps-version.json + dependency_manager: add optional per-platform version/releaseTag so Linux deps can bump independently. Bump linux-x64 and linux-arm64 to 1.4.0 / deps-v1.4.0 (sha256/size null pending the rebuild); macOS/Windows stay on the global 1.3.0 and won't re-download. - settings: show only the hardware encoders relevant to each platform (VideoToolbox on macOS; QSV/NVENC/AMF on Windows + Linux), instead of listing all of them everywhere. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
HardwareEncoderDetector is now a ChangeNotifier with two stages: the cheap `ffmpeg -encoders` compiled-in list, then a concurrent functional probe (a throwaway 1-frame encode) per compiled-in hardware encoder to see if it actually initializes on this machine (driver + device present). Probes run concurrently and update state as each resolves. The settings codec list listens to the detector and shows a spinner next to each hardware encoder while its probe is in flight, then resolves to selectable (available) or disabled with a reason — "Not available in this build" (not compiled in) vs "Not available on this system" (probe failed, e.g. no GPU/driver). This keeps the UI honest once the hardware-enabled ffmpeg ships, where every encoder is compiled in regardless of hardware. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
h264_videotoolbox/hevc_videotoolbox support constant-quality (-q:v) only
on Apple Silicon. On Intel Macs ffmpeg rejects it ("qscale not available
for encoder. Use -b:v bitrate instead") and the encode fails. (A user's
custom -b:v workaround was ineffective because -q:v still made the
encoder fail to open.)
Select the quality control by arch (per-slice in the universal binary):
-q:v on aarch64 (Apple Silicon), an average bitrate on x86_64 (Intel),
derived best-effort from output resolution/fps and the quality setting
(HEVC ~60% of H.264). The VideoToolbox test now asserts the right flag
per arch, so CI verifies both the Apple-Silicon and Intel jobs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A set of related codec/encoder fixes from this session.
Error reporting
vspipe ... SIGPIPE. When the encoder ffmpeg fails (e.g. an unavailable hardware encoder), vspipe dies with SIGPIPE on the closed pipe; the worker now checks ffmpeg's status first and includes the tail of its stderr, so users see e.g.Unknown encoder 'h264_qsv'. A vspipe SIGPIPE is treated as a benign downstream-closed symptom.Hardware encoder availability (UI)
HardwareEncoderDetectoris now aChangeNotifierthat, after the cheapffmpeg -encoderscompiled-in list, runs a throwaway one-frame encode per compiled-in hardware encoder to confirm it actually initializes on this machine. Probes run concurrently; the settings codec list shows a busy spinner per encoder while its probe is in flight, then resolves to selectable or disabled with a reason ("Not available in this build" vs "Not available on this system").Linux hardware encoding
deps-version.json+dependency_managergain optional per-platformversion/releaseTag. Linux bumped to 1.4.0 / deps-v1.4.0 (sha256/size null pending the rebuild); macOS/Windows stay on 1.3.0 and won't re-download.Intel-Mac VideoToolbox
-b:v(average bitrate) on Intel,-q:von Apple Silicon. VideoToolbox's constant-quality mode is Apple-Silicon only; on Intel-q:vmakes the encoder fail to open. Fixes a reported H.264/H.265 VideoToolbox failure on Intel Macs.Notes
-q:von the macOS-arm64 job and-b:von the x64 jobs.build-deps-linux.yml,deps-v1.4.0) and filllinux-x64/linux-arm64sha256+size indeps-version.json. macOS/Windows need nothing.🤖 Generated with Claude Code