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

Error: spawn ffmpeg ENOENT #15

Open
sumitridhal opened this issue Jul 4, 2017 · 4 comments
Open

Error: spawn ffmpeg ENOENT #15

sumitridhal opened this issue Jul 4, 2017 · 4 comments

Comments

@sumitridhal
Copy link

Error reading metadata { Error: spawn ffmpeg ENOENT
at exports._errnoException (util.js:1022:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:189:19)
at onErrorNT (internal/child_process.js:366:16)
at _combinedTickCallback (internal/process/next_tick.js:102:11)
at process._tickCallback (internal/process/next_tick.js:161:9)
at Function.Module.runMain (module.js:607:11)
at startup (bootstrap_node.js:158:16)
at bootstrap_node.js:575:3
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn ffmpeg',
path: 'ffmpeg',
spawnargs: [ '-i', 'song.mp3', '-f', 'ffmetadata', 'pipe:1' ] }
C:\Sumit Ridhal\GitHub\audio-meta\node_modules\ffmetadata\index.js:41
stream.emit("error", new Error(error.getBody().toString()));
^

TypeError: Cannot read property 'toString' of undefined
at ChildProcess. (C:\Sumit Ridhal\GitHub\audio-meta\node_modules\ffmetadata\index.js:41:50)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:897:16)
at Socket.stream.socket.on (internal/child_process.js:340:11)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at Pipe._handle.close [as _onclose] (net.js:549:12)

@parshap
Copy link
Owner

parshap commented Jul 5, 2017

Do you have ffmpeg installed? See the Installation section in the readme. https://github.com/parshap/node-ffmetadata#installation

@sumitridhal
Copy link
Author

@parshap Yes i have.

C:\Sumit Ridhal\GitHub\audio-meta\node_modules\ffmetadata\index.js:41
stream.emit("error", new Error(error.getBody().toString()));
^

@jonbarrow
Copy link

jonbarrow commented Jul 21, 2017

I also have this issue. I do not have ffmpeg installed globally, as I am using this in an Electron app (not all users will have ffmpeg installed). Instead I am using ffmpeg-binaries to load ffmpeg locally. This works fine for fluent-ffmpeg but seems incompatible with this lib. I have tried setting process.env.FFMPEG_PATH (which is what the README says to do) to './node_modules/ffmpeg-binaries/bin/ffmpeg.exe', './node_modules/ffmpeg-binaries/bin/ffmpeg' (which is what fluent-ffmpeg accepts), and './node_modules/ffmpeg-binaries/bin' but none have worked, I still get the same error described in this post.

@asososo
Copy link

asososo commented Aug 17, 2021

@jonbarrow It's been a long time, but I use ffmpeg-static-electron, and it works fine.

import ffmpeg from 'ffmpeg-static-electron';
...
ffmetadata.setFfmpegPath(ffmpeg.path);
ffmetadata.write(path, data, options, function(err, data) {
...

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

No branches or pull requests

4 participants