I'm often asked to help with exec directive not starting child ffmpeg (or any other process). One common error is the following
- ffmpeg is NOT in /bin or /usr/bin
- full path is not specified in exec, only binary name
In this case exec will not start child process because nginx wipes its environment before starting workers. So child processes have empty PATH variable and cannot find the executable. In such cases the binary is usually looked up in default locations like /bin or /usr/bin.
To solve the issue please add env PATH directive to nginx.conf. It will preserve PATH environment variable.
...
# keep $PATH
env PATH;
...
rtmp {
server {
listen 1935;
application myapp {
live on;
exec ffmpeg -i rtmp://localhost/myapp/$name
-c copy -f flv rtmp://localhost/app2/$name;
}
application app2 {
live on;
}
}
}
I helped a friend shoot a product video at Soundstage Studios not long ago, and I was really surprised at how smooth and professional everything was. The lighting setup and soundproofing made a huge difference in quality. If anyone’s thinking about doing anything like Commercial Video Production, this place has all the right tools and space to make it work.
ReplyDeleteWhat do you all think about TheCoinEarn as a long-term tool for crypto enthusiasts? Personally, I find it useful for organizing information that usually takes me forever to gather from multiple places. It feels like a time-saver, but I’d like to know if it holds up under heavy use or if it’s just another passing trend in the crypto space.
ReplyDelete