I want to run a Bash file on my Nginx server. This server receives an RTMP stream, the Bash file converts it to different qualities using ffmpeg. The file alone works correctly in the terminal and has executive access.
I wrote this code to configure Nginx but it doesn't work.
rtmp {
server {
listen 1935;
chunk_size 4096;
allow publish 127.0.0.1;
deny publish all;
application live {
live on;
record off;
exec /my/path/to/transcode.sh $name;
}
}
}
The exec directive in your nginx configuration should be enclosed within a 'push' block.