Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setFfmpegPath doesnt work #786

Closed
haojia321 opened this issue Dec 26, 2017 · 4 comments
Closed

setFfmpegPath doesnt work #786

haojia321 opened this issue Dec 26, 2017 · 4 comments

Comments

@haojia321
Copy link

Hi,
For some reason I cannot install ffmpeg on my cloud server. So I have to use a ffmpeg static binary here. This is the static lib im using https://www.npmjs.com/package/ffmpeg-static

My when I try to manually set the path by calling setFfmpegPath. It gives below errors:
I20171225-19:26:53.321(-5)? Exception in callback of async function: Error: Cannot find module './lib/fluent-ffmpeg'
I20171225-19:26:53.322(-5)? at makeMissingError (packages/modules-runtime.js:221:12)
I20171225-19:26:53.322(-5)? at require (packages/modules-runtime.js:231:19)
I20171225-19:26:53.323(-5)? at meteorInstall.node_modules.fluent-ffmpeg.index.js (packages/modules.js:481:86)
I20171225-19:26:53.323(-5)? at fileEvaluate (packages/modules-runtime.js:333:9)
I20171225-19:26:53.323(-5)? at require (packages/modules-runtime.js:228:16)
I20171225-19:26:53.324(-5)? at imports/server/AttachmentFile.js:59:30
I20171225-19:26:53.324(-5)? at Function..each..forEach (packages/underscore.js:147:22)
I20171225-19:26:53.325(-5)? at FilesCollection.onAfterUpload (imports/server/AttachmentFile.js:51:15)
I20171225-19:26:53.325(-5)? at packages/ostrio_files.js:927:50
I20171225-19:26:53.326(-5)? at packages/mongo/collection.js:652:5

@haojia321
Copy link
Author

This is the code how I call ffmpeg

var ffmpegStatic = require('ffmpeg-static');
var ffprobeStatic = require('ffprobe-static');
console.log(ffmpegStatic);
var ffmpeg = require("fluent-ffmpeg");
ffmpeg.setFfmpegPath(ffmpegStatic.path);
ffmpeg.setFfprobePath(ffprobeStatic.path);

@njoyard
Copy link
Member

njoyard commented Jan 18, 2018

Can you please relate the error stack trace to your code ? I don't see where it fails.

@Aditya94A
Copy link

I'm facing the same error, I need to hook up ffmpeg-static binaries with fluent ffmpeg. Although ffmpeg static gives me back the "correct" path (\bin\win\x64\ffmpeg.exe), upon running the application it does not seem to find it.

I'm not sure where the root is supposed to be. @haojia321 How did you solve this?

@haojia321
Copy link
Author

I had to install ffmpeg in local server and explicitly called the cmd command to use it.

However there is another post might help. Please let me know if it works for you.

damianociarla/node-ffmpeg#45 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants