[Python] Unexpected error: No such file or directory: 'ffprobe', while using pydub in Digital...

Discussão em 'Python' iniciado por Stack, Maio 10, 2025.

  1. Stack

    Stack Membro Participativo

    I have an app that processes audio files and converts them to 'wav' format. This works locally on my Mac, however in DigitalOcean, when recording audio, i get the below error, followed by a 500:

    warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning) Unexpected error: [Errno 2] No such file or directory: 'ffprobe'

    I've tried including binary files in my code for ffmpeg and ffprobe but got the same error. ffmpeg and ffprobe binaries are in /bin in the root of my project:

    from pydub import AudioSegment

    if platform.system() == "Darwin": # mac
    pass
    elif platform.system() == "Linux": # digitalocean)
    AudioSegment.converter = os.path.join("bin", "ffmpeg-linux")
    AudioSegment.ffprobe = os.path.join("bin", "ffprobe-linux")
    else:
    raise EnvironmentError(
    "Unsupported platform. Only macOS and Linux are supported.")

    Continue reading...

Compartilhe esta Página