Last Updated: February 25, 2016
· mattcodez

Making Screen Shots With Fluent-FFMPEG

I have a project that does a video conversion using fluent-ffmpeg for NodeJS. I decided to make a thumbnail using the screenshots() method. This resulted in ffmpeg being launched twice. Turns out that screenshots() is a processing method. Along with save(), pipe() and run(). I already was using save(filename) causing it to be launched twice.

Solution? Use the output(filename) method to set the video output destination instead of save(). output() won't cause ffmpeg to run, but screenshots() will. So you get both your thumbnail and video conversion done in one process launch.