-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconf.py
81 lines (76 loc) · 2.53 KB
/
conf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
from datetime import datetime
def conf(youtube, facebook):
data = rf"""
# GENERATED: {datetime.now()}
worker_processes 1;
events {{
worker_connections 1024;
}}
http {{
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {{
listen 444 ssl;
server_name wildwoodcalvarylive.com;
ssl_certificate /ssl/cert.pem;
ssl_certificate_key /ssl/privkey.pem;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
location /live {{
types {{
application/x-mpegURL m3u8;
application/dash+xml mpd;
video/MP2T ts;
video/mp4 mp4;
}}
alias /dash/live;
add_header Cache-Control no-cache;
add_header Cache-Control no-cache;
add_header 'Access-Control-Allow-Origin' '*';
}}
location /stat {{
rtmp_stat all;
rtmp_stat_stylesheet stat.xsl;
}}
location /stat.xsl {{
root /usr/local/nginx/html;
}}
location / {{
root html;
index index.html index.htm;
add_header Cache-Control no-cache;
add_header Cache-Control no-cache;
add_header 'Access-Control-Allow-Origin' '*';
}}
}}
}}
rtmp {{
server {{
listen 1935;
chunk_size 4096;
application live {{
live on;
record off;
allow publish all;
allow play all;
# RTMP REALY: format [push [rtmp server address]/[stream key];
# Deafult Youtube RTMP
# push rtmp://a.rtmp.youtube.com/live2/390s-967e-wdsb-b1hv;
push rtmp://a.rtmp.youtube.com/live2/{youtube};
# Deafult Facebook RTMP
# push rtmp://live-api-s.facebook.com:80/rtmp/2619710981388821?s_bl=1&s_ps=1&s_sw=0&s_vt=api-s&a=AbyYLVq7uYfxzqfM;
push rtmp://127.0.0.1:19350/rtmp/{facebook};
# DASH configuration: web player
dash on;
dash_path /dash/live;
dash_fragment 5;
dash_playlist_length 30;
}}
}}
}}
"""
return data