[FFmpeg-user] Npm - videoshow taking long time to convert video from images

Vivek Jain vivek.jain at mindtickle.com
Fri Feb 10 11:37:37 EET 2017

Hi Moritz,

My requirement is to create video using an audio and set of images with
varying durations. I wouldn't want to compromise the quality unless there
is no other way to reduce video generation time.

Would you be able to advise if there is a good npm module over ffmpeg which
does the conversion?

My end goal is to run ffmepg over AWS lambda and generate video, so I am
currently trying out various available node modules over ffmpeg.

Thanks in advance!


The below ffmpeg output is actually produced by npm-videoshow module (over

On Fri, Feb 10, 2017 at 2:37 PM, Moritz Barsnick <barsnick at gmx.net> wrote:

> On Fri, Feb 10, 2017 at 12:25:38 +0530, Vivek Jain wrote:
> > I am trying to create video using npm-videoshow, but it appears to take
> > considerable time (~3 minutes for 14 minute video). Could someone please
> > advise how can the timing be improved.
> [...]
> > ffmpeg process started: ffmpeg -i
> > /var/folders/9f/1wx7q0954l94rhtc4r6r95xw0000gn
> /T/videoshow-0bdf6f71-cc4d-498c-b7bf-eaf1eccaa9a6
> > -i /tmp/audio.mp3 -y -b:a 128k -ac 2 -r 25 -b:v 1024k -vcodec libx264
> > -filter:v scale=w=640:h=trunc(ow/a/2)*2 -f mp4 -map 0:0 -map 1:0 -t 864
> -af
> > afade=t=in:ss=0:st=0:d=3 -af afade=t=out:st=861:d=3 -pix_fmt yuv420p
> > video_test.mp4
> > Total Time in conversion: 3 minutes 5 seconds
> You didn't say anything about your requirements. There are a lot of
> things which can be done to increase conversion speed:
> - buy a faster CPU;
> - choose a faster codec, such as mpeg4;
> - reduce the size of the output video;
> - ...
> Or, assuming you actually want H.264 video with the given resolution:
> You can (almost) always exchange the parameters encoding quality,
> encoding speed, and bitrate (bandwidth) for each other. Using libx264,
> you could add "-preset ultrafast" and it will encode up to 10x as
> quickly - but the resulting file will suffer in quality. Or, if you
> drop the parameter "-b:v 1024k", the file may become very much larger.
> You can play with the presets until you hit an optimal compromise for
> yourself.
> Moritz
> P.S.: Isn't "scale=w=640:h=trunc(ow/a/2)*2" just a complicated way of
>       writing "scale=w=640:h=-2"?
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-user mailing list