I am getting this “Error: FFmpeg/avconv not found!”

后端 未结 3 1772
你的背包
你的背包 2020-12-12 06:42

I am trying to create a discord bot, however receive this error every time I try to run a youtube link.

Error: FFmpeg/avconv not found!
    at Function.getInf         


        
相关标签:
3条回答
  • 2020-12-12 07:26

    Are you using this method? https://discord.js.org/#/docs/main/stable/class/VoiceConnection?scrollTo=play

    As you didn't provide any code...

    I had the same issue, that day i did two things, but i don't know which one was the fix.

    • Actaullay download FFMPEG http://ffmpeg.org/download.html - put executable (ffmpeg.exe) in project directory EDIT: Don't download source code, download from Get packages & executable files for your OS
    • Update node.js to newest version https://nodejs.org/en/

    I'm not sure which one of the fixes it was. But now it also works without the file in directory, so I'm kinda confused

    Also try requiring ffmpeg-binaries in the js file

    0 讨论(0)
  • 2020-12-12 07:29

    try to run this npm i ffmpeg-static

    0 讨论(0)
  • 2020-12-12 07:31

    I had a problem with playing stream in Discord.js even thought I installed ffmpeg binaries, so here's a possible fix, atleast in windows if ffmpeg can't be run alone in CMD, then I went to node_modules\prism-media\src\core\FFmpeg.js on line 115 and there is an array of each possible directory of what to use e.g ffmpeg, so I changed from

    }, 'ffmpeg', 'avconv', './ffmpeg', './avconv'];
    

    to

    }, 'ffmpeg', 'avconv', './ffmpeg', 'C:/ffmpeg/ffmpeg', './avconv'];
    

    and it worked fine for me :)

    0 讨论(0)
提交回复
热议问题