错误:“无法找到FFMPEG”在Google云计算引擎Debian Wheezy 7.8管理实例即使安装 [英] ERROR : "Cannot Find FFMPEG" on Google Cloud Compute Engine Debian Wheezy 7.8 Managed Instance even though it's installed
问题描述
fluent-ffmpeg
模块来水印在平台上上传的视频。我将代码推送到我的Google Cloud Compute Engine项目,每次获得错误:找不到FFMPEG
。一旦创建实例,我会进入实例,并在实际测试代码之前运行这些命令来安装 FFMPEG
。我不知道是什么导致错误,因为在此之后,我肯定安装 FFMPEG
。 sudo apt-get update
sudo apt-get install -y ffmpeg
export FFMPEG_PATH =/ usr / bin / ffmpeg
export FFPROBE_PATH =/ usr / bin / ffprobe
以下是我的FFMPEG代码
function generate_thumbnail(name,path){
logging.info(Generating Thumbnail) ;
ffmpeg(path)
.setFfmpegPath('/ usr / bin / ffmpeg')
.setFfprobePath('/ usr / bin / ffprobe')
.on('end' ,函数(){
upload_thumbnail(name);
logging.info(Thumbnail Generated and uploaded);
return;
})
.on错误',函数(err,stdout,stderr){
logging.info('ERROR:'+ err.message);
logging.info('STDERR:'+ stderr);
})
.on('start',function(commandLine){
logging.info(commandLine);
})
.screenshots({
count:1 ,
filename:name +'_thumbnail.png',
文件夹:'public / images / thumbnailails /'
});
}
可以执行 / usr / bin / ffmpeg
从shell验证是否正确的路径?
您还可以设置FFMPEG的路径二进制手动使用 setFfmpegPath
方法。
I wrote a Node.JS application that uses the fluent-ffmpeg
module to watermark videos uploaded on the platform. I pushed the code to a my Google Cloud Compute Engine project, and every time I get Error : Cannot Find FFMPEG
. I ssh'd into the instance once it was created and ran these commands to install FFMPEG
before actually testing out the code. I am not sure what is causing the error because after this I am positive that FFMPEG
is installed.
sudo apt-get update
sudo apt-get install -y ffmpeg
export FFMPEG_PATH="/usr/bin/ffmpeg"
export FFPROBE_PATH="/usr/bin/ffprobe"
Below is my FFMPEG code
function generate_thumbnail(name, path){
logging.info("Generating Thumbnail");
ffmpeg(path)
.setFfmpegPath('/usr/bin/ffmpeg')
.setFfprobePath('/usr/bin/ffprobe')
.on('end', function() {
upload_thumbnail(name);
logging.info("Thumbnail Generated and uploaded");
return;
})
.on('error', function(err, stdout, stderr) {
logging.info('ERROR: ' + err.message);
logging.info('STDERR:' + stderr);
})
.on('start', function(commandLine) {
logging.info(commandLine);
})
.screenshots({
count: 1,
filename: name + '_thumbnail.png',
folder: 'public/images/thumbnails/'
});
}
Can you execute /usr/bin/ffmpeg
from the shell to verify if it's the correct path?
Also you can set path to the FFMPEG binary manually with setFfmpegPath
method.
这篇关于错误:“无法找到FFMPEG”在Google云计算引擎Debian Wheezy 7.8管理实例即使安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!