Pydub (WindowsError: [Error 2] The system can not find the file specified)

后端 未结 6 433
无人共我
无人共我 2020-12-06 13:25

I have a problem with Pydub module running in Windows and Linux. When I try open a mp3 file thus:

from pydub import AudioSegment
sound = AudioSegment.from_mp         


        
6条回答
  •  庸人自扰
    2020-12-06 14:14

    In newer versions of pydub, you can specify the absolute path to your ffmpeg executable by setting the class attribute converter, e.g.:

    from pydub import AudioSegment
    AudioSegment.converter = "/usr/local/bin/ffmpeg"
    

    In older versions the class attribute used to be ffmpeg, which is deprecated now.

提交回复
热议问题