chrvadala / music-beat-detector

music-beat-detector is a library that analyzes a music stream and detects any beat. It can be used to control lights or any magic effect by the music wave.
MIT License
252 stars 25 forks source link

Error: Cannot find ffmpeg #1

Closed EliasFl closed 1 year ago

EliasFl commented 5 years ago

Hi! I'm trying to run the example on my Windows 10 PC and I get this error:

events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: Cannot find ffmpeg
    at C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\fluent-ffmpeg\lib\processor.js:136:22
    at C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\fluent-ffmpeg\lib\capabilities.js:123:9
    at C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\async\dist\async.js:473:16
    at next (C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\async\dist\async.js:5329:29)
    at C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\async\dist\async.js:969:16
    at C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\fluent-ffmpeg\lib\capabilities.js:116:11
    at C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\fluent-ffmpeg\lib\utils.js:223:16
    at F (C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\which\which.js:68:16)
    at E (C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\which\which.js:80:29)
    at C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\which\which.js:89:16
Emitted 'error' event at:
    at emitEnd (C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\fluent-ffmpeg\lib\processor.js:424:16)
    at C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\fluent-ffmpeg\lib\processor.js:433:16
    at C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\async\dist\async.js:473:16
    [... lines matching original stack trace ...]
    at C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\async\dist\async.js:473:16
    at next (C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\async\dist\async.js:5329:29)
    at C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\async\dist\async.js:969:16
    at C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\fluent-ffmpeg\lib\capabilities.js:519:16
    at C:\Users\Elias\Desktop\playgrounds\Nodejs playground\music-beat\node_modules\fluent-ffmpeg\lib\processor.js:136:16

This happens when I run node example.js https://www.youtube.com/watch?v=MMuAqR_MjS8. I also have node 11.5.0 and npm 6.4.1.

I just copy&paste the code from the example and installed these dependencies:

chrvadala commented 5 years ago

The youtube stream requires ffmpeg and probably is not installed on your computer or is not in the PATH. You can force the library to use the right bin in this way https://github.com/chrvadala/create-music-stream#faq