Comments (12)
Did you figure it out?
from node-ffmpeg.
This works fine with ffmpeg-static
. You just need to set ffmpeg.bin
to ffmpeg-static.path
like the below in ES6.
import ffmpeg_static from 'ffmpeg-static'
import ffmpeg from 'ffmpeg'
ffmpeg.bin = ffmpeg_static.path
From here, you're free to use ffmpeg however you like.
from node-ffmpeg.
This works fine with
ffmpeg-static
. You just need to setffmpeg.bin
toffmpeg-static.path
like the below in ES6.import ffmpeg_static from 'ffmpeg-static' import ffmpeg from 'ffmpeg' ffmpeg.bin = ffmpeg_static.path
From here, you're free to use ffmpeg however you like.
from node-ffmpeg.
@yaphper You need to install ffmpeg(the binary itself) before using a wrapper that eases making commands to ffmpeg.
from node-ffmpeg.
@jens1o I cannot manage the cloud server so I cannot manually install anything on the server. when you say "ffmpeg binary", you mean i need to manually install it on the server, right?
from node-ffmpeg.
Im using Mac and I got this error:
I20190221-00:41:12.175(-5)? /bin/sh: ffmpeg: command not found
I20190221-00:41:12.176(-5)?
I20190221-00:41:12.176(-5)? at ChildProcess.exithandler (child_process.js:275:12)
I20190221-00:41:12.176(-5)? at emitTwo (events.js:126:13)
I20190221-00:41:12.176(-5)? at ChildProcess.emit (events.js:214:7)
I20190221-00:41:12.176(-5)? at maybeClose (internal/child_process.js:925:16)
I20190221-00:41:12.176(-5)? at Socket.stream.socket.on (internal/child_process.js:346:11)
I20190221-00:41:12.176(-5)? at emitOne (events.js:116:13)
I20190221-00:41:12.176(-5)? at Socket.emit (events.js:211:7)
I20190221-00:41:12.176(-5)? at Pipe._handle.close [as _onclose] (net.js:554:12)
I20190221-00:41:12.177(-5)? killed: false,
I20190221-00:41:12.177(-5)? code: 127,
I20190221-00:41:12.177(-5)? signal: null,
I20190221-00:41:12.177(-5)? cmd: 'ffmpeg -i assets/app/uploads/uploadedFiles/8tRvc3eGQwf5q6bDg.mp4 -vf "scale='min(854,iw)':'min(480,ih)':force_original_aspect_ratio=decrease,pad=854:480:(ow-iw)/2:(oh-ih)/2" -r 24 -c:v libx264 -b:v 1M -maxrate 1.5M -bufsize 1M assets/app/uploads/uploadedFiles/8tRvc3eGQwf5q6bDg-480P.mp4' } null
W20190221-00:21:07.641(-5)? (STDERR) fs.js:948
W20190221-00:21:07.642(-5)? (STDERR) binding.stat(pathModule._makeLong(path));
W20190221-00:21:07.642(-5)? (STDERR) ^
W20190221-00:21:07.642(-5)? (STDERR)
W20190221-00:21:07.642(-5)? (STDERR) TypeError: path must be a string or Buffer
W20190221-00:21:07.642(-5)? (STDERR) at Object.fs.statSync (fs.js:948:11)
W20190221-00:21:07.643(-5)? (STDERR) at Object.statSync (/Users/i839603/eduees/code/prototypes/videoprocessor/node_modules/graceful-fs/polyfills.js:297:22)
W20190221-00:21:07.643(-5)? (STDERR) at server/main.js:61:60
W20190221-00:21:07.643(-5)? (STDERR) at /Users/i839603/eduees/code/prototypes/videoprocessor/node_modules/ffmpeg/lib/video.js:583:5
W20190221-00:21:07.643(-5)? (STDERR) at /Users/i839603/eduees/code/prototypes/videoprocessor/node_modules/ffmpeg/lib/utils.js:20:3
W20190221-00:21:07.643(-5)? (STDERR) at ChildProcess.exithandler (child_process.js:282:5)
W20190221-00:21:07.643(-5)? (STDERR) at emitTwo (events.js:126:13)
W20190221-00:21:07.644(-5)? (STDERR) at ChildProcess.emit (events.js:214:7)
W20190221-00:21:07.644(-5)? (STDERR) at maybeClose (internal/child_process.js:925:16)
W20190221-00:21:07.644(-5)? (STDERR) at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
from node-ffmpeg.
you mean i need to manually install it on the server, right?
yeah. This is just a wrapper to make you more comfortable writing ffmpeg commands.
from node-ffmpeg.
@jens1o do you know if there is any package that doesnt need manually install ffmpeg on the server? The cloud im using doesnt allow install software.
from node-ffmpeg.
Nope. Hosting the stuff yourself isn't an option, which would also benefit user privacy?
from node-ffmpeg.
Had the same issue. video.js still has a hardcoded 'ffmpeg'
from node-ffmpeg.
Just in case anyone else runs into this, I have made a fork that makes the ffmpeg executable configurable: #88
from node-ffmpeg.
UP! ^^
from node-ffmpeg.
Related Issues (20)
- No output received and no error HOT 2
- How do you specify ffmeg.exe location ?
- Add metadata to output file HOT 1
- How do you set a custom path to the ffmpeg bin ? HOT 1
- How do you increase the max buffer size?
- Not all the code uses ffmpeg.bin HOT 2
- setVideoCodec method and setAudioCodec not accept 'copy'
- Publish last stable version to npmjs.com
- Trouble with paths that have spaces in them HOT 6
- Audio bitrate parameter set in kbits/s while ffmpeg wants it in bits/s, causing result MP3 file to have poor quality
- Audio extration error
- [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stderr maxBuffer length exceeded HOT 2
- CLI qscale parameter is not available
- Extract x seconds from video/audio
- Does this work with drawtext? Trying to overlay text onto a jpeg
- Missing License
- Conversion failed. 2 frames left in the queue on closing ffmpeg HOT 1
- Set the format of input
- JPEG create trigger callback on each image
- Unhandled 'error' event
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-ffmpeg.