gpt4 book ai didi

python - FileNotFoundError : No such file or directory: 'ffprobe' FileNotFoundError: No such file or directory: 'ffmpeg'

转载 作者:行者123 更新时间:2023-12-04 23:01:39 25 4
gpt4 key购买 nike

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'
我也尝试过使用子进程模块。
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'
我不确定这段代码有什么问题。我目前正在使用 window 10 .请解决这个问题。

最佳答案

https://ffmpeg.org/download.html 下载 ffmpeg并将库添加到您的系统。
FileNotFoundError: [Errno 2] No such file or directory: 'ffprobe': 'ffprobe' 的可能重复项

关于python - FileNotFoundError : No such file or directory: 'ffprobe' FileNotFoundError: No such file or directory: 'ffmpeg' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66843093/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com