Git Product home page Git Product logo

videoshow's Introduction

videoshow Code Climate NPM

Simple utility for node.js to create straightforward video slideshows based on images using ffmpeg, 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, programmatic API and command-line 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 with additional compilation flags --enable-libass --enable-libmp3lame

You can download static builds of ffmpeg from here.

If you want to use videoshow in Heroku, you could use the ffmpeg2 buildpack

Installation

npm install videoshow

For command-line usage, install it as global package:

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 and examples for more usage details.

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

$ videoshow --help
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:

{
  "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<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 or bmp.

videoshow([ 'image1.jpg', 'image2.jpg', 'image3.jpg'])
  .save('video.mp4')
  .on('error', function () {})
  .on('end', function () {})

images param 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 () {})

Video options

You can define as option any method name allowed by fluent-ffmpeg

Default options are:

{
  fps: 25,
  loop: 5, // seconds
  transition: true,
  transitionDuration: 1,
  captionDelay: 1000,
  useSubRipSubtitles: false,
  subtitleStyle: null,
  videoBitrate: 1024,
  videoCodec: 'libx264',
  size: '640x?',
  audioBitrate: '128k',
  audioChannels: 2,
  format: 'mp4'
}

Options details:

  • captionDelay number - Miliseconds to delay the show/hide of the caption. Default to 1000
  • useSubRipSubtitles boolean - Use SubRip subtitles format. It uses by default SSA/ASS. Default false
  • subtitleStyle object - SSA/ASS subtitles style. See substation.js and fixture file for allowed params

Image options

  • path string - File path to image
  • loop number - Image slide duration in seconds. Default to 5
  • transition boolean - Enable fade in/out transition for the current image
  • transitionDuration number - Fade in/out transition duration in seconds. Default to 1
  • transitionColor string - Fade in/out transition background color. Default to black. See supported colors
  • filters array<string|object> - Add custom ffmpeg video filters to the image slide.
  • disableFadeOut boolean - If transition is enable, disable the fade out. Default false
  • disableFadeIn boolean - If transition is enable, disable the fade in. Default false
  • caption string - Caption text as subtitle. It allows a limited set of HTML tags. See Subrip
  • captionDelay number - Miliseconds to delay the show/hide of the caption. Default to 1000
  • captionStart number - Miliseconds to start the caption. Default to 1000
  • captionEnd number - Miliseconds to remove the caption. Default to loop - 1000
  • logo string - Path to logo image. See logo() method

videoshow#image(image)

Push an image to the video. You can pass an string as path to the image, or a plain object with image options

videoshow#audio(path [, params ])

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

Supported params:

  • delay number - Delay audio start in seconds. Default to 0 seconds
  • fade boolean - Enable audio fade in/out effect. Default true

videoshow#logo(path [, params ])

Add a custom image as logo in the left-upper corner by default. You can customize the position by x/y axis. It must be a png or jpeg image

Supported params:

  • start number - Video second to show the logo. Default 5 seconds
  • end number - Video second to remove the logo. Default totalLength - 5 seconds
  • xAxis number - Logo x axis position. Default 10
  • yAxis number - Logo y axis position. Default 10

videoshow#subtitles(path)

Define the SubRip subtitles or SubStation Alpha (SSA/ASS) file path to load. It should be a .str or .ass file respectively

See fixtures for examples

videoshow#save(path)

Return: EventEmitter Alias: render

Render and write in disk the resultant video in the given path

Supported events for subscription:

  • start cmd - Fired when ffmpeg process started
  • error error, stdout, stderr - Fired when transcoding error happens
  • progress data - Fired with transcoding progress information
  • codecData codec - Fired when input codec data is available
  • end videoPath - Fired when the process finish successfully

For more information, see the ffmpeg docs

videoshow#input(input)

Add input file to video. By default you don't need to call this method

videoshow#filter(filter)

Add a custom video filter to the video. See the docs

videoshow#complexFilter(filter)

Add a custom complex filter to the video. See the docs

videoshow#loop(seconds)

Default image loop time in seconds. Default to 5

videoshow#size(resolution)

Video size resolution. Default to 640x?. See the docs

videoshow#aspect(aspect)

Video aspect ration. Default autocalculated from video size param. See the docs

videoshow#options(options)

Alias: flags

Add a set of video output options as command-line flag. options argument should be an array. See the docs

videoshow#option(argument)

Alias: flag

Add a custom output option as command-line flag to pass to ffmpeg

videoshow#options(arguments)

Alias: flags

Add multiple output options as command-line flags to pass to ffmpeg. The argument must be an array

videoshow.VERSION

Type: string

Current package semantic version

videoshow.ffmpeg

Type: function

fluent-ffmpeg API constructor

License

MIT © Tomas Aparicio

videoshow's People

Contributors

csotiriou avatar dependabot[bot] avatar h2non avatar jice-lavocat avatar jordypereira avatar lipsumar avatar michaelrbock avatar michaelwschultz avatar mifi avatar slverma avatar world avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

videoshow's Issues

Error with different resolutions images

Hello, maybe i'm not understand clear, or this is ffmpeg issue, bu when i'm trying to create slideshow from images which have different resolutions, i get this error:

Error: Error: ffmpeg exited with code 1: Error configuring complex filters.
Invalid argument

(with one image and images with one resolution all is OK).

Can you help?)

little source code:

var videoshow = require('videoshow');
var fs = require('fs');
var images = [];
fs.readdirSync('./images').forEach((fileName) => {
  images.push('./images/' + fileName);
});
videoshow(images)
  .save('./result/result.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)
  });

Error: ffmpeg exited with code 1: Error configuring filter graph

@h2non I got error when trying to run this script (copied from https://github.com/h2non/videoshow/blob/master/examples/captions.js)

node index.js
ffmpeg process started: ffmpeg -i C:\Users\IAMCAP~1\AppData\Local\Temp\videoshow-4cbc73e2-53ac-4f0e-aaea-f0f007c8b20d -i C:\Users\IAMCAP~1\AppData\Local\Temp\videoshow-b3d807ab-b90a-415d-8780-52514baadd16 -i C:\Users\IAMCAP~1\AppData\Local\Temp\videoshow-ebcbe074-4099-4d29-abe2-17e258b179bf -i C:\Users\IAMCAP~1\AppData\Local\Temp\videoshow-cffb888b-8de6-4fe4-9c81-9835f7d4471b -i C:\Users\IAMCAP~1\AppData\Local\Temp\videoshow-d0d6a4c7-8a8a-4bae-ae89-1f11c3469967 -y -filter_complex concat=n=5:v=1:a=0 video.mp4
ffmpeg process started: ffmpeg -i C:\Users\IAMCAP~1\AppData\Local\Temp\videoshow-beab2652-1be8-4c75-8a6e-be2070d7b06c -y -vf subtitles='C:\Users\IAMCAP~1\AppData\Local\Temp\videoshow-20519391-39bb-43a5-81d2-60c33c4e2c52.ass' video.mp4
Error: Error: ffmpeg exited with code 1: Error configuring filter graph
Conversion failed!

    at ChildProcess.<anonymous> (D:\videotest\node_modules\fluent-ffmpeg\lib\processor.js:177:22)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)

my code:

const videoshow = require('videoshow')
const path = require('path')
const assetPath = path.join(__dirname, 'assets')
const binPath = path.join(__dirname, 'bin')

videoshow.ffmpeg.setFfmpegPath(path.join(binPath, 'ffmpeg.exe'))
videoshow.ffmpeg.setFfprobePath(path.join(binPath, 'ffprobe.exe')) 

const audio = path.join(assetPath, 'song.mp3')
const options = {
  loop: 5,
  captionDelay: 350,
  transition: true,
  useSubRipSubtitles: false,
  subtitleStyle: {
    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'
  }
}

const images = [
  {
    path: path.join(assetPath, 'step_1.png'),
    caption: 'This is a sample subtitle'
  }, {
    path: path.join(assetPath, 'step_2.png'),
    caption: 'Another sample text',
    loop: 5
  }, {
    path: path.join(assetPath, 'step_3.png'),
    caption: 'Fast caption',
    captionStart: 2,
    captionEnd: 3
  }, {
    path: path.join(assetPath, 'step_4.png'),
    loop: 3
  }, {
    path: path.join(assetPath, 'step_5.png'),
    caption: 'Bye bye'
  }
]

videoshow(images, options)
.audio(audio)
.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)
})

Error when increasing resolution

Hi, i like your tool, it is exactly what i need at the moment.
I want to make a 4k (2160p) presentation - the images are already in the correct (exactly the same) resolution.
Everything works fine when I use the default 640x? resolution but once i increase it to 3840x? it crashes with:
image

used ffmpeg:
image

@h2non Do you have any steps I could undertake to further debug it or make it work?

Related stuff

used config: http://pastebin.com/Cs03Fqt6
increasing the videoBitrate does not make any difference
test files:
step1
step2

Add zoom effect

CLI:

ffmpeg -i small.mp4 -vf "zoompan=z='min(zoom+0.0015,1.5)':d=125:s=640x360" -c:v libx264 -c:a libfdk_aac -y smallzoom.mp4
ffmpeg -loop 1 -i image_1.jpg -vf "zoompan=z='if(lte(zoom,1.0),1.5,max(1.001,zoom-0.0015))':d=125" -c:v libx264 -t 5 -s "800x450" zoomout.mp4

https://www.youtube.com/watch?v=Fn-IkKbPWhc

Whenever I try to use audio I get ffmpeg exited with code 1

I already try to run the audio.js example and it also fails. Any ideas on what might be the problem?

node audio.js 
ffmpeg process started: ffmpeg -i /tmp/videoshow-92cc3d6e-7366-47e2-92f4-c476c6a63d69 -i /tmp/videoshow-14bb10cf-26d1-4eb7-85a6-04cc133165bf -i /tmp/videoshow-c33edbe2-0d3e-4032-8069-3f8780267a22 -i /tmp/videoshow-f8d15b26-0ca5-4aeb-8b62-2534a20dd1a3 -i /tmp/videoshow-f26c58a8-93a7-4bac-b4b2-2881ecb3d8c0 -y -filter_complex concat=n=5:v=1:a=0 video.mp4
ffmpeg process started: ffmpeg -i /tmp/videoshow-0053cdc2-eefc-48e6-8e96-f566b7b35b3c -itsoffset 2 -i /home/...../Documents/Projects/videoshow/examples/../test/fixtures/song.mp3 -y -map 0:0 -map 1:0 -t 25 -af afade=t=in:ss=0:st=2:d=3 -af afade=t=out:st=22:d=3 video.mp4
Error: [Error: ffmpeg exited with code 1: ]

safari is not able to recognise mp4 generated file

Hi,

with this code I'm able to generate a .mp4

videoshow(filePaths, {size: '320x?'})
                .save("./video__"+base_Image+".mp4")
                .on('error', function (e) {
                    console.log("error mp4", e);
                })
                .on('end', function (e) {
                    console.log("end mp4");
                });

Chrome is capable to read it, Safari isn't.
Why?

Error when running this module : Error: Cannot find ffmpeg

I am using videoshow module to generate video but it is throwing error when i am running the module.
Here is the code which i am using :

createVideo: function(req,res,next) { 
    var images = [
          '1.jpg',
          '2.jpg',
          '3.jpg',
          '4.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'
    }

    videoshow(images, videoOptions)
      .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)
      })
}

When i am running the code it is showing the error below :

Error: [Error: Cannot find ffmpeg]
ffmpeg stderr: undefined

Missing frames in generated video

Hi

I created a series of images and want to convert it to a video with audio
140 images with 0.1 sec loop for each image
If audio is added the video comes out to be 14 seconds with last 20 images missing
If audio is NOT added the video comes out to be 16 seconds

Cant we have 14 second video with audio having all images

Generate video from images with different dimensions

with ffmpeg I can create a video with images with multiple different dimensions calling this:

ffmpeg -r 30 -i %0d.jpg -vf "scale=1920:1080,format=yuv420p" -codec:v libx264 out.mp4

Is it possible to add the -vf "scale=1920:1080,format=yuv420p" to the videoshow command?
I tried to just pass to the options
filters: [{ filter: 'scale', options: [640, -1] }] but this did not worked, It still causes an error when passing images with different dimensions:

Error: [Error: ffmpeg exited with code 1: Error configuring complex filters. Invalid argument ]

Thanks for the amazing work on this!

No `loop` delay

If I wanted to just have the images be run in sequence at say 25fps, how would I go about doing that? I cannot seem to disable the loop option, and setting it's value to something like 1/25 (or 0.04), the resulting video is borken.

Video Codec libx264 Not Found

I have script to make videoshow,
but when i running my script, i got this error :

jehan [images] Do > node index.js 
Error :  Error: Video codec libx264 is not available
    at /var/www/html/images/node_modules/fluent-ffmpeg/lib/capabilities.js:656:21
    at nextTask (/var/www/html/images/node_modules/async/dist/async.js:5297:14)
    at next (/var/www/html/images/node_modules/async/dist/async.js:5304:9)
    at /var/www/html/images/node_modules/async/dist/async.js:906:16
    at /var/www/html/images/node_modules/fluent-ffmpeg/lib/capabilities.js:484:7
    at handleExit (/var/www/html/images/node_modules/fluent-ffmpeg/lib/processor.js:170:11)
    at Socket.<anonymous> (/var/www/html/images/node_modules/fluent-ffmpeg/lib/processor.js:197:11)
    at emitOne (events.js:101:20)
    at Socket.emit (events.js:191:7)
    at Pipe._handle.close [as _onclose] (net.js:509:12)

Examples captions.js, logo.js, and subtitles.js throw error

I cloned this repository.

Examples captions.js, logo.js, and subtitles.js throw this error:

Error: Error: ffmpeg exited with code 1: Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!

at ChildProcess.<anonymous> (/Users/adam/Apps/affirmations/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

If you cannot replicate this, let me know what information you need from me.

Thanks!

animated gif support?

Noticed in your readme that you mentioned their was .gif support - but not sure if that included animated gifs.

I tried changing your audio example to include the chuck norris gif:

screen shot 2017-07-11 at 4 03 36 pm

But i get the following error:

$ node audio.js 
Error: Error: ffmpeg exited with code 1: Option loop not found.
at ChildProcess.<anonymous> (/Users/fat/Workspace/videoshow/node_modules/fluent-ffmpeg/lib/processor.js:182:22)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

Is there something else i need to change? or is this not supported. Thnks!

Use domains to handle exceptions from child_process

2015-04-28T08:52:35.963Z => Process failed
2015-04-28T08:52:35.963Z => [Error: ffmpeg exited with code 1: Codec AVOption b (set bitrate (in bits/s)) specified for output file #0 (/var/folders/p1/15c605p509x5q82cttnb2fxc0000gn/T/videoshow-4a733962-bcf7-422c-b97b-d19c07da9a1a) has not been used for any stream. The most likely reason is either wrong type (e.g. a video option with no video streams) or that it is a private option of some encoder which was not actually used for any stream.
Output #0, mp4, to '/var/folders/p1/15c605p509x5q82cttnb2fxc0000gn/T/videoshow-4a733962-bcf7-422c-b97b-d19c07da9a1a':
Output file #0 does not contain any stream
]

Unable to specify -pix_fmt

I am unable to specify -pix_fmt as a video option. Which makes the video that i create not working on quick time player

Adding an intro/outro clip

Hi h2non,

Thanks for this wonderful script. I'd like to add intro/outro video clips to my videoshows.
I tried to use the input() method but with no luck. Here is what I tried :

var intro = "shared/intro.mp4";
var logo = 'shared/logo.png';
var mp3File = rootFolder + 'myAudio.mp3';
var loopTime = 15;
var images = [
  'step_1.png',
  'step_2.png',
  'step_3.png'
];
var videoOptions = {
      fps: 25,
      loop: loopTime, // seconds
      //loop: 5, // seconds
      transition: true,
      transitionDuration: 1, // seconds
      videoBitrate: 1024,
      videoCodec: 'libx264',
      size: '640x?',
      audioBitrate: '128k',
      audioChannels: 2,
      format: 'mp4'
    }

    var audioParams = {
      fade: true,
      delay: 2 // seconds
    }
videoshow(images, videoOptions)
  .input(intro)
  .audio(mp3File, audioParams)
  .logo(logo)
  .save(rootFolder + '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)
  })

The file runs smoothly however, the intro is not appended to the begginning as I had expected. Here is log (some filenames might have changed since I adapted the example for readability purposes) :

ffmpeg process started: ffmpeg -i C:\Users\STEPHA~1\AppData\Local\Temp\videoshow-1eea30e5-af
db-48aa-addc-9785730f5ff9 -i C:\Users\STEPHA~1\AppData\Local\Temp\videoshow-42c55feb-986c-42
7a-910f-216f3d1fb9fe -i C:\Users\STEPHA~1\AppData\Local\Temp\videoshow-49c56b42-70cf-4b4f-be
8b-56514d1defc5 -i C:\Users\STEPHA~1\AppData\Local\Temp\videoshow-7a1a29df-bac7-483b-a219-48
7ba160b802 -y -filter_complex concat=n=4:v=1:a=0 episodes/713/video.mp4

ffmpeg process started: ffmpeg -i C:\Users\STEPHA~1\AppData\Local\Temp\videoshow-334ba015-7b
d1-42e3-9fcf-e725f434b0c4 -itsoffset 2 -i episodes/713/myAudio.mp3 -i shared/intro.mp4 -y -b:a 1
28k -ac 2 -r 25 -b:v 1024k -vcodec libx264 -filter:v scale=w=640:h=trunc(ow/a/2)*2 -f mp4 -m
ap 0:0 -map 1:0 -t 53.228833333333334 -af afade=t=in:ss=0:st=2:d=3 -af afade=t=out:st=50.228
833333333334:d=3 episodes/713/video.mp4

ffmpeg process started: ffmpeg -i C:\Users\STEPHA~1\AppData\Local\Temp\videoshow-334ba015-7b
d1-42e3-9fcf-e725f434b0c4 -i shared/logo.png -y -filter_complex [0:v][1:v]overlay=10:10:e
nable=between(t\,10\,43) episodes/713/video.mp4
Video created in: episodes/713/video.mp4

Do you have any indications on how to correctly use 'input' ?

Error: Cannot find ffmpeg

Here my package.json file

{
  "name": "frames-to-video",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "me",
  "license": "ISC",
  "dependencies": {
    "fluent-ffmpeg": "^2.1.2",
    "videoshow": "^0.1.11"
  }
}

I just copied the code which is in the readme.md file and I got this error.

Error when i use captions.

Error: Error: ffmpeg exited with code 1: Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!

Using the latest version on OSX seirra.

ffmpeg -version output:
ffmpeg version 3.3.3 Copyright (c) 2000-2017 the FFmpeg developers
built with Apple LLVM version 8.1.0 (clang-802.0.42)
configuration: --prefix=/usr/local/Cellar/ffmpeg/3.3.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-hardcoded-tables --enable-avresample --cc=clang --host-cflags= --host-ldflags= --enable-libmp3lame --enable-libx264 --enable-libxvid --enable-opencl --disable-lzma --enable-vda
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libavresample 3. 5. 0 / 3. 5. 0
libswscale 4. 6.100 / 4. 6.100
libswresample 2. 7.100 / 2. 7.100
libpostproc 54. 5.100 / 54. 5.100

Audio loop

Hi. Thanks for the awesome library. I can create videos just fine but since I'm creating these dynamically, I'd like a way to make the audio loop if the video turns out to be longer than the audio duration. Is that possible?

Videoshow with Images that Have different Dimensions

I am trying to use videoshow with images of different dimensions and I'm getting the error:

Error: Error: ffmpeg exited with code 1: Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #2:0
Conversion failed!

I'm wondering how to incorporate the complex filters that you suggested on another forum OR how I can go about this another way.

The issue has been troubling me for weeks.

Support image2pipe

Does it support, or if not, it would be nice to support ffmpeg's image2pipe and be able to pipe a stream of images from another process (that maybe generate them dynamically) directly instead of reading images from disk.

Adding special effects

I can't change transistion effect, there was only fade in and fade out but I have to do different one. Like as

 {
    path: '0.png',
 filter:zoompan=z='min(zoom+0.0015,1.5)':d=700:x='if(gte(zoom,1.5),x,x+1/a)':y='if(gte(zoom,1.5),y,y+1)':s=640x360`,
   }, 

or :

blend=all_expr='A_(if(gte(T,0.5),1,T/0.5))+B_(1-(if(gte(T,0.5),1,T/0.5)))'

Video does not play on mobile

Hi
I created a video using videoshow and video is playing on laptop but not on mobile
The parameters provided are below

                fps: 25,
                loop: 0.1, // seconds
                transition: false,
                videoBitrate: 1024,
                videoCodec: 'libx264',
                size: '640x?',
                audioBitrate: '128k',
                audioChannels: 2,
                format: 'mp4'

Need help

I am new in node.js , I want to create web application which takes images and audio and will generate video corresponding to that.
I have view your videoshow and thought that is best suited for my need but can you guide me how to implement that code for dedicated purpose.

Kindly response as soon as possible as I am already very late

How to change speed to ultrafast? [Help request]

On this page of the ffmpeg docs, it indicates there are several presets for render configs that affect speed.

I am using videoshow in a personal project and have noticed extremely long render times, up to 20 minutes for a 6 minute video, etc. How is it possible to use one of these speed presets with videoshow?

Thanks.

ffmpeg exited with code 1: Error opening filters!

How to fix this ?

Here is my FFmpeg configuration:

--prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --enable-bzlib --disable-crystalhd --enable-frei0r --enable-gnutls --enable-libass --enable-libcdio --enable-libcelt --enable-libdc1394 --disable-indev=jack --enable-libfreetype --enable-libgsm --enable-libmp3lame --enable-openal --enable-libopencv --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab --enable-avfilter --enable-avresample --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-runtime-cpudetect

Thanks

captions.js example throw new Error('No input specified');

hi.I'm from project operates example, and audio.js no problem,but captions.js example throw new Error('No input specified'). can you help me? by the way.I have and demand is image turning the video.Image requires animation effects, not only effects that fade in shallow.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.