From 6ea53b11917eec0aaf3ac2e72985190b55c1263f Mon Sep 17 00:00:00 2001 From: Martin Barker Date: Sun, 26 Jul 2020 17:06:46 -0700 Subject: [PATCH] Update image2video.js this code is outdated and will result in the error: ```index.js:132 an error happened: ffmpeg exited with code 1: Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height Conversion failed!``` without including: //audio bitrate .audioBitrate('128k') //video bitrate .videoBitrate('8000k', true) //resolution .size('1920x1080') --- examples/image2video.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/examples/image2video.js b/examples/image2video.js index eee2dd9b..91ab430f 100644 --- a/examples/image2video.js +++ b/examples/image2video.js @@ -6,6 +6,12 @@ var proc = ffmpeg('/path/to/your_image.jpg') .loop(5) // using 25 fps .fps(25) + //audio bitrate + .audioBitrate('128k') + //video bitrate + .videoBitrate('8000k', true) + //resolution + .size('1920x1080') // setup event handlers .on('end', function() { console.log('file has been converted succesfully');