Skip to content

Latest commit

 

History

History
112 lines (73 loc) · 2.84 KB

README.md

File metadata and controls

112 lines (73 loc) · 2.84 KB

videoshow Build Status Dependency Status Code Climate NPM

Simple programmatic interface for node/io.js to create basic video slides from images using ffmpeg

With videoshow you to create videos form images with audio, subtitles and fade-in/out transitions. Take a look to the examples to see the supported features

Still beta

Requirements

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

Installation

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

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