I have installed ffmpeg and can run it from command line. I have anaconda installed and get different result for which ffmpeg command as follow:
/usr/bin/ffmpeg(base env)/root/anaconda3/envs/myenv/bin/ffmpeg(myenv)
python app.py - The app uses Flask. I've tested it on localhost it is working as expected.
Ran it with gunicorn still working locally.
When I deploy it using Nginx it doesn't work. It can't find ffmpeg. I get the error gunicorn[23436]: /bin/sh: 1: ffmpeg: not found.
My usage inside python file is as follows:
subprocess.call('/root/anaconda3/envs/myenv/bin/ffmpeg ...) (I tried it with ffmpeg, full path and anaconda path - still to no success)
I doubt there is something about Nginx that I'm missing, does it need special configuration for executables. Server config is as follows:
server {
listen 80;
server_name x.x.x.x;
location / {
include proxy_params;
proxy_pass http://unix:/home/myapp/myapp.sock;
client_max_body_size 30M;
}
}
I had installed ffmpeg with pip but then I deleted it. It doesn't have anything to do with the error since I can run it locally without problems.