Discord FFmpeg not found

这一生的挚爱 提交于 2019-12-12 07:05:04

问题


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:


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.



来源:https://stackoverflow.com/questions/54854869/discord-ffmpeg-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!