{"record":{"id":"ff3e518eaf2bb067","repo":"remotion-dev/remotion","slug":"could-not-find-library-dll-for-arch","errorCode":null,"errorMessage":"Could not find ${library} DLL for ${arch}","messagePattern":"Could not find (.+?) DLL for (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/compositor/build.ts","lineNumber":281,"sourceCode":"\t\t\t'windows-ffmpeg-linker',\n\t\t);\n\t\trmSync(windowsLinkerDirectory, {force: true, recursive: true});\n\t\tmkdirSync(windowsLinkerDirectory, {recursive: true});\n\n\t\tfor (const library of [\n\t\t\t'avcodec',\n\t\t\t'avdevice',\n\t\t\t'avfilter',\n\t\t\t'avformat',\n\t\t\t'avutil',\n\t\t\t'swresample',\n\t\t\t'swscale',\n\t\t]) {\n\t\t\tconst dll = filesInFfmpegFolder2.find(\n\t\t\t\t(file) => file.startsWith(`${library}-`) && file.endsWith('.dll'),\n\t\t\t);\n\t\t\tif (!dll) {\n\t\t\t\tthrow new Error(`Could not find ${library} DLL for ${arch}`);\n\t\t\t}\n\n\t\t\tsymlinkSync(\n\t\t\t\tpath.resolve(copyDestinations[arch].dir, dll),\n\t\t\t\tpath.join(windowsLinkerDirectory, `lib${library}.dll`),\n\t\t\t);\n\t\t}\n\t}\n\n\tconst command = `cargo build ${debug ? '' : '--release'} --target=${arch}`;\n\tconsole.log(command);\n\n\t// debuginfo will keep symbols, which are used for backtrace.\n\t// symbols makes it a tiny bit smaller, but error messages will be hard to debug.\n\n\tconst rPathOrigin = arch.includes('linux')\n\t\t? `-C link-args=-Wl,-rpath,'$ORIGIN'`\n\t\t: '';","sourceCodeStart":263,"sourceCodeEnd":299,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/compositor/build.ts#L263-L299","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Re-download/rebuild the FFmpeg Windows binaries so the archive contains all seven DLLs.","Inspect the extracted folder (compositor-win32-x64-msvc/ffmpeg) and confirm each 'av*-X.dll' / 'sw*-X.dll' is present.","If DLL naming changed, update the matching predicate (startsWith(`${library}-`) && endsWith('.dll')) in build.ts accordingly."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Sanity-check the extracted FFmpeg archive has every core DLL before linking.\nconst required = ['avcodec','avdevice','avfilter','avformat','avutil','swresample','swscale'];\nfor (const lib of required) {\n  const found = files.some((f) => f.startsWith(`${lib}-`) && f.endsWith('.dll'));\n  if (!found) throw new Error(`Missing ${lib} DLL in FFmpeg archive`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Rebuild/re-download the FFmpeg Windows binaries so all seven core DLLs are present.","Inspect compositor-win32-x64-msvc/ffmpeg after extraction.","Keep the DLL-name predicate in build.ts in sync with FFmpeg packaging changes."],"tags":["compositor","build","windows","ffmpeg","linker"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}