本文介绍了找不到Discord FFmpeg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编码一个不和谐的bot,现在它应该可以播放音乐,但是如果我运行命令,它说找不到ffmpeg,我已经将ffmpeg安装为programm并在控制台中,这是代码:
Im coding a discord bot, and now it should play music, but if i run the command, it says "ffmpeg not found",i already installed ffmpeg as programm and in the console, here is the code:
if (message.content.startsWith === `${prefix}play`) {
const ytdl = require('ytdl-core');
const streamOptions = {
seek: 0,
volume: 1
};
const broadcast = bot.createVoiceBroadcast();
var link = arg1
bot.voiceChannel.join()
.then(connection => {
const stream = ytdl(arg1, {
filter: 'audioonly'
});
broadcast.playStream(stream);
const dispatcher = connection.playBroadcast(broadcast);
})
.catch(console.error);
推荐答案
仅在系统上安装FFMPEG不允许程序访问程序的可执行文件。你在窗户上吗?如果是这样,则需要将FFMPEG的可执行文件添加到PATH环境变量中。
Simply installing FFMPEG on your system does not allow programs to access the executable for the program. Are you on windows? If you are, you need to add the FFMPEG's executable to your PATH environment variable.
这篇关于找不到Discord FFmpeg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!