Skip to content
Open
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 .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ jobs:
keys:
- ffmpeg_source-windows
- run: sudo apt-get update
- run: sudo apt-get install -y yasm nasm mingw-w64 mingw-w64-tools libz-mingw-w64-dev clang build-essential zlib1g zlib1g-dev meson ninja-build autoconf automake libtool
- run: sudo apt-get install -y yasm nasm pkg-config mingw-w64 mingw-w64-tools libz-mingw-w64-dev clang build-essential zlib1g zlib1g-dev meson ninja-build autoconf automake libtool
- run: curl https://sh.rustup.rs -sSf | sh -s -- -y
- run: source "$HOME/.cargo/env" && rustup target add x86_64-pc-windows-gnu
- run: node clean.mjs
Expand Down
19 changes: 19 additions & 0 deletions compile-ffmpeg.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ execSync(
"--disable-debug",
"--enable-gpl",
"--enable-nonfree",
shouldEnableNvenc ? "--enable-ffnvcodec" : null,
shouldEnableNvenc ? "--enable-nvenc" : null,
"--disable-encoders",
"--enable-encoder=opus",
"--enable-encoder=aac",
Expand Down Expand Up @@ -320,6 +322,23 @@ execSync(
}
);

if (shouldEnableNvenc) {
const configMak = fs.readFileSync(
path.join("ffmpeg", "ffbuild", "config.mak"),
"utf8"
);
for (const config of [
"CONFIG_FFNVCODEC",
"CONFIG_NVENC",
"CONFIG_H264_NVENC_ENCODER",
"CONFIG_HEVC_NVENC_ENCODER",
]) {
if (!configMak.includes(`${config}=yes`)) {
throw new Error(`Expected FFmpeg configure to enable ${config}`);
}
}
}

execSync("make clean", {
cwd: "ffmpeg",
stdio: "inherit",
Expand Down
Loading