Giter Site home page Giter Site logo

Comments (12)

Aspvik avatar Aspvik commented on June 27, 2024

Did you figure it out?

from node-ffmpeg.

gavinwilliams avatar gavinwilliams commented on June 27, 2024

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.

link-duan avatar link-duan commented on June 27, 2024

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.

dont work:
image

from node-ffmpeg.

jens1o avatar jens1o commented on June 27, 2024

@yaphper You need to install ffmpeg(the binary itself) before using a wrapper that eases making commands to ffmpeg.

from node-ffmpeg.

haojia321 avatar haojia321 commented on June 27, 2024

@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.

haojia321 avatar haojia321 commented on June 27, 2024

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.

jens1o avatar jens1o commented on June 27, 2024

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.

haojia321 avatar haojia321 commented on June 27, 2024

@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.

jens1o avatar jens1o commented on June 27, 2024

Nope. Hosting the stuff yourself isn't an option, which would also benefit user privacy?

from node-ffmpeg.

Zaphiruz avatar Zaphiruz commented on June 27, 2024

Had the same issue. video.js still has a hardcoded 'ffmpeg'

from node-ffmpeg.

kodie avatar kodie commented on June 27, 2024

Just in case anyone else runs into this, I have made a fork that makes the ffmpeg executable configurable: #88

from node-ffmpeg.

morgan-wild avatar morgan-wild commented on June 27, 2024

UP! ^^

from node-ffmpeg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.