node.js - Heroku Discord.js ffmpeg

标签 node.js heroku ffmpeg

我写了一个不和谐的音乐机器人,我使用了ffmpeg,所以我把可执行文件放在botfolder中,现在我想把机器人推到heroku中,安装了npm包,但是在heroku中出现了这个错误:

2021-01-01T02:48:33.038447+00:00 app[Worker.1]: Error: FFmpeg/avconv not found!
2021-01-01T02:48:33.038488+00:00 app[Worker.1]:     at Function.getInfo (/app/node_modules/prism-media/src/core/FFmpeg.js:142:11)
2021-01-01T02:48:33.038489+00:00 app[Worker.1]:     at Function.create (/app/node_modules/prism-media/src/core/FFmpeg.js:155:38)
2021-01-01T02:48:33.038490+00:00 app[Worker.1]:     at new FFmpeg (/app/node_modules/prism-media/src/core/FFmpeg.js:44:27)
2021-01-01T02:48:33.038491+00:00 app[Worker.1]:     at AudioPlayer.playUnknown (/app/node_modules/discord.js/src/client/voice/player/BasePlayer.js:47:20)
2021-01-01T02:48:33.038491+00:00 app[Worker.1]:     at VoiceConnection.play (/app/node_modules/discord.js/src/client/voice/util/PlayInterface.js:71:28)
2021-01-01T02:48:33.038492+00:00 app[Worker.1]:     at play (/app/index.js:335:47)
2021-01-01T02:48:33.038493+00:00 app[Worker.1]:     at Client.<anonymous> (/app/index.js:143:17)
2021-01-01T02:48:33.038493+00:00 app[Worker.1]:     at processTicksAndRejections (internal/process/task_queues.js:97:5)

最佳答案

现在可以了,只需要添加 ffmpeg-static

关于node.js - Heroku Discord.js ffmpeg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65527029/

相关文章:

FFmpeg -c copy 删除视频几秒钟

c++ - 将单个像素值从 RGB 转换为 YUV420 并保存帧 - C++

database - Heroku运行错误

ruby-on-rails-3 - 如何更改 Heroku-Postgresql 数据库密码

apache-flex - 混合 2 个音频文件

mongodb - 寻找引用 nodejs、expressjs 和 mongodb 应用程序用作模板

shell - 如何从 Heroku 获取所有 ENV 变量(包括内部变量)

javascript - Connect 不是 Node.js 的函数

node.js - Windows 7 32 位上的 Socket.io 安装失败

javascript - 删除 `package-lock.json`快速解决冲突