kyriesent / node-rtsp-stream

Stream any RTSP stream and output to websocket for consumption by jsmpeg (https://github.com/phoboslab/jsmpeg). HTML5 streaming video! Requires ffmpeg.
MIT License
451 stars 166 forks source link

Error: spawn ffmpeg ENOENT #28

Closed anllyksell closed 4 years ago

anllyksell commented 5 years ago

Hello,

First, thank you for your effort. When I try to run my serverside api.js I always get 'Error: spawn ffmpeg ENOENT' error. I couldn't find a solution. I use Windows pc. Does it matter ? If you can respond I wil be really glad.

anllyksell commented 5 years ago

And my api.js code is this :

Stream = require("node-rtsp-stream"); stream = new Stream({ name: "name", streamUrl: myurl, wsPort: 9999, ffmpegOptions: { // options ffmpeg flags "-stats": "", // an option with no neccessary value uses a blank string "-r": 30 // options with required values specify the value after the key, } });

kyriesent commented 5 years ago

ENOENT usually means that node is trying to run a command that doesn't exist. Are you sure you have ffmpeg installed?

On Tue, Mar 26, 2019, at 10:03 AM, anllyksell wrote:

And my api.js code is this :

Stream = require("node-rtsp-stream"); stream = new Stream({ name: "name", streamUrl: myurl, wsPort: 9999, ffmpegOptions: { // options ffmpeg flags "-stats": "", // an option with no neccessary value uses a blank string "-r": 30 // options with required values specify the value after the key, } });

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kyriesent/node-rtsp-stream/issues/28#issuecomment-476656738, or mute the thread https://github.com/notifications/unsubscribe-auth/ABatsi56nmMnefZkKw8HR16bFIY_Mw3vks5vaiiqgaJpZM4cLhiW.

anllyksell commented 5 years ago

It was and its path was clear. I'm using Windows. On Linux without needing anything else it worked. But on Windows I needed to put ffmpeg.exe into project folder. I didn't understand why it was different on differend os. But it worked. You can close issue if you want. Thank you for your response :)

amazing-wood commented 5 years ago

Same problem,using windows and cannot find the ffmpeg,but I dont wanna copy ffmpeg.exe to the project folder. How could I set the config to let the project find the ffmpeg?

JudyCCC commented 5 years ago

how to get ffmpeg.exe?

JudyCCC commented 5 years ago

how to get ffmpeg.exe?

how to get ffmpeg.exe?

I got it, thank you

kyriesent commented 4 years ago

Should be closed by #50