How to display CCTV camera in dashboard (RTSP)

Hey Mat,

In case of infinite streams from camera's, it might be useful to have the following RTSP functionality in Node-RED available:

  • pause: temporarily halt one or all media streams
  • teardown: stop on or all media streams
  • play: resume one or all paused media streams

I will need to create a pull request to have this implemented, however I need to figure out some things before I can do that:

  • Haven't found any functionality in ffmpeg to acomplish this. The only thing I found is this Stackoverflow discussion. So I think (???) it needs to be implemented like this:
    • Pausing (suspending) a stream:
      process.kill(process.pid, 'SIGSTOP');
      
    • Play (resuming) a paused stream:
      process.kill(process.pid, 'SIGCONT ');
      
    • Teardown (stopping) a stream:
      process.kill(process.pid, 'SIGKILL ');
      
    Not really at RTSP-protocol level, but I don't see another way ...
  • Not sure how our input message needs to look like, to give the ffmpeg node those instructions. We need to specify somewhere in the input message both a command (pause/resume/stop) and a process id.
  • Perhaps we can ask to resume/pause/teardown all streams when no process id is specified in the input message.
  • The ffmpeg node should send the process id somewhere in the output messages. That way we know which PID we need to specify in our input messages, to trigger commands...

As usual all 'constructive' feedback is very welcome !!
Bart