Cannot find ffprobe?

喜欢而已 提交于 2020-01-25 09:59:07

问题


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);

回答1:


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

  • https://github.com/fluent-ffmpeg/node-fluent-ffmpeg

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



来源:https://stackoverflow.com/questions/54981140/cannot-find-ffprobe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!