Skip to content

a node.js stream implementation that consumes http mjpeg streams

Notifications You must be signed in to change notification settings

Alan01252/mjpeg-consumer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mjpeg-consumer

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);

About

a node.js stream implementation that consumes http mjpeg streams

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%