Skip to content

Add NVENC (h264_nvenc, hevc_nvenc) encoder support for Linux builds#17

Open
JonnyBurger wants to merge 3 commits into
mainfrom
jonnyburger/pr-16-circleci
Open

Add NVENC (h264_nvenc, hevc_nvenc) encoder support for Linux builds#17
JonnyBurger wants to merge 3 commits into
mainfrom
jonnyburger/pr-16-circleci

Conversation

@JonnyBurger
Copy link
Copy Markdown
Member

This PR copies the changes from #16 so CircleCI runs on a branch owned by a maintainer account.\n\nOriginal PR: #16

@willy-scr
Copy link
Copy Markdown

Hi @JonnyBurger, I noticed the CircleCI Linux builds failed on this PR (build-linux-x64-gnu, build-linux-x64-musl, build-linux-arm-gnu, build-linux-arm-musl all failed).

I can't access the CircleCI logs directly — could you share what the error was?

My best guess is either:

  1. nv-codec-headers git clone failed in the Docker container
  2. make install PREFIX=remotion failed (maybe needs SUDO or different make flags)
  3. FFmpeg configure couldn't find the ffnvcodec pkg-config file

Happy to fix once I know the error!

@willy-scr
Copy link
Copy Markdown

The CI build fails because compile-nvenc.mjs references a non-existent tag:

const NV_CODEC_HEADERS_TAG = "n12.2.16.0";

Tag n12.2.16.0 does not exist in FFmpeg/nv-codec-headers. Fix:

- const NV_CODEC_HEADERS_TAG = "n12.2.16.0";
+ const NV_CODEC_HEADERS_TAG = "n12.2.72.0";

n12.2.72.0 is the latest 12.x release, compatible with FFmpeg n7.1.

Already fixed on my fork's branch (willy-scr:feature/nvenc) — see commit 935216f.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@willy-scr
Copy link
Copy Markdown

@JonnyBurger This PR is ready to merge — all 6 CI checks are passing and mergeable_state is clean.

As noted in remotion-dev/remotion#7733, the rebuilt binary has --enable-encoder=h264_nvenc in the config string but the actual NVENC encoders are missing from libavcodec.so because the nv-codec-headers tag was still broken when the binary was built. Merging this PR first and then rebuilding the binaries should fix that.

The previous `make install PREFIX=remotion` ran with cwd=nv-codec-headers,
so headers were installed into nv-codec-headers/remotion/, not the
top-level ./remotion/ that FFmpeg's PKG_CONFIG_PATH points at. As a
result pkg-config could not find ffnvcodec.pc and FFmpeg silently
disabled h264_nvenc and hevc_nvenc with:

  WARNING: Disabled h264_nvenc_encoder because not all dependencies are satisfied: nvenc
  WARNING: Disabled hevc_nvenc_encoder because not all dependencies are satisfied: nvenc

Use an absolute install prefix so the headers land where FFmpeg looks.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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