# videoshow
**Repository Path**: mirrors_h2non/videoshow
## Basic Information
- **Project Name**: videoshow
- **Description**: Simple node.js utility to create video slideshows from images with optional audio and visual effects using ffmpeg
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2020-08-08
- **Last Updated**: 2025-12-27
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# videoshow [](https://codeclimate.com/github/h2non/videoshow) [][npm]
Simple utility for **node.js** to **create straightforward video slideshows based on images** using [ffmpeg](http://ffmpeg.org), with additional features such as **audio**, **subtitles** and **fade in/out transitions** between slides.
To getting started you can take a look to the [examples](https://github.com/h2non/videoshow/tree/master/examples), [programmatic API](#api) and [command-line](#command-line-interface) interface
videoshow is used in production rendering thousands of videos per month.
Click on the image to see an example video generated by `videoshow`:
## Requirements
- **[ffmpeg](http://ffmpeg.org)** with additional compilation flags `--enable-libass --enable-libmp3lame`
You can download static builds of ffmpeg from [here](http://johnvansickle.com/ffmpeg/).
If you want to use videoshow in Heroku, you could use the [ffmpeg2](https://github.com/h2non/heroku-buildpack-ffmpeg2) buildpack
## Installation
```bash
npm install videoshow
```
For command-line usage, install it as global package:
```bash
npm install -g videoshow
```
## Usage
**NOTE**: images must all have the same dimensions.
Below you have an example script generating a video based on images and audio.
Take a look to the [programmatic API](#api) and [examples](examples/) for more usage details.
```js
var videoshow = require('videoshow')
var images = [
'step1.jpg',
'step2.jpg',
'step3.jpg',
'step4.jpg'
]
var videoOptions = {
fps: 25,
loop: 5, // seconds
transition: true,
transitionDuration: 1, // seconds
videoBitrate: 1024,
videoCodec: 'libx264',
size: '640x?',
audioBitrate: '128k',
audioChannels: 2,
format: 'mp4',
pixelFormat: 'yuv420p'
}
videoshow(images, videoOptions)
.audio('song.mp3')
.save('video.mp4')
.on('start', function (command) {
console.log('ffmpeg process started:', command)
})
.on('error', function (err, stdout, stderr) {
console.error('Error:', err)
console.error('ffmpeg stderr:', stderr)
})
.on('end', function (output) {
console.error('Video created in:', output)
})
```
## Command-line interface
```bash
$ videoshow --help
```
```bash
Create video slideshow easily from images
Usage: bin/videoshow [options]
Options:
--help, -h Show help
--config, -c File path to JSON config file [required]
--audio, -a Optional audio file path
--subtitles, -s Path to .srt subtitles file
--input, -i Add additional input to video
--output, -o Output video file path
--size, -x Video size resolution
--logo, -l Path to logo image
--debug, -d Enable debug mode in error case
Examples:
bin/videoshow -c config.json video.mp4
bin/videoshow -c config.json --audio song.mp3 video.mp4
bin/videoshow -c config.json --audio song.mp3 --logo logo.png video.mp4
```
Example `config.json` file:
```json
{
"output": "video.mp4",
"options": {
"fps": 25,
"loop": 5,
"transition": true,
"transitionDuration": 1,
"videoBitrate": 1024,
"videoCodec": "libx264",
"size": "640x?",
"audioBitrate": "128k",
"audioChannels": 2,
"format": "mp4",
"subtitleStyles": {
"Fontname": "Verdana",
"Fontsize": "26",
"PrimaryColour": "11861244",
"SecondaryColour": "11861244",
"TertiaryColour": "11861244",
"BackColour": "-2147483640",
"Bold": "2",
"Italic": "0",
"BorderStyle": "2",
"Outline": "2",
"Shadow": "3",
"Alignment": "1",
"MarginL": "40",
"MarginR": "60",
"MarginV": "40"
}
},
"images": [
"./test/fixtures/step_1.png",
"./test/fixtures/step_2.png",
"./test/fixtures/step_3.png",
"./test/fixtures/step_4.png",
"./test/fixtures/step_5.png"
]
}
```
## API
### `videoshow(images, [ options ])`
Return: `Videoshow`
Videoshow constructor. You should pass an `array` or `array