Cannot find ffprobe?

Schüler picture Schüler · Mar 4, 2019 · Viewed 7k times · Source

I am trying to generate video thumbnail in my node project for that I tried thumbsupply and video-thumbnail npm both returns the same error called not found: ffprobe

const thumbsupply = require('thumbsupply'); 
const ffprobe = require('@ffprobe-installer/ffprobe');
let aa =   thumbsupply.generateThumbnail('videoplayback.mp4', {
                                            size: thumbsupply.ThumbSize.MEDIUM, // or ThumbSize.LARGE
                                            timestamp: "10%", // or `30` for 30 seconds
                                            forceCreate: true,
                                            cacheDir: "~/myapp/cache",
                                            mimetype: "video/mp4"
                                           })
                                     console.log(aa);

Answer

Mick picture Mick · Mar 4, 2019

Thumbsuplly uses fluent-ffmpeg (from a quick look at the source):

fluent-ffmpeg has information on the requirements around ffmpeg installation and the required path at the link above.

Prerequisites

ffmpeg and ffprobe

fluent-ffmpeg requires ffmpeg >= 0.9 to work. It may work with previous versions but several features won't be available (and the library is not tested with lower versions anylonger).

If the FFMPEG_PATH environment variable is set, fluent-ffmpeg will use it as the full path to the ffmpeg executable. Otherwise, it will attempt to call ffmpeg directly (so it should be in your PATH). You must also have ffprobe installed (it comes with ffmpeg in most distributions). Similarly, fluent-ffmpeg will use the FFPROBE_PATH environment variable if it is set, otherwise it will attempt to call it in the PATH.

ffmpeg details including installation is here: https://www.ffmpeg.org/download.html