Python Pydub权限被拒绝?

问题描述:

当我运行这段代码:Python Pydub权限被拒绝?

from pydub import AudioSegment 
sound = AudioSegment.from_mp3("i.mp3") 
sound.export("F:\\bh", format="wav") 

一个ffmpeg的窗口弹出,我得到这个错误:Error Pic

即使我用管理员privilleges运行: Error with admin privilleges

Note :
The error occurs on every location that I try to export

+1

同样的问题,没有解决方案 – Macumbaomuerte

+0

您是否找到解决方案? @匿名 – lalithkumar

from pydub.playback import play 
from pydub import AudioSegment 
AudioSegment.converter = r"C:\\ffmpeg\\bin\\ffmpeg.exe" 
AudioSegment.ffmpeg = r"C:\\ffmpeg\\bin\\ffmpeg.exe" 
myAudioFile = 'C:\\Users\\User\\Documents\\UNDAR\\CepreUNDAR\\Shema.mp3' 
print(myAudioFile) 
sound_stereo = AudioSegment.from_mp3(myAudioFile) 
sound_monoL = sound_stereo.split_to_mono()[0] 
sound_monoR = sound_stereo.split_to_mono()[1] 
# Invert phase of the Right audio file 
sound_monoR_inv = sound_monoR.invert_phase() 
# Merge two L and R_inv files, this cancels out the centers 
sound_CentersOut = sound_monoL.overlay(sound_monoR_inv) 
# Export merged audio file 
myAudioFile_CentersOut = "ShemaDrumless.mp3" 
fh = sound_CentersOut.export(myAudioFile_CentersOut, format="mp3")