gpt4 book ai didi

python - 从 discord 使用 FFmpegPCMAudio 的问题

转载 作者:行者123 更新时间:2023-12-04 23:19:15 29 4
gpt4 key购买 nike

with youtube_dl.YoutubeDL(YDL_OPTIONS) as ydl:
info = ydl.extract_info(url, download=False)
await ctx.send('Сейчас играет: ' + info.get('title'))
url2 = info['formats'][0]['url']
print(url2)
source = discord.FFmpegPCMAudio(url2, executable='/Users/someUser/ffmpeg', **FFMPEG_OPTIONS)
vc.play(source)
这工作得很好,但问题是我使用的是本地 ffmpeg.exe
如果我在本地启动应用程序也没关系, 但我的目标是将项目上传到 GitHub 并将其部署到 Heroku,所以我将无法访问本地文件。 也许有更好的解决方案, 但我只想将 .exe 上传到我的 GitHub 存储库,这不是很好... *
先感谢您!

最佳答案

您需要在 Heroku 中的项目中添加一些构建包。转到应用程序设置并添加以下构建包:all buildpacks

关于python - 从 discord 使用 FFmpegPCMAudio 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70159637/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com