ytdl-org/youtube-dl · error · PostProcessingError

ffprobe/avprobe and ffmpeg/avconv not found. Please install

Error message

ffprobe/avprobe and ffmpeg/avconv not found. Please install one.

What it means

Raised by FFmpegPostProcessor.get_audio_codec when neither ffprobe/avprobe (probe_available) nor ffmpeg/avconv (available) can be located. get_audio_codec needs at least one of them to inspect the file's streams; with none present it raises before attempting anything else.

Source

Thrown at youtube_dl/postprocessor/ffmpeg.py:159

    @property
    def available(self):
        return self.basename is not None

    @property
    def executable(self):
        return self._paths[self.basename]

    @property
    def probe_available(self):
        return self.probe_basename is not None

    @property
    def probe_executable(self):
        return self._paths[self.probe_basename]

    def get_audio_codec(self, path):
        if not self.probe_available and not self.available:
            raise PostProcessingError('ffprobe/avprobe and ffmpeg/avconv not found. Please install one.')
        try:
            if self.probe_available:
                cmd = [
                    encodeFilename(self.probe_executable, True),
                    encodeArgument('-show_streams')]
            else:
                cmd = [
                    encodeFilename(self.executable, True),
                    encodeArgument('-i')]
            cmd.append(encodeFilename(self._ffmpeg_filename_argument(path), True))
            if self._downloader.params.get('verbose', False):
                self._downloader.to_screen(
                    '[debug] %s command line: %s' % (self.basename, shell_quote(cmd)))
            handle = subprocess.Popen(
                cmd, stderr=subprocess.PIPE,
                stdout=subprocess.PIPE, stdin=subprocess.PIPE)
            stdout_data, stderr_data = process_communicate_or_kill(handle)
            expected_ret = 0 if self.probe_available else 1

View on GitHub (pinned to 956b8c5855)

Solutions

  1. Install the full ffmpeg suite (it ships ffprobe together with ffmpeg)
  2. Point --ffmpeg-location at the directory containing both ffmpeg and ffprobe
  3. Verify both run: 'ffmpeg -version' and 'ffprobe -version' in the invoking shell
  4. If installing separately, make sure ffprobe is executable and named ffprobe/avprobe on PATH

Example fix

# before
youtube-dl -x URL --ffmpeg-location /tmp/ffmpeg-only-dir
# after (directory with BOTH ffmpeg and ffprobe)
youtube-dl -x URL --ffmpeg-location /usr/local/ffmpeg/bin
Defensive patterns

Strategy: validation

Validate before calling

import shutil

def can_probe_audio_codec():
    probe = shutil.which('ffprobe') or shutil.which('avprobe')
    main = shutil.which('ffmpeg') or shutil.which('avconv')
    return bool(probe or main)

if opts.get('extractaudio') and not can_probe_audio_codec():
    raise SystemExit('ffmpeg/ffprobe required for audio extraction')

Try / catch

try:
    ydl.download([url])
except PostProcessingError as e:
    if 'ffprobe/avprobe and ffmpeg/avconv not found' in str(e):
    # environment problem, fail fast with actionable message
        raise SystemExit('Install the ffmpeg suite (includes ffprobe) or set --ffmpeg-location')

Prevention

When it happens

Trigger: Running audio extraction (-x) without ffmpeg/ffprobe installed; ffprobe exists but is not executable or misnamed; --ffmpeg-location set to a directory that contains neither binary.

Common situations: Same class of environment issues as error 492: missing PATH entries in CI/cron, snap/flatpak installs, Windows without ffmpeg on PATH, or partial installs that have ffmpeg but no ffprobe while a broken path check disables both.

Related errors


AI-assisted analysis of ytdl-org/youtube-dl@956b8c5855 (2026-08-14). Data as JSON: /api/errors/35e7fc1c65189cc2. Report an issue: GitHub.