bartbutenaers / node-red-rtsp-to-mjpeg

A Node-RED node to convert an RTSP stream to an MJPEG stream
Apache License 2.0
3 stars 2 forks source link

Error FFMpeg #2

Closed psd24 closed 2 months ago

psd24 commented 2 months ago

I am using the node red image in docker and when running

[ { "id": "f6f2187d.f17ca8", "type": "tab", "label": "Flow 1", "disabled": false, "info": "" }, { "id": "2daebe66eab7d6bc", "type": "inject", "z": "f6f2187d.f17ca8", "name": "Start conversion", "props": [ { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "start_conversion", "x": 260, "y": 320, "wires": [ [ "bfcd1695c47af054" ] ] }, { "id": "e2cfd9118ee0fa29", "type": "inject", "z": "f6f2187d.f17ca8", "name": "Stop conversion", "props": [ { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "stop_conversion", "x": 260, "y": 380, "wires": [ [ "bfcd1695c47af054" ] ] }, { "id": "08b85c516eae4ea0", "type": "debug", "z": "f6f2187d.f17ca8", "name": "debug 388", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 670, "y": 320, "wires": [] }, { "id": "bfcd1695c47af054", "type": "rtsp2mjpeg", "z": "f6f2187d.f17ca8", "url": "rtsp://xxx:xxx/videoSub", "username": "xxx", "password": "xxx", "rate": "", "quality": "", "resolution": "", "x": 470, "y": 320, "wires": [ [ "08b85c516eae4ea0" ] ] } ]

When running Start conversion I have this error:

2024-07-09 19:47:06 9 Jul 19:47:06 - [red] Uncaught Exception: 2024-07-09 19:47:06 9 Jul 19:47:06 - [error] Error: FFMpeg executable wasn't found. Install this package and check FFMpeg.cmd property 2024-07-09 19:47:06 at ChildProcess. (/data/node_modules/rtsp-ffmpeg/lib/rtsp-ffmpeg.js:117:10) 2024-07-09 19:47:06 at ChildProcess.emit (node:events:527:28) 2024-07-09 19:47:06 at Process.ChildProcess._handle.onexit (node:internal/child_process:289:12) 2024-07-09 19:47:06 at onErrorNT (node:internal/child_process:478:16) 2024-07-09 19:47:06 at processTicksAndRejections (node:internal/process/task_queues:83:21)

bartbutenaers commented 2 months ago

Hi @psd24,

This node depends on the rtsp-ffmpeg library, which requires ffmpeg to be installed. I will need to add that to the readme page as a prerequisite.

Can you plean explain a bit more what you problem is:

  1. You were not aware that FFmpeg needs to be installed (in your docker container).
  2. You have already installed FFmpeg (in your docker container), but this node cannot find it.

Bart

psd24 commented 2 months ago

My problem was the first:

You were not aware that FFmpeg needs to be installed (in your docker container).

psd24 commented 2 months ago

I still have the same error, I don't know how to solve the problem.

psd24 commented 2 months ago

Solved!

I have created a Dockerfile to install the ffmpeg package

FROM nodered/node-red:latest

USER root

RUN apk add --no-cache ffmpeg

USER node-red

bartbutenaers commented 2 months ago

Hi @psd24, glad to hear that your issue is solved! Thanks for sharing your solution, because that might be a great help for others!!