UNPKG

videoshowlas

Version:

Simple command-line and programmatic interface to create videos slideshows from images using ffmpeg

22 lines (19 loc) 564 B
var videoshow = require('../') var images = [ __dirname + '/../test/fixtures/step_1.png', __dirname + '/../test/fixtures/step_2.png', __dirname + '/../test/fixtures/step_3.png', __dirname + '/../test/fixtures/step_4.png', __dirname + '/../test/fixtures/step_5.png' ] videoshow(images) .save('video.mp4') .on('start', function (command) { console.log('ffmpeg process started:', command) }) .on('error', function (err) { console.error('Error:', err) }) .on('end', function (output) { console.log('Video created in:', output) })