Uh oh!
There was an error while loading. Please reload this page.
fix(ffmpeg): pin nv-codec-headers to n13.0.19.1 to restore NVENC on legacy driver branches - #769
Conversation
…egacy driver branches The nv-codec-headers submodule tracks master and had drifted to n13.1.15.0, which bakes a "Driver does not support the required nvenc API version. Required: 13.1" floor into libavcodec's h264_nvenc/hevc_nvenc. NVIDIA's legacy driver branches (e.g. 580.xx, the last branch supporting Pascal and older GPUs) are frozen at NVENC API 13.0 and can never reach the 610.00+ driver this requires, so NVENC silently regressed to software fallback for those cards on Linux. Pinning back to n13.0.19.1 (the same tag already used for one of Sunshine's three Windows NVENC SDK builds) restores compatibility with those drivers while still supporting current ones. Note: this submodule is updated by Dependabot on a daily cron (.github/dependabot.yml) with no ignore rule, so this pin will be proposed for reversion again unless a Dependabot ignore entry is also added for third-party/FFmpeg/nv-codec-headers in LizardByte/.github's central config. FixesLizardByte/Sunshine#5590
ReenigneArcher
commented
Sep 1, 2026
Thank you for the PR submission, but it looks like you used AI to create this PR. Please read and follow our Contributing guidelines and specifically our AI Usage policy. Additionally, please update the PR to use the correct template. You can find it at https://github.com/LizardByte/.github/blob/master/.github/pull_request_template.md?plain=1 |
MathiasOki
commented
Sep 2, 2026
@ReenigneArcher, Thanks for the note, I updated the description to use the correct template, with the AI Usage section filled in. |
ReenigneArcher
commented
Sep 2, 2026
Thanks for updating that. I'm not sure about rolling this back though. What do we lose by rolling back? And we certainly cannot stay locked to an old version forever. Unfortunately I don't think FFmpeg provides a way to dynamically select the SDK like we're doing with our Windows side NVENC encoder on Sunshine's side. |
I get the hesitation, and I don't want to come across as pushing an old version just for the sake of it. To give a bit of context on where I'm coming from: I'm on a Pascal-era card, on the 580.xx driver branch (the last one that supports it), and Sunshine/NVENC is genuinely one of the best pieces of software I'm able to use to play games from my PC to my TV. I wasn't hoping to get an exception forever, but was hoping to have some backwards compatibility running for some time forwards - without trying to hold the project back. I get that staying on the newest and following that often is for the best, but I believe I'm not the only one with old cards - especially now with the GPU prices. From what I can see, with the help from AI, there are no security issues with allowing this backwards compatibility, but again this type of software is not my strong suit. Here is some technical review I've done with the help of AI regarding this issue/PR: What does 13.1 actually add, and are we giving any of it up? I diffed the real headers between
None of these are used anywhere in the FFmpeg build here today. None of them are security fixes — they're new encoder features gated behind driver/GPU support that only reaches someone already on a driver new enough to report NVENC 13.1, which by definition isn't the legacy-driver users this PR is for. The struct changes are also backward-compatible (new fields land in what used to be reserved padding in 13.0), so nothing regresses for anyone already on current drivers. So as far as I can tell: this pin costs nothing today, for anyone — it's not newest-secure-version vs. old-insecure-version, it's newest-features vs. still-fully-supported. Why not stay locked forever Agreed that shouldn't happen by default. A couple of options that could keep it a deliberate, revisitable choice instead of a silent standoff with Dependabot:
On dynamic SDK selection You're right that FFmpeg doesn't support that the way Sunshine's Windows NVENC path does. It's a hard, unconditional check in FFmpeg itself ( if ((NVENCAPI_MAJOR_VERSION << 4 | NVENCAPI_MINOR_VERSION) >nvenc_max_ver) {
// "Driver does not support the required nvenc API version"
}It compares the compiled header version against what the driver reports and refuses to load if the driver is older, regardless of whether the features actually used would've worked fine. That's an upstream FFmpeg limitation, not something build-deps or nv-codec-headers can route around — so the header pin is genuinely the available fix here, not a shortcut around a better one. |



Description
The
nv-codec-headerssubmodule tracksmasterand had drifted ton13.1.15.0, which bakes aDriver does not support the required nvenc API version. Required: 13.1floor into FFmpeg'sh264_nvenc/hevc_nvencat compile time.NVIDIA's legacy driver branch (580.xx, the last branch supporting Pascal and older GPUs) is frozen at NVENC API 13.0 and can never reach the 610.00+ driver this requires, so NVENC on Linux silently falls back to software encoding on those cards.
This pins the submodule back to
n13.0.19.1, the same tag Sunshine already uses for one of its three Windows NVENC SDK builds, restoring NVENC on legacy drivers while keeping current-driver support.Related to LizardByte/Sunshine#5590, where LizardByte/Sunshine#5451 fixed this for Windows (Sunshine's own D3D11 NVENC path) but not Linux, since Linux NVENC goes through FFmpeg built here rather than Sunshine's own NVENC code. This PR doesn't fully close that issue by itself — Sunshine's
third-party/build-depssubmodule pointer will also need bumping once this merges.Note:
third-party/FFmpeg/nv-codec-headersis auto-updated by Dependabot on a daily cron with no ignore rule, so without an ignore entry in the central Dependabot config (LizardByte/.github), Dependabot will likely propose bumping this back ton13.1.15.0or later again.Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage
See our AI usage policy.