agsh / rtsp-ffmpeg

Node.js FFMpeg wrapper for streaming RTSP into MotionJPEG
MIT License
248 stars 84 forks source link

spawn ffmpeg ENOENT #21

Closed ChrisZio closed 3 years ago

ChrisZio commented 7 years ago

Hi,

I have been trying to find the solution to this error for weeks now :(

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

Error: spawn ffmpeg ENOENT at exports._errnoException (util.js:1024:11) at Process.ChildProcess._handle.onexit (internal/child_process.js:192:19) at onErrorNT (internal/child_process.js:374:16) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)

I am using the example on your github page and this is the error I get...

Please can you give me some assistance in the matter...

Thanx.

kevinGodell commented 6 years ago

That error indicates that ffmpeg is not installed or not in path. Check if you can call ffmpeg from the command line.

vaaski commented 6 years ago

I had the same issue, you need to download and install FFMpeg from their site.

Zombitch commented 6 years ago

As @vaaski said, you have to install FFMpeg in your environnement AND add the ffmpeg binaries folder to your environnement path variables otherwise it won't work.

Mahboub99 commented 4 years ago

I have the same issue but it works on cmd but not in vscode terminal

Arsh-Sandhu commented 3 years ago

Hi @Mahboub99, I also had same error on Windows 10. I had downloaded ffmpeg files, placed in c drive, and added the path of that folder to environment variables. ffmpeg commands worked in cmd but still faced error in while runnning the project. I fixed it by copying the ffmpeg.exe directly into the project in visual studio code.

agsh commented 3 years ago

@Mahboub99 @Arsh-Sandhu You can change the ffmpeg command here https://github.com/agsh/rtsp-ffmpeg/blob/ac6b17b9b3a952cc6f8e52c9b4ec975aafb64a45/lib/rtsp-ffmpeg.js#L42

agsh commented 3 years ago

To close this issue, added solution in the README