我收到这个“错误:找不到 FFmpeg/avconv!”

新手上路,请多包涵

我正在尝试创建一个不和谐的机器人,但是每次尝试运行 youtube 链接时都会收到此错误。

 Error: FFmpeg/avconv not found!
    at Function.getInfo (C:\Users\-\discord-bot\node_modules\prism-media\src\core\FFmpeg.js:130:11)
    at Function.create (C:\Users\-\discord-bot\node_modules\prism-media\src\core\FFmpeg.js:143:38)
    at new FFmpeg (C:\Users\-\discord-bot\node_modules\prism-media\src\core\FFmpeg.js:44:27)
    at AudioPlayer.playUnknown (C:\Users\-\discord-bot\node_modules\discord.js\src\client\voice\player\BasePlayer.js:47:20)
    at VoiceConnection.play (C:\Users\-\discord-bot\node_modules\discord.js\src\client\voice\util\PlayInterface.js:71:28)
    at Object.play (C:\Users\-\discord-bot\commands\play.js:78:8)
    at Object.execute (C:\Users\-\discord-bot\commands\play.js:48:16)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:14004) UnhandledPromiseRejectionWarning: DiscordAPIError: Cannot send an empty message
    at RequestHandler.execute (C:\Users\-\discord-bot\node_modules\discord.js\src\rest\RequestHandler.js:170:25)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:14004) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandl
ed promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:14004) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

我用 npm install -g ffmpeg-binaries 安装了 ffmpeg 以尝试在全球范围内安装它。我还将 ffmpeg 添加到 PATH,但这似乎不起作用。

无论如何要修复它?

原文由 Fhabbulous 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 566
1 个回答

尝试运行这个 npm i ffmpeg-static

原文由 Waruw 发布,翻译遵循 CC BY-SA 4.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题