{"record":{"id":"f8e8858ffd6f36bc","repo":"nilaoda/N_m3u8DL-RE","slug":"resstring-mp4decryptnotfound","errorCode":null,"errorMessage":"ResString.mp4decryptNotFound","messagePattern":"ResString\\.mp4decryptNotFound","errorType":"exception","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"src/N_m3u8DL-RE/Program.cs","lineNumber":171,"sourceCode":"case DecryptEngine.MP4DECRYPT:\n{\n    var file = GlobalUtil.FindExecutable(\"mp4decrypt\");\n    if (file == null) throw new FileNotFoundException(ResString.mp4decryptNotFound);\n    option.DecryptionBinaryPath = file;\n    Logger.Extra($\"mp4decrypt => {option.DecryptionBinaryPath}\");\n    break;\n}\ncase DecryptEngine.FFMPEG:\ndefault:\n    option.DecryptionBinaryPath = option.FFmpegBinaryPath;\n    break;\n}\n}","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/nilaoda/N_m3u8DL-RE/blob/e113dee70c924ee08dae5460624909b04d84cb76/src/N_m3u8DL-RE/Program.cs#L153-L189","documentation":"Startup pre-check in DoWorkAsync: the run requested encrypted-stream decryption (Keys or KeyTextFile given) with DecryptionEngine set to MP4DECRYPT, but the mp4decrypt executable could not be located on PATH (GlobalUtil.FindExecutable returned null) and no usable DecryptionBinaryPath was supplied. The tool aborts before downloading rather than failing mid-decrypt.","triggerScenarios":"User supplies decryption keys (--key/--key-text-file) with the mp4decrypt engine selected while mp4decrypt is neither on PATH nor explicitly given via --decryption-binary-path, or the configured path does not exist.","commonSituations":"Fresh installs of N_m3u8DL-RE where the Bento4 binaries were never installed; mp4decrypt present only in a folder not on PATH; on Windows the exe not named exactly mp4decrypt.exe; running from a container/CI image without Bento4.","solutions":["Install mp4decrypt (from Bento4 toolkit) and make sure it is on PATH","Pass --decryption-binary-path pointing at the mp4decrypt executable","Switch the decryption engine with --use-shaka-packager or rely on the default ffmpeg engine","Check that the file at --decryption-binary-path exists and is executable"],"exampleFix":"Install Bento4 so mp4decrypt is on PATH (e.g. apt install mp4decrypt / download Bento4-SDK and add bin/ to PATH), or re-run with: N_m3u8DL-RE ... --decryption-binary-path /usr/local/bin/mp4decrypt","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install mp4decrypt alongside the downloader before using key-based decryption","Verify with `mp4decrypt --version` before starting long downloads","Keep third-party binaries in a directory included in PATH"],"tags":[],"backgroundTag":null,"analyzedSha":"e113dee70c924ee08dae5460624909b04d84cb76","analyzedAt":"2026-09-13T02:43:21.078Z","contentChangedAt":"2026-09-13T02:43:21.078Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}