Simple programmatic interface for node/io.js to create straightforward slide show videos based from a series of images using ffmpeg
You can easily create videos from images with optional audio, subtitles and fade-in/out effects. Take a look to examples to see some supported features
Still beta
- ffmpeg with additional compilation flags
--enable-libass --enable-libmp3lame
npm install videoshow
var videoshow = require('videoshow')
var images = [
'step1.jpg',
'step2.jpg',
'step3.jpg',
'step4.jpg'
]
var videoOptions = {
fps: 25,
loop: 5, // seconds
videoBitrate: 1024,
videoCodec: 'libx264',
size: '640x?',
audioBitrate: '128k',
audioChannels: 2,
format: 'mp4'
}
videoshow(images, videoOptions)
.audio('song.mp3')
.save('video.mp4')
Return: Videoshow
Videoshow constructor. You should pass an array<string>
or array<object>
or array<ReadableStream>
with the desired images,
and optionally passing the video render options
object per each image.
Image formats supported are: jpg
, png
, gif
, bmp
videoshow([ 'image1.jpg', 'image2.jpg', 'image3.jpg'])
.save('video.mp4')
.on('error', function () {})
.on('end', function () {})
Images could be a collection as well:
videoshow([{
path: 'image1.jpg',
caption: 'Hello world as video subtitle'
}, {
path: 'image2.jpg',
caption: 'This is a sample subtitle',
loop: 10 // long caption
}])
.save('video.mp4')
.on('error', function () {})
.on('end', function () {})
Define the audio file path to use. It supports multiple formats and codecs such as acc
, mp3
or ogg
Define the SubRip subtitles
file path to load. It should be a .srt
file
Return: EventEmitter
Render and write the final video in the given path
Add custom filter to the video
Add specific image rendering options
Add custom video rendering options
Add a custom CLI flag to pass to ffmpeg
Type: string
Current package semantic version
Type: function
fluent-ffmpeg API constructor
MIT © Tomas Aparicio