Настроил всё, но вещания как нет так и нет, в чем причина? Даже в папке HLS всё пусто.
worker_processes 1;
events {
worker_connections 1024;
}
rtmp {
server {
listen 1935;
application myapp {
live on;
hls on;
hls_path /tmp/hls; # на эту директорию нужны права
exec_static '/usr/bin/ffmpeg -i rtp://@***.33.220.91:5**0 -c:v libx264 -s 720x576 -b:v 500k -c:a libfaac -ar 44100 -ac 2 -f flv rtmp://localhost/myapp/live 2>>/var/log/nginx/ffmpeg.log';
}
}
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80 default_server;
charset utf-8;
root /var/www;
index index.php index.html index.htm;
server_name server_domain_name_or_IP;
location /hls {
root /tmp/hls;
types {
application/vnd.apple.mpegurl m3u8;
}
}
location / {
try_files $uri $uri/ =404;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /var/www;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}
}
URL на выходе такого плана -
localhost/myapp/live.m3u8