How to extract an Image from a video using FFMPEG and Node.JS

Sometimes we need to execute some tasks that aren’t as usual, such as we have a video and we need to get a thumbnail from that. In this article, we will use FFmpeg and Node.JS with Javascript to accomplish that.

First of all, ensure that you have the FFmpeg, if you have a Debian-like distribution, you can use the APT. FFmpeg is a powerful tool for the processing of audio and video.

sudo apt install ffmpeg

Otherwise, you can access this link and download and install the package for your operating system.

Now let's import the spawn function from the Node.JS child process module.

Website

Tags: FFMPEG Node