node-red-contrib-custom-ffmpeg-video 0.1.2

A simple ffmpeg wrapper for streaming video in Node-RED

npm install node-red-contrib-custom-ffmpeg-video

NPM Version NPM Downloads

A simple ffmpeg wrapper for streaming video.

Installation

$ npm install node-red-contrib-custom-ffmpeg-video

Note: This node requires that you have ffmpeg installed on your machine.

Configure your node

Open the node's configuration panel to set Input URL and the Stream URL.

Note: In this example our stream will be accessible at ws://<host>:<port>/stream

Using the stream

To render the video stream in the browser, we use a library called JSMpeg.

<html>
  <body>
    <!-- import JSMpeg -->
    <script src="jsmpeg.min.js"></script>
    <!-- create a canvas tag to render our video stream -->
    <canvas id="video-canvas"></canvas>
    <script>
      const videoCanvas = document.getElementById('video-canvas')
      
      // The stream URL that we set in the previous step.
      const url = `ws://${window.location.hostname}:${window.location.port}/stream`

      new JSMpeg.Player(url, { canvas: videoCanvas })
    </script>
  </body>
</html>

Device specific instructions

There are a few minor hardware specific steps depending on your device.

sudo raspi-config

Node Info

Version: 0.1.2
Updated 3 years, 10 months ago
License: MIT
Rating: 2.3 3

Actions

Rate:

Downloads

22 in the last week

Nodes

  • ffmpeg-stream

Keywords

  • node-red
  • onvif
  • video-stream
  • raspberry-pi
  • flow

Maintainers