Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mjpeg-consumer

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mjpeg-consumer

a stream implementation that consumes http mjpeg streams and emits jpegs as buffers

  • 0.3.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.7K
decreased by-7.38%
Maintainers
1
Weekly downloads
 
Created
Source

mjpeg-consumer

A node.js stream implementation that consumes http mjpeg streams and emits jpegs.

###Install###

npm install mjpeg-consumer

###Objects### Requiring the mjpeg-consumer module returns a readable/writable stream implementation that takes an http mjpeg stream and emits jpegs.

var MjpegConsumer = require("mjpeg-consumer");
var consumer = new MjpegConsumer();

###Usage### The mjpeg-consumer isn't very useful without a writable pipe to pipe jpegs to. I've built the file-on-write stream to write a file every time write is called on it. The below example opens a stream to an IP camera, pipes the results to the mjpeg-consumer which processes the stream and emits parsed jpegs to the file-on-write writer.

var request = require("request");
var MjpegConsumer = require("mjpeg-consumer");
var FileOnWrite = require("file-on-write");

var writer = new FileOnWrite({ 
	path: './video',
	ext: '.jpg'
});
var consumer = new MjpegConsumer();

request("http://192.168.1.2/videostream.cgi").pipe(consumer).pipe(writer);

Keywords

FAQs

Package last updated on 04 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc