{"record":{"id":"c74fbf207e7b16d8","repo":"deezer/spleeter","slug":"binary-not-found","errorCode":null,"errorMessage":"{} binary not found","messagePattern":"(.+?) binary not found","errorType":"exception","errorClass":"SpleeterError","httpStatus":null,"severity":"error","filePath":"spleeter/audio/ffmpeg.py","lineNumber":62,"sourceCode":"\n    SUPPORTED_CODECS: Dict[Codec, str] = {\n        Codec.M4A: \"aac\",\n        Codec.OGG: \"libvorbis\",\n        Codec.WMA: \"wmav2\",\n    }\n    \"\"\" FFMPEG codec name mapping. \"\"\"\n\n    def __init__(_) -> None:\n        \"\"\"\n        Default constructor, ensure FFMPEG binaries are available.\n\n        Raises:\n            SpleeterError:\n                If ffmpeg or ffprobe is not found.\n        \"\"\"\n        for binary in (\"ffmpeg\", \"ffprobe\"):\n            if shutil.which(binary) is None:\n                raise SpleeterError(\"{} binary not found\".format(binary))\n\n    def load(\n        _,\n        path: Union[Path, str],\n        offset: Optional[float] = None,\n        duration: Optional[float] = None,\n        sample_rate: Optional[float] = None,\n        dtype: bytes = b\"float32\",\n    ) -> Signal:\n        \"\"\"\n        Loads the audio file denoted by the given path\n        and returns it data as a waveform.\n\n        Parameters:\n            path (Union[Path, str]:\n                Path of the audio file to load data from.\n            offset (Optional[float]):\n                (Optional) Start offset to load from in seconds.","sourceCodeStart":44,"sourceCodeEnd":80,"githubUrl":"https://github.com/deezer/spleeter/blob/c8854001ac8acad34a9bc2bd15f28475541828b1/spleeter/audio/ffmpeg.py#L44-L80","documentation":"`FFMPEGAudioAdapter.__init__` checks that both `ffmpeg` and `ffprobe` executables are on the PATH via `shutil.which`. If either binary is missing, a `SpleeterError` naming the missing binary is raised at adapter construction time, before any audio is loaded or written.","triggerScenarios":"Instantiating `FFMPEGAudioAdapter()` (directly or via `AudioAdapter.get('spleeter.audio.ffmpeg.FFMPEGAudioAdapter')`) on a machine where `ffmpeg` or `ffprobe` is not installed or not on PATH.","commonSituations":"Fresh Docker images or CI runners without ffmpeg, minimal virtualenvs/conda envs, Windows installs where ffmpeg was downloaded but not added to PATH.","solutions":["Install ffmpeg system-wide (includes ffprobe): `apt-get install ffmpeg`, `brew install ffmpeg`, or `conda install ffmpeg`","If ffmpeg is already installed, add its directory to the PATH environment variable","Verify with `which ffmpeg ffprobe` (or `where` on Windows) that both resolve"],"exampleFix":"# before (Dockerfile)\nFROM python:3.9-slim\nRUN pip install spleeter\n# after\nFROM python:3.9-slim\nRUN apt-get update && apt-get install -y ffmpeg\nRUN pip install spleeter","handlingStrategy":"validation","validationCode":"import shutil\nmissing = [b for b in ('ffmpeg', 'ffprobe') if shutil.which(b) is None]\nif missing:\n    raise SystemExit(f'Missing binaries: {missing}. Install ffmpeg and ensure it is on PATH.')","typeGuard":null,"tryCatchPattern":"import shutil\ntry:\n    adapter = FFMPEGAudioAdapter()\nexcept Exception as e:\n    if 'binary not found' in str(e):\n        raise SystemExit('Install ffmpeg: apt-get install ffmpeg / brew install ffmpeg')\n    raise","preventionTips":["Install ffmpeg in Docker images and CI runners before pip installing spleeter","Check shutil.which('ffmpeg') and shutil.which('ffprobe') during environment setup","On Windows, add the ffmpeg bin folder to PATH and restart shells"],"tags":["ffmpeg","environment","missing-binary","path"],"backgroundTag":"missing-binary-on-path","analyzedSha":"c8854001ac8acad34a9bc2bd15f28475541828b1","analyzedAt":"2026-08-28T21:38:40.142Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}