6

I tried got video stream on the rtsp with use MEAN stack, but when I added this code in my server.js file, I caught the error: "spawn ffmpeg ENOENT". Maybe I forgot to install some lib or what? please help me! Code:

app.get('/', function (req, res) {
 Stream = require('node-rtsp-stream');
 stream = new Stream({
     name: 'name',
     streamUrl: 'rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov',
     wsPort: 9999
 });
 res.send(stream);
 console.log('9999')
});
Dima Frost
  • 71
  • 1
  • 1
  • 6
  • Have you actually installed ffmpeg and is it available in your current context? Try typing ffmpeg in your command prompt and see if it works. – Peter Keuter Jun 07 '16 at 18:28
  • Confirmado, deben instalar la libreria FFMPEG ( https://ffmpeg.org/download.html) en su servidor o equipo. confirmed must install the library FFMPEG (https://ffmpeg.org/download.html) on your server or pc – Victor Hugo Cornejo Calderon Aug 10 '16 at 04:45

3 Answers3

2

Well, you need to install FFmpeg on your Ubuntu machine first.

sudo apt install FFmpeg

This will install the newest version, Also I see you're trying to send the stream as a response. The module you are using to get your RTSP feed converts it to a WebSocket connection. So you need to make a client connect to it.

Hope this helped!

Techwizmatt
  • 23
  • 1
  • 6
1

U can try to start app with docker

and put into dockerfile

FROM node:16

RUN apt-get update -y
RUN apt-get upgrade -y
RUN apt-get install ffmpeg -y
...

and then NodeJS app can spawn ffmpeg inside container

0

I had this problem in which NPM could not install all the dependencies. I installed yarn and it installed the dependencies and made the error go away.

Hypothesis
  • 1,208
  • 3
  • 17
  • 43