Answer the question
In order to leave comments, you need to log in
How to record and stream video from multiple ip cameras, preferably with node.js?
The essence of the problem:
You need to record video from 4 ip-cameras to disk, small files, and at the same time you need the ability to turn on broadcasting to the server. Controlled with Raspberry pi 3 cameras, connected via usb modem to the internet (gray-ip).
Found options:
WebRTC - no recording to disk, the server cannot connect to the camera (gray-ip);
run avConv/ffMpeg separately for writing to disk and separately for broadcasting to the server via TCP/UDP/RTCP - performance problems, control problem (is there enough speed, is there an error).
avConv/ffMpeg and child_process.spawn:
- run avConv with output to a pipe
- node catches stdout and disposes of it as needed, uploading it to a file, or to the server (the server itself deals with the organization of the translation).
But it doesn’t work that way to start the rest of the cameras, as I understand it, there is only one stdout for all child processes. Switching to a new file also fails without a "space" while avConv is running.
Please tell me how this can be done, and if there are alternative solutions.
UPD:
to record from camera to disk I use:
ffmpeg -i input -v warning -c copy -map 0 -f ssegment -strftime 1 -segment_time 10 -segment_format mpeg
documentation with examples
Answer the question
In order to leave comments, you need to log in
Use NVR instead of rpi3. I did not understand the wording "the ability to include broadcast to the server."
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question