Closed trevordowdle closed 7 years ago
This probably isn't an issue related to fluent-ffmpeg.
To debug, you can run which ffmpeg
and it will output the location of the executable, if it's on the PATH (I'm guessing it's not).
If it's a permissions error, you can grant permission to the user via the chmod
command.
If it's a PATH error, then you can add it to the PATH for that user.
You can also try manually setting the path to ffmpeg like this: fluentFfmpeg.setFfmpegPath(ffmpegPath)
Thank you for your input, I you are correct on that the issue is not related to fluent-ffmpeg, I am using MUP to deploy my meteor app which uses a docker image. And so unless ffmpeg is installed on the docker image I can't access it.
npm dependencies
"dependencies": {
"@ffmpeg-installer/ffmpeg": "^1.0.13",
"fluent-ffmpeg": "^2.1.2"
},
const ffmpegInstaller = require('@ffmpeg-installer/ffmpeg');
const ffmpeg = require('fluent-ffmpeg');
ffmpeg.setFfmpegPath(ffmpegInstaller.path);
// console.log(ffmpegInstaller.path, ffmpegInstaller.version);
module.exports = ffmpeg;
You're the best. Was having trouble getting this working on an Elastic Beanstalk nodjs web server, and it works great.
const ffmpegInstaller = require('@ffmpeg-installer/ffmpeg');
const ffmpeg = require('fluent-ffmpeg');
ffmpeg.setFfmpegPath(ffmpegInstaller.path);
// console.log(ffmpegInstaller.path, ffmpegInstaller.version);
module.exports = ffmpeg;
Does these code must write?
It doesn't work @odykyi on electron windows app.
npm依赖项
"dependencies": { "@ffmpeg-installer/ffmpeg": "^1.0.13", "fluent-ffmpeg": "^2.1.2" },
const ffmpegInstaller = require('@ffmpeg-installer/ffmpeg'); const ffmpeg = require('fluent-ffmpeg'); ffmpeg.setFfmpegPath(ffmpegInstaller.path); // console.log(ffmpegInstaller.path, ffmpegInstaller.version); module.exports = ffmpeg;
牛批大神,语音格式转换的资料我找了一下午,你这代码复制粘贴就成功转换了,膜拜!!!
npm dependencies
"dependencies": { "@ffmpeg-installer/ffmpeg": "^1.0.13", "fluent-ffmpeg": "^2.1.2" },
const ffmpegInstaller = require('@ffmpeg-installer/ffmpeg'); const ffmpeg = require('fluent-ffmpeg'); ffmpeg.setFfmpegPath(ffmpegInstaller.path); // console.log(ffmpegInstaller.path, ffmpegInstaller.version); module.exports = ffmpeg;
thank you , it is work
npm dependencies
"dependencies": { "@ffmpeg-installer/ffmpeg": "^1.0.13", "fluent-ffmpeg": "^2.1.2" },
const ffmpegInstaller = require('@ffmpeg-installer/ffmpeg'); const ffmpeg = require('fluent-ffmpeg'); ffmpeg.setFfmpegPath(ffmpegInstaller.path); // console.log(ffmpegInstaller.path, ffmpegInstaller.version); module.exports = ffmpeg;
thank you so much, it is work
It seems that ffmpeg-static is a better way to go as it supports darwin-arm64 (apple silicon M1).
const ffmpeg = require("fluent-ffmpeg");
const pathToFfmpeg = require("ffmpeg-static");
ffmpeg.setFfmpegPath(pathToFfmpeg);
I have the same error. What should I change? This is my code
ffmpeg(`${process.env.UPLOAD_DIR}/${req.file?.originalname}`)
.toFormat('mp3')
.saveToFile(`${process.env.UPLOAD_DIR}/${uuidv4()}-${req.file?.originalname}`)
.on('error', (err) => {
console.error(err);
})
.on('progress', (progress) => {
console.log('...frames ' + progress.frames);
})
.on('end', () => {
console.log("finished processing");
});
I have the same problem and this solution not work for me.
import ffmpeg from "@ffmpeg-installer/ffmpeg";
import stream from "stream";
ffmpegFluent.setFfmpegPath(ffmpeg.path);```
Version information
I Installed ffmpeg on the server, however, I get the following message: Cannot find ffmpeg
Expected results
To be able run and use ffmpeg on the server
Observed results
Can't find or doesn't recognize that ffmpeg is installed.
If I SSH into the server I can run the ffmpeg command, so I know it's installed on the server, what do I need to do in order to get fluent-ffmpeg to run it?
Thanks