justadudewhohacks / justadudewhohacks/opencv4nodejs

opencv to http mjpeg stream?

Open
#482 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
5.1k
Forks
826
PR merge metrics
No merged PRs in 30d

Description

I have working opencv4nodejs code to detect camera focus blur using laplacian, median etc. I also have mjpg-streamer working. Both use video0 uvc device on raspi but not at the same time.

I want to run both at the same time so I can view the video stream at a decent rate while opencv picks out a frame now and then to calculate focus blur. The blur values can go to stdout or any other output.

I have tried loopback to generate video1 from video0 using gstreamer with no success.

My current idea is to somehow send video frames from opencv to mjpg-streamer or any other http server. How can I do this?

I know about videowriter but the only examples I can find go to a file or ffmpeg. I looked at ffmpeg/ffserver but it looks slow and complicated. Is it the only solution? I guess I am just looking for options.

Thanks in advance.

Contributor guide

Open the contributing guide

Research direction

Review the OpenCV capture and frame-handling APIs exposed by opencv4nodejs, then compare the issue's mjpg-streamer, GStreamer loopback, and HTTP MJPEG options. There are no repository files or tests named; done would require a decided, maintainable approach for simultaneous camera analysis and HTTP video streaming.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, opencv, raspberry-pi
Domain
audio-video-rtc, computer-vision, embedded-iot
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.