Refreshing the In-Tree FFmpeg Patch Series¶
The fork's FFmpeg integration is a stack of patches under ffmpeg-patches/series.txt, applied on top of upstream FFmpeg n8.1 (per ADR-0118). The stack drifts as upstream FFmpeg moves and as fork-side libvmaf surfaces change (CLAUDE.md §12 r14).
Refreshing the stack means:
- Replay the patches against a clean
n8.1checkout to verify the stack still applies cleanly. - Resolve any conflicts that fall out of upstream churn.
- Re-export the patch files from the rebased branch.
- Land the refresh in tree alongside an entry in
docs/rebase-notes.md.
The most recent refresh is documented in ADR-0277. The /refresh-ffmpeg-patches skill (declared in CLAUDE.md §7) automates the replay step.
Preconditions¶
- Keep a clean FFmpeg checkout available at the upstream tag the fork currently targets (
n8.1unless a newer ADR says otherwise). - Start from a clean VMAF branch; refresh PRs should contain the patch stack delta and the required notes, not unrelated source changes.
- Read
docs/rebase-notes.mdbefore resolving conflicts. Several patch hunks mirror fork-local libvmaf API surfaces.
Refresh Steps¶
- Reset the FFmpeg checkout to the target tag:
- Apply the current series cumulatively:
- Resolve conflicts inside the FFmpeg checkout and continue
git am. - Export the refreshed commits back into
ffmpeg-patches/in series order. - Update
ffmpeg-patches/series.txtif the patch list changed. - Add a changelog fragment and a rebase-note entry describing the refreshed surface.
Verification¶
The correct gate is a cumulative-state replay, not per-patch git apply --check — patches 0002 … 0006 build on each other and standalone-apply cleanly only against the cumulative state from earlier patches:
git -C /path/to/ffmpeg-8 reset --hard n8.1
for p in ffmpeg-patches/000*-*.patch; do
git -C /path/to/ffmpeg-8 am --3way "$p" || break
done
See also¶
docs/usage/ffmpeg.md— the user-facing FFmpeg-with-libvmaf doc.- ADR-0118 — the series.txt model.
- ADR-0277 — most recent refresh log.
docs/rebase-notes.md— fork-wide rebase log.