Discord FFmpeg not found

2019-09-21 07:57发布

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);

1条回答
Fickle 薄情
2楼-- · 2019-09-21 08:01

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.

查看更多
登录 后发表回答