Seryh
Seryh

Reputation: 3294

How read stream web cam in node.js for mac os?

I seen analog lib "camelot" and "imagesnap" in npm repositories.
"camelot" - work only in linux os (because it uses /dev/videoX).
"imagesnap" - support only create jpg and not support created stream. Same it lib is binary.
What may be a simple solution?

Upvotes: 1

Views: 2580

Answers (2)

Seryh
Seryh

Reputation: 3294

worked with lib https://github.com/wearefractal/camera, for mac os need install opencv, i'm use brew install opencv. it's really work!!

Upvotes: 1

Romain
Romain

Reputation: 2348

I haven't got everything working yet, but connecting to GStreamer over TCP from Node looks promising:

http://delog.wordpress.com/2011/04/26/stream-live-webm-video-to-browser-using-node-js-and-gstreamer/

The tutorial is about Linux, but most things should have an OSX equivalent. To get started:

  1. Install XQuartz: https://xquartz.macosforge.org
  2. brew install gstreamer
  3. brew install gst-plugins-good
  4. brew install gst-plugins-bad

If everything installed properly, this command should give you a test video source:

gst-launch-1.0 videotestsrc ! osxvideosink

I'm now trying to figure out how to get the webcam. I think the built-in webcam is locked down, but hopefully an external one might work.

I'm interested to hear if you make any progress!

Upvotes: 0

Related Questions