Skip to content

Simple node.js utility to create video slideshows from images with optional audio and visual effects using ffmpeg

License

Notifications You must be signed in to change notification settings

tenthirtyone/videoshow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

videoshow Build Status Code Climate NPM Dependency Status

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

Requirements

  • ffmpeg with additional compilation flags --enable-libass --enable-libmp3lame

Install

npm install videoshow

Usage

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')

API

videoshow(images, [ options ])

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', 'image'])
  .save('video.mp4')
  .on('error', function () {})
  .on('end', function () {})

videoshow#audio(path)

Define the audio file path to use. It supports multiple formats and codecs such as acc, mp3 or ogg

videoshow#subtitles(path)

Define the SubRip subtitles file path to load. It should be a .srt file

videoshow#save(path)

Return: EventEmitter

Render and write the final video in the given path

videoshow#filter(filter)

Add custom filter to the video

videoshow#imageOptions(options)

Add specific image rendering options

videoshow#options(options)

Add custom video rendering options

videoshow#flag(argument)

Add a custom CLI flag to pass to ffmpeg

videoshow.VERSION

Type: string

Current package semantic version

videoshow.ffmpeg

Type: function

fluent-ffmpeg API constructor

License

MIT © Tomas Aparicio

About

Simple node.js utility to create video slideshows from images with optional audio and visual effects using ffmpeg

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 99.1%
  • Makefile 0.9%