setup ffmpeg on ubuntu and node.js - linux

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.

Related

Getting "Cannot find ffprobe error " when attempting to run nodejs script

I am attempting to use an npm package for splitting audio (https://github.com/calufornia/audio-split), however I am not able to run a single test since I get the following error on my callback:
Error: Cannot find ffprobe, I have read a bit and it seems that this is directly related to the npm package fluent_ffmpeg, which is actually a dependency of the first package I mentioned.
The problem on some other questions/forums is that people do not have properly installed ffmpeg on their environment. In my case however, I have made sure that my PATH is updated with the ffmpeg directory (C:\FFmpeg\bin for me), and I am able to open a command prompt and run both
ffmpeg -version
and
ffprobe -version
I would much appreciate if anyone else has struggled with this previously and could provide me with some more guidance. Thanks

cannot execute binary file exec format error windows bash

Am trying to deploy my node express app to heroku from my windows 10 os and am using the git bash terminal, but anytime i try to run the heroku command it returns this error
'/c/Users/user/AppData/Roaming/npm/node_modules/heroku-cli/bin/run:
line 19: /c/Program Files/nodejs/node: cannot execute binary file:
Exec format error'
Please does anyone know how i could solve this challenge?
PS: i ran the command as administrator on git bash
From heroku-cli GitHub repository I can see the following 19th line of the run file:
node "$DIR/run.js" "$#"
Looks like it tries to run run.js file but fails because can't recognise node as an executable binary file.
It's possible that you have a NodeJS version with wrong architecture or installation was not successful. Anyway seems like node is not installed correctly.
So I would uninstall it properly and install it again regarding architecture of the OS

PyInstaller on Linux (Ubuntu) -- open executable in console

Running PyInstaller v3.2 on Ubuntu 16.04, is it possible to get my bundled application to open a console for stdout? On Mac and Windows I can get this to work, as outlined in the options documentation. But nothing is mentioned for Linux. I've tried playing around with the -c flag, but that does not seem to have any effect. I also tried bundling it as a single file (-F) versus a directory, but neither seems to open a console for stdout...
Just for future reference, in Linux if you run a bundled app from the command line like a script, it will automatically use that same terminal as stdout ...

NodeJS/Dokku/Docker: ffmpeg exited with code 127

I'm trying to run ffmpeg inside of a Docker container via Dokku. I've heavily modified a Dokku plugin to accomplish this as I need h264 support. I currently get an error from fluent-ffmpeg which states
Error: ffmpeg exited with code 127
I've tried to look up what error code 127 is but haven't found much. Some people seem to suggest that it's some sort of issue with finding ffmpeg. However, I did have a libx264 error from ffmpeg earlier in the process so I'm pretty sure the ffmpeg binary is being found. Unfortunately fluent doesn't send the used command line for ffmpeg to the error event so I'm not sure what the exact command being ran is.
127 means command not found. (127 Return code from $?)
I guess your ffmpeg executable is not located in any directories defined by environment variable PATH.

Error: spawn EACCESS node-webkit ffmpeg with fluent-ffmpeg

I'm doing a nodewebkit app and trying to bundle ffmpeg inside so the user doesn't have to have ffmpeg installed on their system.
EACCESS has to do with rights running the code. I tried a chmod -R ug+rw ffmpegFolder to no avail.
I downloaded the osx binaries from here: https://evermeet.cx/ffmpeg/ I'm assuming these are compiled but I could be wrong?
I am bundling the extracted ffmpeg folder into the root of my .nw, which, extracted looks like this:
This part has to do with fluent-ffmpeg.
It has this method called setFfmpegPath(path) which tells fluent-ffmpeg to use a FFMPEG you provide.
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.
I feel I'm on the right track with the spawn EACCESS error. How to make it play nice though?

Resources