Skip to content

externals: FFmpeg with AV1 on MinGW Windows - #675

Closed
Duck912 wants to merge 1 commit into
nx2-experimentalfrom
fix/mingw-ffmpeg-av1
Closed

Duck912 wants to merge 1 commit into
nx2-experimentalfrom
fix/mingw-ffmpeg-av1

Conversation

@Duck912

@Duck912 Duck912 commented Nov 6, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

The PGO builds (windows-x86_64-pgo, MinGW) couldn't play AV1 movies: their FFmpeg has no AV1 decoder, so Switch 2 movies like the Ocarina of Time title screen and the Fire Emblem cutscenes stayed black. The MSVC and Linux builds already play them.

  • MinGW now gets the same FFmpeg as the MSVC and Linux builds: same version and settings, plus the dav1d AV1 decoder.
  • The package is a release in this repo: 9.0.2-av1-mingw-1. It's a pre-release, never "latest", and the cleanup jobs don't touch it (they only remove daily-* and branch-* releases). Its notes list the sources, licenses and build script.
  • Other platforms are unchanged.

Type of change

  • Bug fix
  • Game compatibility / game-support
  • Performance
  • New feature
  • Refactor / cleanup
  • CI / build
  • Documentation

Related issues

Follows 959973a (FFmpeg with AV1 on Windows MSVC and Linux).

Testing

  • Tested on Windows
  • Tested on Linux
  • Tested on macOS
  • Tested on NVIDIA
  • Tested on AMD
  • Tested on Intel

Games tested:

The Legend of Zelda: Ocarina of Time (local MinGW clang PGO build, RTX 5080): the title screen movie plays. Before, it stayed black and the log said FFmpeg has no decoder for "video/av1".

Checklist

  • I built it locally and it compiles without new warnings
  • I did not add any copyrighted game data, keys or firmware
  • Docs updated if needed
  • I added AI Disclosure if one was used

Screenshots / logs

Before: nx2 video: FFmpeg has no decoder for "video/av1"
After: Using decoder libdav1d, nx2 video: decoder for "video/av1" open

I used Claude Opus 5.5 to help debug this, build the package and draft the text.

Summary by CodeRabbit

  • New Features
    • MinGW builds for 64-bit AMD processors now use an FFmpeg package with AV1 support, aligning their video capabilities with other supported 64-bit platforms. Other build configurations continue to use their existing FFmpeg packages. This update affects the software included in these builds; it does not change the experience or available features for other configurations.

The MinGW builds (windows-x86_64-pgo) still used crueter-ci's FFmpeg,
which has no AV1 decoder, so Switch 2 movies in AV1 (Fire Emblem:
Fortune's Weave, the Ocarina of Time title screen) played black there
while the MSVC and Linux builds play them since 959973a. The log
showed nx2 video: FFmpeg has no decoder for "video/av1".

MinGW amd64 now uses the same FFmpeg as Takoroka/ffmpeg-av1 9.0.2-av1-1:
FFmpeg 946fcce07b with crueter-ci's patch and configure flags, plus
libdav1d 1.5.4 (MSYS2's static build) merged into libavcodec. The
package is a release of this repository (9.0.2-av1-mingw-1); its README
lists the sources and flags and it includes the build script. MSYS2's
dav1d is built with -fstack-protector-strong and _FORTIFY_SOURCE, so the
package also links mingw-w64's static libssp. ARM64 MinGW keeps
crueter-ci's package.

Tested on a local MinGW clang PGO build (RTX 5080), Ocarina of Time,
30 s from boot with no input: "Using decoder libdav1d" and the title
screen's AV1 movie plays; before, the decoder failed to open and the
frames stayed black. The binary links without new DLLs.

Assisted-by: Claude Opus 5.5 (debugging, package build, implementation, drafting)
Signed-off-by: Duck912 <350528965+Duck912@users.noreply.github.com>
@github-actions
github-actions Bot changed the base branch from nx2 to nx2-experimental November 6, 2026 06:03
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

Retargeted to nx2-experimental for pre-build testing. It will be promoted to nx2 after validation.

@coderabbitai

coderabbitai Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The FFmpeg dependency configuration adds an AV1-enabled package for MinGW AMD64. CMake selects this package for MinGW AMD64 builds. The existing package selections for MSVC, Linux AMD64, and other configurations remain unchanged.

Changes: MinGW AV1 package selection

Layer / File(s) Summary
Define and select the MinGW AV1 package
cpmfile.json, externals/ffmpeg/CMakeLists.txt
The dependency configuration adds ffmpeg-ci-av1-mingw. CMake selects it for MinGW AMD64 builds. MSVC and Linux AMD64 continue to use ffmpeg-ci-av1; other configurations continue to use ffmpeg-ci.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Possibly related issues

  • Djihads80/Eglantine issue 656: The issue reports a missing AV1 decoder for the Ocarina of Time intro on MinGW. This change selects an AV1-enabled FFmpeg package for MinGW AMD64.

Possibly related PRs

  • Djihads80/Eglantine#380: Both changes select an AV1-capable FFmpeg package for MinGW AMD64.
  • Djihads80/Eglantine#550: Both changes provide dav1d support for MinGW FFmpeg builds; this change selects a prebuilt package.
  • Djihads80/Eglantine#503: Both changes relate to AV1 decoding support; this change supplies libdav1d through FFmpeg for MinGW AMD64.

Suggested labels: bug

Suggested reviewers: takoroka

Merge Risk: Minimal · up to ed6e2

MinGW amd64 builds now fetch an FFmpeg package with AV1 decoding, while other platforms keep their existing packages. The change is small configuration selection, and no concrete merge-blocking defect was established.

Architecture risk: Low · up to ed6e2

The change affects 2 systems.

Changed systems: cpmfile.json, externals

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — cpmfile.json (service) was modified; 1 changed file maps to changed impact.
  • observed — externals (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in cpmfile.json: Adds the ffmpeg-ci-av1-mingw dependency configuration with CI enabled, package name FFmpeg, repository Djihads80/Eglantine, and version 9.0.2-av1-mingw-1.
  • observed — Modified behavior in externals/ffmpeg/CMakeLists.txt: The bundled-package comment now includes MinGW, and an elseif branch selects ffmpeg-ci-av1-mingw for MinGW AMD64. The existing MSVC/Linux AMD64 selection of ffmpeg-ci-av1 and the fallback package selection remain unchanged.
Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly describes the addition of FFmpeg with AV1 support for MinGW Windows builds.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (2 skipped: 2 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ef4dcf57-d631-4d79-a348-5c6c6105367b
Commits

Reviewing files that changed from the base of the PR and between 0ca2032 and ed6e20e.

Files selected for processing: 2

  • cpmfile.json
  • externals/ffmpeg/CMakeLists.txt

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@kraibse

kraibse commented Nov 6, 2026

Copy link
Copy Markdown
Collaborator

This was added to this branch already.
Refer to your commit from earlier today which was integrated today.

@kraibse kraibse closed this Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants