pydub icon indicating copy to clipboard operation
pydub copied to clipboard

FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe': 'ffprobe'

Open OliverSparrow opened this issue 3 years ago • 2 comments

Steps to reproduce

  1. Use a MacOS device (10.13)
  2. Install ffmpeg & dependencies using Homebrew
  3. Record a FLAC (or any FFmpeg supported audio file, other .WAV or RAW), naming it "NewTest.{insert_audio_ext}"
  4. Enter the following code into a new Python script (Save that script within the same folder as the audio):
    from pydub import AudioSegment as AS
    from pydub.playback import play
    # The path of ffmpeg installation for Homebrew may vary from person-to-person
    AS.converter = "/usr/local/Cellar/ffmpeg/4.3.2_3/bin/ffmpeg"
    AS.ffprobe = "/usr/local/Cellar/ffmpeg/4.3.2_3/bin/ffprobe"

    audio = AS.from_file("NewTest.flac")
    audio.export("FinalTest.mp3", format="mp3")
    play(audio)

Expected behaviour

An mp3 file named "FinalTest.mp3" should be exported, without causing any error.

Actual behaviour

An error traced back to line : audio = AS.from_file("NewTest.flac") Stating: [Errno 2] No such file or directory: 'ffprobe': 'ffprobe'

Note:

  1. Only "ffprobe" does not connect properly. After stating absolute file path using AS.converter, "ffmpeg" works correctly.
  2. I'm hoping to rely on ffmpeg, and not use libav. Most Documentation feature ffmpeg more than libav.
  3. Tried removing & changing file path of AS.ffprobe, but results the same error.
  4. Tried manually copying the "ffmpeg", "ffprobe" & "ffplay" UNIX exec files to the same location as the Python Script. That also didn't work, even after adjusting the file paths accordingly (that actually made it worse).

Your System configuration

  • Python version: 3.7
  • PyDub version: 0.25.1
  • ffmpeg or libav?: ffmpeg
  • ffmpeg version: 4.3.2_3

OliverSparrow avatar Apr 01 '21 13:04 OliverSparrow

any update on this?

jonathanlal avatar Jun 15 '23 22:06 jonathanlal

same issue, any update on this?

rtanx avatar Feb 17 '24 18:02 rtanx