🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

tessel-mjpeg-consumer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tessel-mjpeg-consumer

Fork of mjpeg-consumer.

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

tessel-mjpeg-consumer

This is a fork

  • Defines MjpegConsumer as a class
  • Eliminates the buffertools dependency. That dependency existed only to provide a concat method, which is provided by the runtime as Buffer.concat(...)
  • Eliminates oldBufferType mode
  • Eliminates invocation without new

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

build status Coverage Status

Install

npm install mjpeg-consumer

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://mjpeg.sanford.io/count.mjpeg").pipe(consumer).pipe(writer);

Keywords

mjpg

FAQs

Package last updated on 21 Oct 2016

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