1
from os import path
from pydub import AudioSegment
input_file = "audio.mp3"
output_file = "result.wav"

sound = AudioSegment.from_mp3(input_file)
sound.export(output_file, format="wav")

When i run the above code. It show below error.

FileNotFoundError: No such file or directory: 'ffprobe'

I tried this also using subprocess module.

input_file = "audio.mp3"
output_file = "result.wav"

import subprocess
subprocess.call(['ffmpeg', '-i', input_file, output_file])

It gives below error

FileNotFoundError: No such file or directory: 'ffmpeg'

I'm not sure what's wrong on this code. I'm currently using Windows 10. Please solve this.

Sharath B Naik
  • 1,016
  • 7
  • 14

1 Answers1

0

Download ffmpeg from https://ffmpeg.org/download.html and add the library to your system.

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

DarknessPlusPlus
  • 543
  • 1
  • 5
  • 18
  • Under Windows you also want to make sure that ffmpeg `bin` directory is available in PATH. Otherwise the same error will occur because `pydub` is expecting those ffmpeg tools to be available there. – David Mar 29 '21 at 17:22