jiaaro / pydub

Manipulate audio with a simple and easy high level interface
http://pydub.com
MIT License
8.76k stars 1.03k forks source link

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

Open OliverSparrow opened 3 years ago

OliverSparrow commented 3 years ago

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

jonathanlal commented 1 year ago

any update on this?

rtanx commented 6 months ago

same issue, any update on this?