nginx -tвот такая ошибка
root@YNS:/home/denis# nginx -t
nginx: [emerg] "rtmp" directive is not allowed here in /etc/nginx/nginx.conf:76
nginx: configuration file /etc/nginx/nginx.conf test failed
#user denis;
worker_processes 2;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 8080;
server_name localhost;
# rtmp stat
location /stat {
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}
location /stat.xsl {
# you can move stat.xsl to a different location
root /usr/build/nginx-rtmp-module;
}
# rtmp control
location /control {
rtmp_control all;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
rtmp {
server {
listen 1935;
ping 30s;
notify_method get;
hls on;
application camera1 {
live on;
record off;
exec_pull avconv -i rtsp://admin:admin@192.168.1.102:554/ -threads 2 -f flv -r 25 -s 1280x720 -an
rtmp://192.168.1.8:1935/cam1/stream
}
}
}
application camera1 {
live on;
record off;
exec_pull avconv -i rtsp://admin:admin@192.168.1.102:554/ -threads 2 -f flv -r 25 -s 1280x720 -an
rtmp://192.168.1.8:1935/cam1/stream; #Закрывающая точка с зяпятой
}
}
}