arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.5k stars 3.52k forks source link

exec don't work with Nginx 1.10.0 #991

Open sassyn opened 7 years ago

sassyn commented 7 years ago

Hi,

I have compile Nginx in a debian way style and added the module of RTMP. The server works OK, it is running version 1.10.0 on Ubuntu 16.04. However the Exec* directories doesn't seems to get working.

My Configuration is here:

server { listen 1935; ping 3m; ping_timeout 30s; notify_method get;

application myapp { live on; exec_options on;

exec_push /usr/bin/ffmpeg -i rtmp://localhost/src/$name -vcodec libx264 .... rtmp://localhost/hls/$name 2>>/var/log/ffmpeg-$name.log; exec_push /usr/bin/ffmpeg -version > /tmp/xxxx; exec_pull /usr/bin/ffmpeg -version > /tmp/xxxxsss; exec_static /usr/bin/ffmpeg -version > /tmp/xxxxsss; exec /usr/bin/ffmpeg -version $name >> /tmp/xxxxsss; } }

I even run the nginx as root user.

I'm also compile with --debug

here is the nginx -v output:

nginx version: nginx/1.10.0 (Ubuntu) built with OpenSSL 1.0.2g 1 Mar 2016 TLS SNI support enabled configure arguments: --with-cc-opt='-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_flv_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_image_filter_module --with-http_mp4_module --with-http_perl_module --with-http_random_index_module --with-http_secure_link_module --with-http_v2_module --with-http_sub_module --with-http_xslt_module --with-mail --with-mail_ssl_module --with-stream --with-stream_ssl_module --with-threads --with-file-aio --add-module=/opt/src/nginx-server/nginx-1.10.0/debian/modules/headers-more-nginx-module --add-module=/opt/src/nginx-server/nginx-1.10.0/debian/modules/nginx-auth-pam --add-module=/opt/src/nginx-server/nginx-1.10.0/debian/modules/nginx-cache-purge --add-module=/opt/src/nginx-server/nginx-1.10.0/debian/modules/nginx-dav-ext-module --add-module=/opt/src/nginx-server/nginx-1.10.0/debian/modules/nginx-development-kit --add-module=/opt/src/nginx-server/nginx-1.10.0/debian/modules/nginx-echo --add-module=/opt/src/nginx-server/nginx-1.10.0/debian/modules/ngx-fancyindex --add-module=/opt/src/nginx-server/nginx-1.10.0/debian/modules/nginx-http-push --add-module=/opt/src/nginx-server/nginx-1.10.0/debian/modules/nginx-lua --add-module=/opt/src/nginx-server/nginx-1.10.0/debian/modules/nginx-upload-progress --add-module=/opt/src/nginx-server/nginx-1.10.0/debian/modules/nginx-upstream-fair --add-module=/opt/src/nginx-server/nginx-1.10.0/debian/modules/ngx_http_substitutions_filter_module --add-module=/opt/src/nginx-rtmp-module/

I saw some comments on it, but wonder if it ever got resolved? I also stop the apparmod module.

Any idea?

Thank You

sassyn commented 7 years ago

Which version would anyone recommend to use?

cescp commented 7 years ago

As noted in https://github.com/arut/nginx-rtmp-module/wiki/Directives#user-content-exec_push "Make sure there's no space between redirection character and stream name/number."