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

spawn EACCESS <3 #372

Closed
samelie opened this issue Feb 24, 2015 · 3 comments
Closed

spawn EACCESS <3 #372

samelie opened this issue Feb 24, 2015 · 3 comments

Comments

@samelie
Copy link

samelie commented Feb 24, 2015

I posted a question here, but there wasn't a fluent-ffmpeg tag so I'll ask here too.
http://stackoverflow.com/questions/28702999/error-spawn-eaccess-node-webkit-ffmpeg-with-fluent-ffmpeg

I want to bundle ffmpeg in with a nodewebkit app.

I downloaded the osx binaries from here: https://evermeet.cx/ffmpeg/ I'm assuming these are compiled but I could be wrong?

I get the fs.realpath to ffmpeg-2.5.4 and use that.
Using ./ffmpeg-2.5.4 or /ffmpeg-2.5.4 or ffmpeg-2.5.4 just gives a spawn ENOENT error which I've read, means not found.

If I remove setFfmepgPath from my fluent-ffmpeg command it works fine using my system ffmpeg.

@njoyard
Copy link
Member

njoyard commented Feb 24, 2015

I think the current directory when running your app may not be what you'd expect. Can you please check what process.cwd() returns in your app (where you're calling fluent-ffmpeg) ?

@samelie
Copy link
Author

samelie commented Feb 25, 2015

process.cwd()+'ffmpeg-2.5.4 and fs.realpath('ffmpeg-2.5.4') return the same path: '/private/var/folders/xm/01t0kntn0qxfs8m07ftghzq00000gp/T/.org.chromium.Chromium.l0asgaffmpeg-2.5.4

however
The error message thrown by nodewebkit is different. (I changed the ffmpeg folder name to ffmpeg thinking this might solve it).
process.cwd()+'ffmpeg' throws the spawn ENOENT and the realpath throws spawn EACCESS.
I tried changing the permissions on the ffmpeg folder at runtime but that did nothing.
Got any ideas? Merci

@samelie
Copy link
Author

samelie commented Feb 25, 2015

Hey

I got it to work.
It probably helps if use the build version of ffpmeg... Turns out I decided not to use the binary from evermeet for whatever reason - they are the ones that work though!
I put the executable binary in the root.
The following works when the app is .nw and when packaged into a .app.
When it's time to call fluent-ffmpeg:
I get the path to ffmpeg binary: process.cwd()+'/ffmpeg'
I then do a fs.chmod(pp, '777', function(), inside the callback I do the fluent-ffmpeg command and setFfmpegPath to that same path
Yey!

@samelie samelie closed this as completed Feb 25, 2015
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

2 participants