Skip to content

Takes a stream of JPEGs, like from image2pipe of ffmpeg, and emits the individual JPEGs from them

License

Notifications You must be signed in to change notification settings

madshall/jpg-streamer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Takes a stream of JPEGs, like from image2pipe of ffmpeg, and emits the individual JPEGs from them

Resources

License

Stars

Watchers

Forks

Packages

No packages published