discord.io icon indicating copy to clipboard operation
discord.io copied to clipboard

ffmpeg missing, even though typing ffmpeg in the console works

Open gmfelix opened this issue 7 years ago • 9 comments

Greetings everyone, I am new to discord.io and have been fiddling around with it just for fun, however, when trying to implement music streaming for the bot I receive an error: console screenshot

Code in question:

case 'play': client.getAudioContext("removedForSafety", function(err, stream) { if (err) return console.error(err); fs.createReadStream(song).pipe(stream, {end: false}); stream.on('done', function() { fs.createReadStream(song).pipe(stream, {end: false}); }); }); break;

Thanks in advance.

gmfelix avatar Nov 05 '17 00:11 gmfelix

Did you dump ffmpeg into the directory ...\Desktop\projects\StreamChecker, or is it added to your PATH?

izy521 avatar Nov 05 '17 01:11 izy521

I added it to the PATH enviroment

gmfelix avatar Nov 05 '17 02:11 gmfelix

Try closing and re-opening the command prompt, then.

izy521 avatar Nov 05 '17 02:11 izy521

I've tried that several times now, I even tried restarting the computer and also running cmd as administrator

gmfelix avatar Nov 05 '17 02:11 gmfelix

That's odd, then. You can check in the lib's file, it only attempts to execute ffmpeg on your shell, whatever that may be. Doesn't try to locate it, or anything. So long as the command prompt is able to run it, the lib should be able to as well.

izy521 avatar Nov 05 '17 02:11 izy521

Well, when I'm running the bot with 'node bot.js' the command prompt does not let me write on it, because it's busy with the process, I really don't know what is wrong. Any suggestions? Maybe a clean install of the dependencies? I am using windows 10, just in case that is an issue, maybe the version I downloaded is not compatible with your code, although if it only tries to execute 'ffmpeg' I'm not sure that is the issue

gmfelix avatar Nov 05 '17 02:11 gmfelix

it is broken i think Mine WOrks

DevDive avatar Nov 09 '17 21:11 DevDive

this is also happening on linux, quick and dirty fix is to change chooseAuidoEncoder function to return "ffmpeg" or "avconv" like so: image (i renamed hte original function)

HessuHobo avatar Dec 07 '17 08:12 HessuHobo

Was this issue ever resolved? I have the same problem

charliesis avatar Jan 22 '18 21:01 charliesis