Skip to content

A very simply library that supports parsing MJPEG stream into individual JPEG streams.

License

Notifications You must be signed in to change notification settings

sarosia/mjpeg2jpegs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mjpeg2jpegs

mjpeg2jpegs - convert a MJPEG stream to mutliple JPEGs

NPM Version NPM Downloads

It allows you to convert a MJPEG stream to multiple JPEGs, which is quite useful if you want to save the MJPEG stream from a webcam into a stream of JPEGs for further post-processing.

Example

var mjpeg2jpegs = require("mjpeg2jpegs");
var http = require("http");
http.request({
    hostname: "localhost",
    path: "/videostream.cgi",
}, mjpeg2jpegs(function (res) {
    res.on("imageHeader", function (header) {
        console.log("Image header: ", header);
    });
    res.on("imageData", function (data) {
        console.log("Image data: ", data.length);
    });
    res.on("imageEnd", function () {
        console.log("Image end");
    });
})).end();

Installation

npm install mjpeg2jpegs

License

MIT

About

A very simply library that supports parsing MJPEG stream into individual JPEG streams.

Resources

License

Stars

Watchers

Forks

Packages

No packages published