pydub AudioSegment.from_file Filenofounderror

问题描述

from pydub import AudioSegment
from pydub.utils import make_chunks
import pyaudio


chunk_size=20
song=AudioSegment.from_file('songs\\zig_zag.mp3')

这段代码我尝试用make_chunks代码一个节奏游戏,但是报错

    C:\Users\junlo\AppData\Local\Programs\Python\python36\lib\site-packages\pydub\utils.py:198: 
RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe,but may not work  
  warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe,but may not work",RuntimeWarning)
Traceback (most recent call last):
  File "c:\Users\junlo\Documents\흑역만드는편\main.py",line 7,in <module>
    song=AudioSegment.from_file('C:\\Users\\junlo\\documents\\흑역만드는편\\songs\\zig_zag.mp3')
  File "C:\Users\junlo\AppData\Local\Programs\Python\python36\lib\site-packages\pydub\audio_segment.py",line 685,in from_file
    info = mediainfo_json(orig_file,read_ahead_limit=read_ahead_limit)
  File "C:\Users\junlo\AppData\Local\Programs\Python\python36\lib\site-packages\pydub\utils.py",line 274,in mediainfo_json
    res = Popen(command,stdin=stdin_parameter,stdout=PIPE,stderr=PIPE)
  File "C:\Users\junlo\AppData\Local\Programs\Python\python36\lib\subprocess.py",line 729,in __init__
    restore_signals,start_new_session)
  File "C:\Users\junlo\AppData\Local\Programs\Python\python36\lib\subprocess.py",line 1017,in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2]

我知道上面关于error的错误,但是错误说程序找不到文件

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)