简体   繁体   中英

setup ffmpeg on ubuntu and node.js

I am new to ubuntu and I am struggling in setting up ffmpeg installation on the ubuntu server. I have install the ffmpeg on ubuntu and also I can see it by issuing a command ffmpeg -v. I have done the development in node.js in windows and specify the path of ffmpeg. Below is the path of window in node.js:

proc.setFfmpegPath("D:\\abc\\ffmpeg-20121120-git-8b6aeb1-win64-static\\bin\\ffmpeg.exe");

but now I have to specify the path for ffmpeg for ubuntu in my node.js code.

proc.setFfmpegPath("/usr/bin/ffmpeg/ffmpeg");

it says Uncaught Error: spawn ENOTDIR

Even though I have tried with this path:

proc.setFfmpegPath("/usr/bin/ffmpeg");

then it says An error happened: ffmpeg exited with code 1

Also I have run this command "whereis ffmpeg" and it says "/usr/bin/ffmpeg"

Any help is very much appreciated

This one is correct:

proc.setFfmpegPath("/usr/bin/ffmpeg");

It is returning error code 1, which means that it is executing the ffmpeg but ffmpeg is not successfully running to completion. Try running it on the command line to see if there are any obvious problems. If that doesn't work, you'll have to dig in with some more logging and/or debugging.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM