full.one.vhost.conf
9.1 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
listen 1935 1936;
pid ./objs/srs.pid;
chunk_size 60000;
ff_log_dir ./objs;
srs_log_tank console;
srs_log_level trace;
srs_log_file ./objs/srs.log;
max_connections 1000;
daemon off;
utc_time off;
pithy_print_ms 10000;
heartbeat {
enabled off;
interval 9.3;
url http://127.0.0.1:8085/api/v1/servers;
device_id my-srs-device;
summaries off;
}
stats {
network 0;
disk sda sdb xvda xvdb;
}
http_api {
enabled on;
listen 1985;
crossdomain on;
raw_api {
enabled on;
allow_reload on;
allow_query on;
allow_update on;
}
}
http_server {
enabled off;
listen 8080;
dir ./objs/nginx/html;
}
stream_caster {
enabled off;
caster mpegts_over_udp;
output rtmp://127.0.0.1/live/livestream;
listen 8935;
rtp_port_min 57200;
rtp_port_max 57300;
}
vhost __defaultVhost__;
vhost vhost.srs.com {
enabled off;
chunk_size 128;
tcp_nodelay on;
min_latency on;
cluster {
mode remote;
origin 127.0.0.1:1935 localhost:1935;
token_traverse off;
vhost same.edge.srs.com;
debug_srs_upnode off;
}
forward {
enabled off;
destination 127.0.0.1:1936 127.0.0.1:1937;
}
play {
time_jitter full;
mix_correct off;
atc off;
atc_auto off;
mw_latency 100;
gop_cache off;
queue_length 10;
send_min_interval 10.0;
reduce_sequence_header on;
}
publish {
mr off;
mr_latency 350;
firstpkt_timeout 20000;
normal_timeout 7000;
}
refer {
enabled off;
all github.com github.io;
publish github.com github.io;
play github.com github.io;
}
bandcheck {
enabled off;
key 35c9b402c12a7246868752e2878f7e0e;
interval 30;
limit_kbps 4000;
}
security {
enabled off;
allow play all;
allow publish all;
deny publish all;
}
http_static {
enabled off;
mount [vhost]/hls;
dir ./objs/nginx/html/hls;
}
http_remux {
enabled off;
fast_cache 30;
mount [vhost]/[app]/[stream].flv;
}
http_hooks {
enabled off;
on_connect http://127.0.0.1:8085/api/v1/clients http://localhost:8085/api/v1/clients;
on_close http://127.0.0.1:8085/api/v1/clients http://localhost:8085/api/v1/clients;
on_publish http://127.0.0.1:8085/api/v1/streams http://localhost:8085/api/v1/streams;
on_unpublish http://127.0.0.1:8085/api/v1/streams http://localhost:8085/api/v1/streams;
on_play http://127.0.0.1:8085/api/v1/sessions http://localhost:8085/api/v1/sessions;
on_stop http://127.0.0.1:8085/api/v1/sessions http://localhost:8085/api/v1/sessions;
on_dvr http://127.0.0.1:8085/api/v1/dvrs http://localhost:8085/api/v1/dvrs;
on_hls http://127.0.0.1:8085/api/v1/hls http://localhost:8085/api/v1/hls;
on_hls_notify http://127.0.0.1:8085/api/v1/hls/[app]/[stream][ts_url];
}
exec {
enabled off;
publish ./objs/ffmpeg/bin/ffmpeg -f flv -i [url] -c copy -y ./[stream].flv;
}
hls {
enabled off;
hls_fragment 10;
hls_td_ratio 1.5;
hls_aof_ratio 2.0;
hls_window 60;
hls_on_error ignore;
hls_storage disk;
hls_path ./objs/nginx/html;
hls_m3u8_file [app]/[stream].m3u8;
hls_ts_file [app]/[stream]-[seq].ts;
hls_ts_floor off;
hls_entry_prefix http://your-server;
hls_mount [vhost]/[app]/[stream].m3u8;
hls_acodec aac;
hls_vcodec h264;
hls_cleanup on;
hls_dispose 0;
hls_nb_notify 64;
hls_wait_keyframe on;
}
hds {
enabled off;
hds_fragment 10;
hds_window 60;
hds_path ./objs/nginx/html;
}
dvr {
enabled off;
dvr_plan session;
dvr_path ./objs/nginx/html/[app]/[stream].[timestamp].flv;
dvr_duration 30;
dvr_wait_keyframe on;
time_jitter full;
}
ingest livestream {
enabled off;
input {
type file;
url ./doc/source.200kbps.768x320.flv;
}
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine {
enabled off;
iformat flv;
vfilter {
s 30;
ss 300;
}
vcodec libx264;
vbitrate 1500;
vfps 25;
vwidth 768;
vheight 320;
vthreads 12;
vprofile main;
vpreset medium;
vparams {
t 100;
coder 1;
b_strategy 2;
bf 3;
refs 10;
}
acodec libfdk_aac;
abitrate 70;
asample_rate 44100;
achannels 2;
aparams {
profile:a aac_low;
}
oformat flv;
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream];
}
}
transcode live {
enabled off;
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine ffsuper {
enabled off;
iformat flv;
vfilter {
s 30;
ss 300;
}
vcodec libx264;
vbitrate 1500;
vfps 25;
vwidth 768;
vheight 320;
vthreads 12;
vprofile main;
vpreset medium;
vparams {
t 100;
coder 1;
b_strategy 2;
bf 3;
refs 10;
}
acodec libfdk_aac;
abitrate 70;
asample_rate 44100;
achannels 2;
aparams {
profile:a aac_low;
}
oformat flv;
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
}
}
transcode {
enabled off;
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
engine ffsuper {
enabled off;
iformat flv;
vfilter {
s 30;
ss 300;
}
vcodec libx264;
vbitrate 1500;
vfps 25;
vwidth 768;
vheight 320;
vthreads 12;
vprofile main;
vpreset medium;
vparams {
t 100;
coder 1;
b_strategy 2;
bf 3;
refs 10;
}
acodec libfdk_aac;
abitrate 70;
asample_rate 44100;
achannels 2;
aparams {
profile:a aac_low;
}
oformat flv;
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
}
engine ffhd {
enabled off;
vcodec libx264;
vbitrate 1200;
vfps 25;
vwidth 1382;
vheight 576;
vthreads 6;
vprofile main;
vpreset medium;
vparams;
acodec libfdk_aac;
abitrate 70;
asample_rate 44100;
achannels 2;
aparams;
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
}
engine ffsd {
enabled off;
vcodec libx264;
vbitrate 800;
vfps 25;
vwidth 1152;
vheight 480;
vthreads 4;
vprofile main;
vpreset fast;
vparams;
acodec libfdk_aac;
abitrate 60;
asample_rate 44100;
achannels 2;
aparams;
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
}
engine fffast {
enabled off;
vcodec libx264;
vbitrate 300;
vfps 20;
vwidth 768;
vheight 320;
vthreads 2;
vprofile baseline;
vpreset superfast;
vparams;
acodec libfdk_aac;
abitrate 45;
asample_rate 44100;
achannels 2;
aparams;
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
}
engine vcopy {
enabled off;
vcodec copy;
acodec libfdk_aac;
abitrate 45;
asample_rate 44100;
achannels 2;
aparams;
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
}
engine acopy {
enabled off;
vcodec libx264;
vbitrate 300;
vfps 20;
vwidth 768;
vheight 320;
vthreads 2;
vprofile baseline;
vpreset superfast;
vparams;
acodec copy;
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
}
engine copy {
enabled off;
vcodec copy;
acodec copy;
output rtmp://127.0.0.1:[port]/[app]?vhost=[vhost]/[stream]_[engine];
}
}
}