找不到 ffprobe?

Cannot find ffprobe?

我正在尝试在我的节点项目中生成我尝试过的视频缩略图 thumbsupply 和 video-thumbnail npm 都 returns 相同的错误称为 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);

Thumbsuplly 使用 fluent-ffmpeg(通过快速查看源代码):

fluent-ffmpeg 在上面的 link 中提供了有关 ffmpeg 安装要求和所需路径的信息。

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 详细信息包括安装在这里:https://www.ffmpeg.org/download.html

我也遇到了这个问题Error: Cannot find ffprobe

我已完成以下步骤以使其在 ubuntu

中正常工作

sudo apt update

sudo apt install ffmpeg

重新启动了我的 pm2 api 实例。

这是我的部署服务器案例,

因为我在本地工作 mac os,所以我使用了

brew install ffmpeg