location /on_play {
# set connection secure link
root /tmp/hls;
secure_link $arg_st,$arg_e;
secure_link_md5 mysecretkey$arg_app/$arg_name$arg_e;
# bad hash
if ($secure_link = "") { return 501; }
# link expired
if ($secure_link = "0") {return 502; }
return 200;
} rtmp {
access_log /var/log/nginx/rtmp_access.log;
server {
listen 1935;
ping 30s;
notify_method get;
application myapp {
live on;
exec_static /usr/local/bin/ffmpeg -i ИП.ПОРТ -vcodec сопи -acodec aac -strict experimental -ar 44100 -ac 2 -f flv rtmp://localhost/myapp/live 2>>/var/log/nginx/ffmpeg.log;
on_play http://localhost/on_play;
hls on;
hls_path /tmp/hls;
hls_fragment 5s;
}
}
}Помогите настроить.