python - Nextcord:无法访问服务器上的 ffmpeg

标签 python ffmpeg discord discord.py nextcord

我使用此代码访问 ffmpeg.exe对于我的不和谐音乐机器人。

nextcord.FFmpegPCMAudio(filename,executable='./database/ffmpeg.exe', **ffmpeg_options)
我可以在我的电脑中顺利运行它而不会出现错误
但是当我在 上托管我的机器人时heroku 或 epikhost,我遇到了这个错误:
PermissionError: [Errno 13] Permission denied: './database/ffmpeg.exe'
我该如何解决这个错误?任何建议或答案都会有所帮助。谢谢。

最佳答案

前往 heroku dashboard > setting > buildpacks并将这 2 个构建包添加到您的应用程序中。

  • https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git
  • https://github.com/xrisk/heroku-opus.git
  • 关于python - Nextcord:无法访问服务器上的 ffmpeg,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/71306186/

    相关文章:

    python - 我怎样才能在 <span> </span> 使用 python splinter lib 之间获取文本

    ffmpeg - FFPROBE - "Unspecified pixel format"

    javascript - Discord bot - 清除命令不起作用 discord.js-commando

    javascript - 使用 Discord.js 检查嵌入中图像的 url

    python - SPYDER 中的 PyQT 退出错误

    Python分区和拆分

    python - 使用xpath获取div标签内的列表项

    FFMPEG 图片+音乐=视频

    c - libav C++ sw_scale 返回 BGR24 缓冲区的可变字节大小

    javascript - 从 javascript 数组中选择一个随机项