FileNotFoundError:没有那个文件或目录:'ffprobe' FileNotFoundError:没有那个文件或目录:'ffmpeg'

时间:2021-03-28 15:29:30

标签: python ffmpeg ffprobe

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")

当我运行上面的代码时。它显示以下错误。

FileNotFoundError: No such file or directory: 'ffprobe'

我也使用 subprocess 模块尝试过这个。

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

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

它给出以下错误

FileNotFoundError: No such file or directory: 'ffmpeg'

我不确定这段代码有什么问题。我目前使用的是 Windows 10。请解决这个问题。

1 个答案:

答案 0 :(得分:0)

https://ffmpeg.org/download.html 下载 ffmpeg 并将库添加到您的系统中。

可能与 FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe': 'ffprobe' 重复