Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bourdakos1/node-red-contrib-ffmpeg
📹 A simple ffmpeg wrapper for streaming video in Node-RED
https://github.com/bourdakos1/node-red-contrib-ffmpeg
flow node-red raspberry-pi tello-drone video-stream
Last synced: about 2 months ago
JSON representation
📹 A simple ffmpeg wrapper for streaming video in Node-RED
- Host: GitHub
- URL: https://github.com/bourdakos1/node-red-contrib-ffmpeg
- Owner: bourdakos1
- License: mit
- Created: 2019-09-10T19:33:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-02-10T12:02:10.000Z (almost 3 years ago)
- Last Synced: 2024-05-27T18:36:42.807Z (7 months ago)
- Topics: flow, node-red, raspberry-pi, tello-drone, video-stream
- Language: JavaScript
- Homepage: https://flows.nodered.org/node/node-red-contrib-ffmpeg
- Size: 1.5 MB
- Stars: 8
- Watchers: 4
- Forks: 7
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-red-contrib-ffmpeg
[![NPM Version](https://img.shields.io/npm/v/node-red-contrib-ffmpeg.svg)](https://npmjs.org/package/node-red-contrib-ffmpeg)
[![NPM Downloads](https://img.shields.io/npm/dm/node-red-contrib-ffmpeg.svg)](https://npmjs.org/package/node-red-contrib-ffmpeg)A simple ffmpeg wrapper for streaming video from a [DJI Tello Drone](https://www.ryzerobotics.com/tello) or a [Raspberry Pi](https://www.raspberrypi.org/).
![](images/example.png)
## Installation
```
$ npm install node-red-contrib-ffmpeg
```> **Note:** This node requires that you have [ffmpeg](https://ffmpeg.org/) installed on your machine.
## Configure your node
Open the node's configuration panel to set `Device Type` and the `Stream URL`.
![](images/configure.png)
> **Note:** In this example our stream will be accessible at `ws://:/stream`## Using the stream
To render the video stream in the browser, we use a library called [JSMpeg](https://github.com/phoboslab/jsmpeg).
```html
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 })
```
## Device specific instructions
There are a few minor hardware specific steps depending on your device.### Tello Drone
Before you can use your Tello Drone you **MUST** activate it in the official Tello Drone app.
Once your drone is activated, you can connect to it's WiFi Network `TELLO-XXXXXX` and send it commands via UDP.In the example flow, to start the video stream, click the `command` command followed by `streamon` command.
Check out this [blog post](https://dev.to/poojamakes/detecting-objects-with-a-tello-drone-38np) to get started
### Raspberry Pi
Before you can stream with a Raspberry Pi, you will need to attach a camera and enable it.To enable camera support, run the following command:
```
sudo raspi-config
```Then use the arrow keys to choose _Interfacing Options_ > _Camera_ and select to enable the camera. Once the camera is enabled, reboot your Raspberry Pi.
> **Note:** For the most up-to-date instructions for Raspberry Pi Camera setup, check out the [official documentation](https://www.raspberrypi.org/documentation/configuration/camera.md).
The Raspberry Pi will start streaming as soon as you start node red.
## Authors
- [Nicholas Bourdakos](https://github.com/bourdakos1)
- [Pooja Mistry ](https://github.com/pmmistry)