jpg-streamer
v0.1.3
Published
Takes a stream of JPEGs, like from image2pipe of ffmpeg, and emits the individual JPEGs from them.
Downloads
8
Readme
jpg-streamer
A little module for splitting out individual JPEG files from streams.
Example
var JpgStreamer = require('jpg-streamer');
var spawn = require('child_process').spawn;
ffmpeg = spawn('ffmpeg', ffmpegArgs);
new JpgStreamer(ffmpeg, , function(err, buffer){
if (err) throw err;
fs.writeFile('screenshot_' + fileIndex++ + '.jpg', buffer, function (err) {
if (err) throw err;
});
});