fix rtmp ports (enable ipv6 + use first osp-worker)
This commit is contained in:
parent
737482329d
commit
22c6ad63b8
|
@ -2,6 +2,7 @@
|
||||||
file:
|
file:
|
||||||
path: "/tmp/ansible/"
|
path: "/tmp/ansible/"
|
||||||
mode: 0777
|
mode: 0777
|
||||||
|
state: directory
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
package:
|
package:
|
||||||
|
|
|
@ -3,7 +3,8 @@ rtmp_auto_push_reconnect 1s;
|
||||||
|
|
||||||
rtmp {
|
rtmp {
|
||||||
server {
|
server {
|
||||||
listen 1935;
|
#listen 1935;
|
||||||
|
listen [::]:1935;
|
||||||
chunk_size 4096;
|
chunk_size 4096;
|
||||||
|
|
||||||
application stream {
|
application stream {
|
||||||
|
@ -14,8 +15,8 @@ rtmp {
|
||||||
#deny publish all;
|
#deny publish all;
|
||||||
allow play 127.0.0.1;
|
allow play 127.0.0.1;
|
||||||
|
|
||||||
on_publish http://127.0.0.1:5010/auth-key;
|
on_publish http://127.0.0.1:{{ osp_worker_start_port }}/auth-key;
|
||||||
on_publish_done http://127.0.0.1:5010/deauth-user;
|
on_publish_done http://127.0.0.1:{{ osp_worker_start_port }}/deauth-user;
|
||||||
|
|
||||||
}
|
}
|
||||||
application stream-data {
|
application stream-data {
|
||||||
|
@ -25,7 +26,7 @@ rtmp {
|
||||||
#deny publish all;
|
#deny publish all;
|
||||||
allow play 127.0.0.1;
|
allow play 127.0.0.1;
|
||||||
|
|
||||||
on_publish http://127.0.0.1:5010/auth-user;
|
on_publish http://127.0.0.1:{{ osp_worker_start_port }}/auth-user;
|
||||||
push rtmp://127.0.0.1:1935/live/;
|
push rtmp://127.0.0.1:1935/live/;
|
||||||
push rtmp://127.0.0.1:1935/record/;
|
push rtmp://127.0.0.1:1935/record/;
|
||||||
|
|
||||||
|
@ -55,7 +56,7 @@ rtmp {
|
||||||
#deny publish all;
|
#deny publish all;
|
||||||
allow play 127.0.0.1;
|
allow play 127.0.0.1;
|
||||||
|
|
||||||
on_publish http://127.0.0.1:5010/auth-user;
|
on_publish http://127.0.0.1:{{ osp_worker_start_port }}/auth-user;
|
||||||
push rtmp://127.0.0.1:1935/live/;
|
push rtmp://127.0.0.1:1935/live/;
|
||||||
push rtmp://127.0.0.1:1935/record/;
|
push rtmp://127.0.0.1:1935/record/;
|
||||||
|
|
||||||
|
@ -104,7 +105,7 @@ rtmp {
|
||||||
allow publish 127.0.0.1;
|
allow publish 127.0.0.1;
|
||||||
allow play 127.0.0.1;
|
allow play 127.0.0.1;
|
||||||
|
|
||||||
on_publish http://127.0.0.1:5010/auth-record;
|
on_publish http://127.0.0.1:{{ osp_worker_start_port }}/auth-record;
|
||||||
exec_push mkdir -m 764 {{ osp_http_path }}/videos/$name;
|
exec_push mkdir -m 764 {{ osp_http_path }}/videos/$name;
|
||||||
|
|
||||||
recorder all {
|
recorder all {
|
||||||
|
@ -115,7 +116,7 @@ rtmp {
|
||||||
exec_record_done bash -c "ffmpeg -y -i $path -codec copy -movflags +faststart {{ osp_http_path }}/videos/$name/$basename.mp4 && rm $path";
|
exec_record_done bash -c "ffmpeg -y -i $path -codec copy -movflags +faststart {{ osp_http_path }}/videos/$name/$basename.mp4 && rm $path";
|
||||||
exec_record_done mv {{ osp_http_path }}/stream-thumb/$name.png {{ osp_http_path }}/videos/$name/$basename.png;
|
exec_record_done mv {{ osp_http_path }}/stream-thumb/$name.png {{ osp_http_path }}/videos/$name/$basename.png;
|
||||||
exec_record_done mv {{ osp_http_path }}/stream-thumb/$name.gif {{ osp_http_path }}/videos/$name/$basename.gif;
|
exec_record_done mv {{ osp_http_path }}/stream-thumb/$name.gif {{ osp_http_path }}/videos/$name/$basename.gif;
|
||||||
on_record_done http://127.0.0.1:5010/deauth-record;
|
on_record_done http://127.0.0.1:{{ osp_worker_start_port }}/deauth-record;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +126,7 @@ rtmp {
|
||||||
allow publish 127.0.0.1;
|
allow publish 127.0.0.1;
|
||||||
allow play all;
|
allow play all;
|
||||||
|
|
||||||
on_play http://127.0.0.1:5010/playbackAuth;
|
on_play http://127.0.0.1:{{ osp_worker_start_port }}/playbackAuth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue