Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-deps-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Build macOS Deps
#
# - arm64 builds natively on macos-15 (Apple Silicon).
# - x64 builds natively on macos-15-intel (the last native Intel image,
# available until ~Aug 2027). FFmpeg comes pre-built from evermeet.cx and
# available until ~Aug 2027). FFmpeg comes pre-built from martin-riedl.de and
# most plugins from Stefan-Olt; see Scripts/download-deps-macos.sh.

on:
Expand Down
28 changes: 17 additions & 11 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ VapourBox/
./Scripts/download-deps-macos.sh

# macOS x64 (native, on an Intel Mac): same script — uname -m reports x86_64 so
# it targets deps/macos-x64. FFmpeg comes pre-built from evermeet.cx, most
# it targets deps/macos-x64. FFmpeg comes pre-built from martin-riedl.de, most
# plugins from Stefan-Olt; descratch/neo-f3kdb/nnedi3cl/vivtc/fmtconv build
# from source.
./scripts/download-deps-macos.sh
Expand Down Expand Up @@ -2759,14 +2759,16 @@ AV1 through SVT-AV1, its own family (`EncoderFamily::SvtAv1`, Dart
- **MP4 (default) and MKV only** (`VideoCodec::allows_container`, Dart
`supportsContainer`). FFmpeg refuses AV1 in MOV; AVI's `AV01` fourcc is
non-standard. The worker refuses either (`container_problem`).
- **Not in every bundled FFmpeg.** The macOS x64 build (evermeet) has no
`libsvtav1`. `HardwareEncoderDetector` checks every codec with
- **In every bundled FFmpeg, and asserted.** From deps 1.17.0-rc2 every
bundle has `libsvtav1` (task #45: macOS x64 moved from evermeet's FFmpeg,
which has none, to martin-riedl's). `download-deps-macos.sh` fails the build
without it (`assert_ffmpeg_encoder`, both arches), and
`vapoursynth_integration_test`'s `libsvtav1 is compiled in` checks every
bundle with no exception. The availability check stays for an FFmpeg
without it: `HardwareEncoderDetector` checks every codec with
`needsAvailabilityCheck` (hardware + AV1) and the panel shows AV1
unavailable; the worker refuses it before the pipeline starts
(`missing_encoder_problem`). `vapoursynth_integration_test`'s `libsvtav1 is
compiled in` checks every bundle, except macOS x64 (evermeet's FFmpeg, at
every deps version), and fails if that bundle gains it (drop the exception
then).
(`missing_encoder_problem`).
- **4:2:0 at 8 or 10 bits, converted in the script.**
`VideoJob::output_chroma_subsampling` is the one decision (script
`CHROMA_CONVERT`, encode and preview, and `encoder_input_pix_fmt`):
Expand Down Expand Up @@ -3302,9 +3304,13 @@ bundle at 1.16.0 or older, the known skew.
(docs/reports/2026-11-libdvdread-dvdcss).
- Worker sets: `PYTHONHOME`, `PYTHONPATH`, `VAPOURSYNTH_CONF_PATH`, `DYLD_LIBRARY_PATH`
- `vspipe` is a wrapper script that generates config dynamically.
- **FFmpeg** is a pre-built static binary linking only system frameworks: x64
from evermeet.cx, arm64 from martin-riedl.de (Homebrew's arm64 build is
dynamically linked to Homebrew dylibs and can't be bundled).
- **FFmpeg** is a pre-built static binary linking only system frameworks,
from martin-riedl.de on both arches (Homebrew's build is dynamically linked
to Homebrew dylibs and can't be bundled). x64 is pinned by build ID and
SHA-256 (`FFMPEG_MACOS_X64_BUILD`, minos 12.0); arm64 takes `latest` and is
series-checked. Both must have `libsvtav1`. x64 was evermeet.cx's build up
to deps 1.17.0-rc1, which has no SVT-AV1 (task #45,
docs/reports/task-45-macos-x64-ffmpeg-svtav1).
- **x64 minimum macOS = 12.0 (Monterey), issue #39**: the only hosted Intel
runner is `macos-15-intel`, so the x64 build exports
`MACOSX_DEPLOYMENT_TARGET=12.0` and builds bundled support libs from source
Expand Down Expand Up @@ -3637,4 +3643,4 @@ Full write-ups (root causes, measurements) for each entry are in
| 1.14.0 | 2026-10-25 | Adds **RIFE** 4.26 (`r9_mod_v33`, MIT) + its model in `vapoursynth/rife/`, and **VSNCNN** (vs-mlrt v15.16, GPL-3.0) + Real-ESRGAN / Real-CUGAN models in `vapoursynth/ncnn/`, on macos-arm64, windows-x64 and linux-x64, with **MoltenVK** 1.4.2 (Apache-2.0) in `vapoursynth/moltenvk/` on macOS. Not autoloaded; see "GPU Plugins". **BM3D** r12 (MIT) on every platform; it had been macOS arm64 only (see "BM3D and KNLMeans Noise Reduction"). **descale** r12 (MIT) on every platform, for the Descale pass. (AnimeJaNai's models, used by the same VSNCNN, are an app add-on, not in the bundle). Published as the tested `deps-v1.14.0-rc1` bundles with only the version changed; every other file is byte-identical |
| 1.15.0 | 2026-11-03 | **Issue #144**: KNLMeansCL moves to Jaded Encoding Thaumaturgy's fork **v1.3** on every platform (Windows: PyPI wheel, replacing Khanattila's 2018 v1.1.1 zip, which refused 10-bit 4:2:0; macOS/Linux: the `v1.3` tag, replacing unpinned master, which gave unrepeatable results on Apple's OpenCL). Both meson patchers learn v1.3's assigned `run_command` include probe. Published as the tested `deps-v1.15.0-rc1` bundles with only the version changed |
| 1.16.0 | 2026-11-09 | **vszip 22.1.0 → 24.0.0** on every platform (CPU `NLMeans` for Noise Reduction's NLMeans (CPU) and the vine dehalo; macOS x64 sdist now built with Zig 0.17.0). Adds **SangNom** r45 (PyPI wheels; MIT source, GPL-2.0 binaries) on every platform for Anti-aliasing's SangNom method. Both single-file on x64 (no AVX), so `_tierFiles` is unchanged. **rc2: the AI models leave the bundle** — RIFE 4.26's (now the `frame-rate-rife` add-on) and the Real-ESRGAN anime / Real-CUGAN ones (now `upscale-anime`); the plugins stay, and their probes run stand-in models. Published as the tested `deps-v1.16.0-rc2` bundles with only the version changed (`Scripts/promote-deps-rc.py`) |
| 1.17.0 | rc1 2026-11-15 | **Task #36**: macOS arm64 libdvdread built from 6.1.3 source (patched to find a user's libdvdcss in `/opt/homebrew/lib`, `/usr/local/lib`, `/opt/local/lib`) instead of Homebrew's bottle, which linked `/opt/homebrew/opt/libdvdcss/…` and failed to load on Macs without it; macOS x64 gets the same patched build. Absolute build-machine rpaths stripped from libvapoursynth, vapoursynth.abi3.so, libfftw3f*, libboost_charconv, bm3d, dctfilter and mvtools (inert: nothing used `@rpath`). Windows and Linux binaries unchanged; libdvdread is now a required file on every platform |
| 1.17.0 | rc1 2026-11-15, rc2 2026-11-16 | **Task #36**: macOS arm64 libdvdread built from 6.1.3 source (patched to find a user's libdvdcss in `/opt/homebrew/lib`, `/usr/local/lib`, `/opt/local/lib`) instead of Homebrew's bottle, which linked `/opt/homebrew/opt/libdvdcss/…` and failed to load on Macs without it; macOS x64 gets the same patched build. Absolute build-machine rpaths stripped from libvapoursynth, vapoursynth.abi3.so, libfftw3f*, libboost_charconv, bm3d, dctfilter and mvtools (inert: nothing used `@rpath`). Windows and Linux binaries unchanged; libdvdread is now a required file on every platform. **rc2** (task #45): macOS x64 FFmpeg evermeet 9.0.1 → martin-riedl 9.0.2 (build 1789931006, pinned by SHA-256), which has SVT-AV1, so AV1 output works on Intel Macs; x264/x265/MP3 bitstreams change there, native codecs byte-identical |
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Where an AppImage can't be mounted, use the `.tar.gz` of the same build: extract

| | |
|---|---|
| **Video** | H.264, H.265, AV1 (SVT-AV1, in MP4 or MKV, 8- or 10-bit 4:2:0; other formats are converted to fit, field by field; not yet on Intel Macs), ProRes (Proxy to 4444 XQ), uncompressed 10-bit 4:2:2 (v210, for Premiere and Resolve: MOV is the container to choose), FFV1, HuffYUV or FFVHuff (lossless); hardware encoding via VideoToolbox, NVENC, Quick Sync or AMF. ProRes and v210 store their own colour format (10-bit 4:2:2, or 4:4:4 for ProRes 4444), converted field by field from an interlaced source. A picture left interlaced is flagged with its field order by ProRes, v210, FFV1, HuffYUV and FFVHuff in MOV and MKV (in AVI only FFV1 keeps it), and H.264 codes it as interlaced; H.265, AV1 and the hardware encoders cannot, and the job log says so |
| **Video** | H.264, H.265, AV1 (SVT-AV1, in MP4 or MKV, 8- or 10-bit 4:2:0; other formats are converted to fit, field by field), ProRes (Proxy to 4444 XQ), uncompressed 10-bit 4:2:2 (v210, for Premiere and Resolve: MOV is the container to choose), FFV1, HuffYUV or FFVHuff (lossless); hardware encoding via VideoToolbox, NVENC, Quick Sync or AMF. ProRes and v210 store their own colour format (10-bit 4:2:2, or 4:4:4 for ProRes 4444), converted field by field from an interlaced source. A picture left interlaced is flagged with its field order by ProRes, v210, FFV1, HuffYUV and FFVHuff in MOV and MKV (in AVI only FFV1 keeps it), and H.264 codes it as interlaced; H.265, AV1 and the hardware encoders cannot, and the job log says so |
| **Audio** | Passthrough; AAC, MP3, AC-3, Opus, FLAC or uncompressed PCM (Opus can't go into AVI or MOV, nor FLAC into MOV); or none |
| **Containers** | MKV, MP4, MOV, AVI |
| **Reads** | `.dv` · `.mts` `.m2ts` · `.vob` `.m2v` `.mpg` `.mpeg` · `.mxf` · `.avi` `.mov` `.mp4` `.mkv` `.ts` `.wmv` `.webm` `.flv`, DVD discs and `VIDEO_TS` folders |
Expand Down Expand Up @@ -319,8 +319,7 @@ Components taken pre-built rather than compiled from source come unmodified from

- **[yuygfgg/Macos_vapoursynth_plugins](https://github.com/yuygfgg/Macos_vapoursynth_plugins)** — ARM64 VapourSynth plugins for macOS
- **[Stefan-Olt/vs-plugin-build](https://github.com/Stefan-Olt/vs-plugin-build)** — cross-platform VapourSynth plugins: most of the Intel Mac build's plugins, TemporalMedian and RemoveDirt on Apple Silicon, and RemoveDirt and LGhost on Linux x64
- **[evermeet.cx](https://evermeet.cx/ffmpeg/)** — static FFmpeg for Intel Macs
- **[ffmpeg.martin-riedl.de](https://ffmpeg.martin-riedl.de)** — static FFmpeg for Apple Silicon
- **[ffmpeg.martin-riedl.de](https://ffmpeg.martin-riedl.de)** — static FFmpeg for Apple Silicon and Intel Macs
- **[BtbN/FFmpeg-Builds](https://github.com/BtbN/FFmpeg-Builds)** — static FFmpeg for Windows and Linux
- **[python-build-standalone](https://github.com/astral-sh/python-build-standalone)** — the relocatable Python used on macOS and Linux
- **[python.org](https://www.python.org/downloads/windows/)** — the embeddable Python used on Windows
Expand Down
2 changes: 1 addition & 1 deletion Scripts/build-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ echo ""

echo "=== Step 4: Download FFmpeg ==="
echo "Download a static FFmpeg build for macOS:"
echo " https://evermeet.cx/ffmpeg/"
echo " https://ffmpeg.martin-riedl.de"
echo ""
echo "Or build from source with required codecs."
echo "Place ffmpeg and ffprobe in: $DEPS_DIR/FFmpeg/"
Expand Down
77 changes: 51 additions & 26 deletions Scripts/download-deps-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ fi
# -mmacosx-version-min, meson's auto-detection, and CMake's CMAKE_OSX_DEPLOYMENT_TARGET
# fallback) target this floor. Override with $MACOS_MIN_VERSION if needed.
# NOTE: this does NOT retarget prebuilt artifacts the script merely copies
# (Homebrew bottles, evermeet ffmpeg, python-build-standalone, Stefan-Olt plugins) —
# (Homebrew bottles, martin-riedl ffmpeg, python-build-standalone, Stefan-Olt plugins) —
# the minos verification guard near the end of this script reports those.
if [ "$ARCH" = "x86_64" ]; then
MACOS_MIN_VERSION="${MACOS_MIN_VERSION:-12.0}" # Monterey
Expand Down Expand Up @@ -162,10 +162,14 @@ PYTHON_VERSION="3.12.8"
# A per-OS FFmpeg is a per-OS encoder: the arguments in pipeline_executor.rs
# would then mean subtly different things depending on where the job ran.
FFMPEG_SERIES="9.0"
# The exact evermeet build for x64. Full version rather than series because
# evermeet publishes per-version URLs and keeps them reachable; must be within
# $FFMPEG_SERIES, which assert_ffmpeg_series checks.
FFMPEG_MACOS_X64_VERSION="9.0.1"
# The exact martin-riedl.de build for x64, by build ID (<id>_<version>) and
# SHA-256. The host keeps every build-ID URL reachable (verified back to its
# 5.0 builds from 2022), so an exact pin is durable. The version after the
# underscore must be within $FFMPEG_SERIES, which assert_ffmpeg_series checks
# and app/test/ffmpeg_version_pin_test.dart reads.
FFMPEG_MACOS_X64_BUILD="1789931006_9.0.2"
FFMPEG_MACOS_X64_FFMPEG_SHA256="7c6b4125b191cbf773832dc51f424cf2b6bb7da43007d1e066f95909e47cacd4"
FFMPEG_MACOS_X64_FFPROBE_SHA256="2322438ed2f6319a691291b247d09c69dcaa3a982460d1f269a7e1af335cfdfd"

# Fail the build if the FFmpeg we installed is not the series we pinned.
# Without this, an upstream that moves `latest` onto a new series reintroduces
Expand All @@ -191,6 +195,28 @@ assert_ffmpeg_series() {
fi
echo " FFmpeg $reported (matches the pinned $FFMPEG_SERIES series)"
}

# Fail the build if the installed FFmpeg lacks an encoder the app offers on
# every platform. Task #45: deps <= 1.17.0-rc1 shipped evermeet's x64 FFmpeg,
# which has no libsvtav1, so AV1 output was silently unavailable on Intel Macs.
assert_ffmpeg_encoder() {
local bin="$1" encoder="$2"
if ! "$bin" -hide_banner -encoders 2>/dev/null | grep -qE "^ *V[^ ]* +${encoder} "; then
echo " ERROR: $bin has no $encoder encoder." >&2
exit 1
fi
echo " FFmpeg has the $encoder encoder"
}

# Download a URL and check it against a pinned SHA-256.
fetch_sha256() {
local url="$1" out="$2" sha="$3"
curl -fsSL --retry 8 --retry-delay 30 --retry-max-time 600 "$url" -o "$out"
if ! echo "$sha $out" | shasum -a 256 -c - >/dev/null; then
echo " ERROR: $url does not match its pinned SHA-256 ($sha)." >&2
exit 1
fi
}
PYTHON_MAJOR_MINOR="3.12"

echo "=== VapourBox macOS Dependencies Builder ==="
Expand Down Expand Up @@ -226,7 +252,7 @@ BREW_DEPS=(
# absolute path (task #36). It is built from source below.
fftw boost
# FFmpeg (build-time convenience only; at runtime both arches ship static
# ffmpeg downloaded from evermeet.cx (x64) / martin-riedl.de (arm64))
# ffmpeg downloaded from martin-riedl.de)
ffmpeg
)

Expand Down Expand Up @@ -662,38 +688,36 @@ fi
echo ""
echo "=== Installing FFmpeg ==="
if [ "$ARCH" = "x86_64" ]; then
# evermeet.cx ships static x86_64 ffmpeg/ffprobe that link only system
# frameworks (verified self-contained), so no dylib wrangling is needed.
# This is the canonical pre-built source for Intel macOS ffmpeg.
#
# Pinned to an exact version rather than `getrelease`, which is whatever is
# newest and would silently drift onto a different series from the other
# platforms. evermeet keeps old versions reachable (verified: 7.1, 8.0 and
# 9.0.1 all still resolve), so a full-version pin is durable here — unlike
# BtbN, whose rolling tag garbage-collects old series.
# martin-riedl.de's static x86_64 release build: links only system
# frameworks and /usr/lib, minos 12.0 (our floor), and has SVT-AV1, from the
# same build run as the arm64 binary below. Until deps 1.17.0-rc1 this was
# evermeet.cx's build, which has no libsvtav1, so AV1 output was unavailable
# on Intel Macs (task #45, docs/reports/task-45-macos-x64-ffmpeg-svtav1).
#
# evermeet rate-limits GitHub's runner address range: on 2026-10-17 both x64
# jobs got HTTP 429 on two consecutive runs while the same URLs answered
# normally from elsewhere. curl treats 429 as transient under --retry and
# honours Retry-After, so back off rather than fail the whole deps build.
echo " Downloading static x86_64 FFmpeg $FFMPEG_MACOS_X64_VERSION from evermeet.cx..."
EVERMEET_RETRY=(--retry 8 --retry-delay 30 --retry-max-time 600)
curl -fsSL "${EVERMEET_RETRY[@]}" "https://evermeet.cx/ffmpeg/ffmpeg-${FFMPEG_MACOS_X64_VERSION}.zip" -o "$BUILD_DIR/ffmpeg.zip"
curl -fsSL "${EVERMEET_RETRY[@]}" "https://evermeet.cx/ffmpeg/ffprobe-${FFMPEG_MACOS_X64_VERSION}.zip" -o "$BUILD_DIR/ffprobe.zip"
# Pinned by build ID and SHA-256 rather than `latest`: the host keeps every
# build-ID URL, and an exact pin means a rebuilt bundle gets the same FFmpeg.
# --retry: GitHub's runner range has been rate limited by FFmpeg hosts
# before (evermeet, HTTP 429 on 2026-10-17); curl backs off on 429.
echo " Downloading static x86_64 FFmpeg $FFMPEG_MACOS_X64_BUILD from martin-riedl.de..."
FFMPEG_X64_BASE="https://ffmpeg.martin-riedl.de/download/macos/amd64/$FFMPEG_MACOS_X64_BUILD"
fetch_sha256 "$FFMPEG_X64_BASE/ffmpeg.zip" "$BUILD_DIR/ffmpeg.zip" "$FFMPEG_MACOS_X64_FFMPEG_SHA256"
fetch_sha256 "$FFMPEG_X64_BASE/ffprobe.zip" "$BUILD_DIR/ffprobe.zip" "$FFMPEG_MACOS_X64_FFPROBE_SHA256"
unzip -q -o "$BUILD_DIR/ffmpeg.zip" -d "$DEPS_DIR/ffmpeg/"
unzip -q -o "$BUILD_DIR/ffprobe.zip" -d "$DEPS_DIR/ffmpeg/"
chmod +x "$DEPS_DIR/ffmpeg/ffmpeg" "$DEPS_DIR/ffmpeg/ffprobe"
# Replaces the host's own (hardened-runtime) signature, as on arm64.
codesign -s - -f "$DEPS_DIR/ffmpeg/ffmpeg" 2>/dev/null || true
codesign -s - -f "$DEPS_DIR/ffmpeg/ffprobe" 2>/dev/null || true
assert_ffmpeg_series "$DEPS_DIR/ffmpeg/ffmpeg"
echo " Installed evermeet.cx FFmpeg"
assert_ffmpeg_encoder "$DEPS_DIR/ffmpeg/ffmpeg" libsvtav1
echo " Installed martin-riedl.de FFmpeg (x86_64)"
else
# arm64: Homebrew's ffmpeg is dynamically linked against ~17 Homebrew dylibs
# (/opt/homebrew/Cellar/ffmpeg/.../lib*, x264, x265, dav1d, openssl, ...), so
# copying just the binary yields a bundle that won't run on users' Macs.
# Use the static arm64 build from martin-riedl.de (links only system
# frameworks, ~60 MB) - the same source the 1.3.0 deps shipped, and the
# arm64 analogue of the evermeet.cx static build used for x64 above.
# same host as the x64 build above.
echo " Downloading static arm64 FFmpeg from martin-riedl.de..."
#
# This host only publishes `latest` plus opaque build-id paths whose
Expand All @@ -709,6 +733,7 @@ else
codesign -s - -f "$DEPS_DIR/ffmpeg/ffmpeg" 2>/dev/null || true
codesign -s - -f "$DEPS_DIR/ffmpeg/ffprobe" 2>/dev/null || true
assert_ffmpeg_series "$DEPS_DIR/ffmpeg/ffmpeg"
assert_ffmpeg_encoder "$DEPS_DIR/ffmpeg/ffmpeg" libsvtav1
echo " Installed static arm64 FFmpeg from martin-riedl.de"
fi

Expand Down Expand Up @@ -3170,7 +3195,7 @@ else
echo " - Homebrew bottles (zimg/fftw/boost): the macos-15 runner"
echo " installs Sequoia bottles. Build these from source with the target set,"
echo " or fetch older-OS bottles."
echo " - ffmpeg (evermeet.cx / martin-riedl.de) and Python (python-build-standalone):"
echo " - ffmpeg (martin-riedl.de) and Python (python-build-standalone):"
echo " pick a download whose minos is <= $MACOS_MIN_VERSION."
echo " - Stefan-Olt / yuygfgg prebuilt plugins: rebuild from source if too new."
echo ""
Expand Down
6 changes: 3 additions & 3 deletions app/assets/deps-version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": "1.17.0-rc1",
"releaseTag": "deps-v1.17.0-rc1",
"releaseDate": "2026-11-15",
"version": "1.17.0-rc2",
"releaseTag": "deps-v1.17.0-rc2",
"releaseDate": "2026-11-16",
"tierFormat": "delta",
"githubRepo": "StuartCameronCode/VapourBox"
}
2 changes: 1 addition & 1 deletion app/test/av1_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ void main() {

test('unavailable when libsvtav1 is not in the listing', () {
final detector = HardwareEncoderDetector.instance;
// The macOS x64 (evermeet) FFmpeg: libaom only.
// An FFmpeg built without SVT-AV1 (libaom only).
detector.debugSetEncoderListing('''
V....D libx264 libx264 H.264 / AVC / MPEG-4 AVC (codec h264)
V....D libx265 libx265 H.265 / HEVC (codec hevc)
Expand Down
Loading
Loading