remotion-dev/remotion · error · Error

Could not find ${library} DLL for ${arch}

Error message

Could not find ${library} DLL for ${arch}

What it means

Thrown during the Windows (x86_64-pc-windows-gnu) cross-compile when one of the required FFmpeg DLLs (avcodec, avdevice, avfilter, avformat, avutil, swresample, swscale) cannot be found in the extracted FFmpeg archive. The build expects a versioned '<library>-*.dll' for each, which it symlinks as 'lib<library>.dll' for the GNU linker, so a missing DLL aborts the build before the link step.

Source

Thrown at packages/compositor/build.ts:281

			'windows-ffmpeg-linker',
		);
		rmSync(windowsLinkerDirectory, {force: true, recursive: true});
		mkdirSync(windowsLinkerDirectory, {recursive: true});

		for (const library of [
			'avcodec',
			'avdevice',
			'avfilter',
			'avformat',
			'avutil',
			'swresample',
			'swscale',
		]) {
			const dll = filesInFfmpegFolder2.find(
				(file) => file.startsWith(`${library}-`) && file.endsWith('.dll'),
			);
			if (!dll) {
				throw new Error(`Could not find ${library} DLL for ${arch}`);
			}

			symlinkSync(
				path.resolve(copyDestinations[arch].dir, dll),
				path.join(windowsLinkerDirectory, `lib${library}.dll`),
			);
		}
	}

	const command = `cargo build ${debug ? '' : '--release'} --target=${arch}`;
	console.log(command);

	// debuginfo will keep symbols, which are used for backtrace.
	// symbols makes it a tiny bit smaller, but error messages will be hard to debug.

	const rPathOrigin = arch.includes('linux')
		? `-C link-args=-Wl,-rpath,'$ORIGIN'`
		: '';

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Re-download/rebuild the FFmpeg Windows binaries so the archive contains all seven DLLs.
  2. Inspect the extracted folder (compositor-win32-x64-msvc/ffmpeg) and confirm each 'av*-X.dll' / 'sw*-X.dll' is present.
  3. If DLL naming changed, update the matching predicate (startsWith(`${library}-`) && endsWith('.dll')) in build.ts accordingly.
Defensive patterns

Strategy: validation

Validate before calling

// Sanity-check the extracted FFmpeg archive has every core DLL before linking.
const required = ['avcodec','avdevice','avfilter','avformat','avutil','swresample','swscale'];
for (const lib of required) {
  const found = files.some((f) => f.startsWith(`${lib}-`) && f.endsWith('.dll'));
  if (!found) throw new Error(`Missing ${lib} DLL in FFmpeg archive`);
}

Prevention

When it happens

Trigger: Building the Windows compositor target from an FFmpeg binary archive that is incomplete, has a different naming scheme, or was extracted/packed incorrectly so that one of the seven core FFmpeg DLLs is absent.

Common situations: An outdated or partial ffmpeg-sys-next zip in the binaries directory; a regen of the FFmpeg binaries that dropped a library; a packaging change that altered DLL naming so the '<library>-' prefix match no longer hits.

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/ff3e518eaf2bb067. Report an issue: GitHub.