V2 upgrade
This commit is contained in:
@ -2,44 +2,31 @@ listen 1935;
|
||||
max_connections 1000;
|
||||
daemon off;
|
||||
srs_log_tank console;
|
||||
|
||||
http_api {
|
||||
enabled on;
|
||||
listen 1985;
|
||||
}
|
||||
|
||||
http_server {
|
||||
enabled on;
|
||||
listen 8080;
|
||||
}
|
||||
|
||||
rtc_server {
|
||||
enabled on;
|
||||
listen 8000;
|
||||
candidate *;
|
||||
}
|
||||
vhost transcode {
|
||||
hls {
|
||||
enabled on;
|
||||
hls_dispose 30;
|
||||
hls_fragment 2;
|
||||
hls_window 10;
|
||||
}
|
||||
rtc {
|
||||
enabled on;
|
||||
rtmp_to_rtc on;
|
||||
rtc_to_rtmp on;
|
||||
}
|
||||
http_remux {
|
||||
enabled on;
|
||||
mount [vhost]/[app]/[stream].ts;
|
||||
}
|
||||
http_hooks {
|
||||
enabled on;
|
||||
on_publish http://10.100.2.226:5295/api/srs;
|
||||
on_unpublish http://10.100.2.226:5295/api/srs;
|
||||
on_hls http://10.100.2.226:5295/api/srs;
|
||||
|
||||
vhost hls.zap.stream {
|
||||
cluster {
|
||||
mode remote;
|
||||
origin srs-origin;
|
||||
}
|
||||
}
|
||||
|
||||
vhost __defaultVhost__ {
|
||||
vhost base.in.zap.stream {
|
||||
transcode {
|
||||
enabled on;
|
||||
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||
@ -48,9 +35,23 @@ vhost __defaultVhost__ {
|
||||
enabled on;
|
||||
vcodec copy;
|
||||
acodec copy;
|
||||
output rtmp://127.0.0.1:[port]/[app]/[engine]/[stream]?vhost=transcode;
|
||||
output rtmp://127.0.0.1:[port]/[app]/[engine]/[stream]?vhost=hls.zap.stream;
|
||||
}
|
||||
engine 720p {
|
||||
}
|
||||
}
|
||||
|
||||
vhost full.in.zap.stream {
|
||||
transcode {
|
||||
enabled on;
|
||||
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||
|
||||
engine source {
|
||||
enabled on;
|
||||
vcodec copy;
|
||||
acodec copy;
|
||||
output rtmp://127.0.0.1:[port]/[app]/[engine]/[stream]?vhost=hls.zap.stream;
|
||||
}
|
||||
engine 720h {
|
||||
enabled on;
|
||||
vcodec libx264;
|
||||
vbitrate 3000;
|
||||
@ -68,9 +69,9 @@ vhost __defaultVhost__ {
|
||||
abitrate 160;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
output rtmp://127.0.0.1:[port]/[app]/[engine]/[stream]?vhost=transcode;
|
||||
output rtmp://127.0.0.1:[port]/[app]/[engine]/[stream]?vhost=hls.zap.stream;
|
||||
}
|
||||
engine 480p {
|
||||
engine 480h {
|
||||
enabled off;
|
||||
vcodec libx264;
|
||||
vbitrate 1000;
|
||||
@ -88,9 +89,9 @@ vhost __defaultVhost__ {
|
||||
abitrate 96;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
output rtmp://127.0.0.1:[port]/[app]/[engine]/[stream]?vhost=transcode;
|
||||
output rtmp://127.0.0.1:[port]/[app]/[engine]/[stream]?vhost=hls.zap.stream;
|
||||
}
|
||||
engine 240p {
|
||||
engine 240h {
|
||||
enabled off;
|
||||
vcodec libx264;
|
||||
vbitrate 500;
|
||||
@ -108,7 +109,15 @@ vhost __defaultVhost__ {
|
||||
abitrate 72;
|
||||
asample_rate 44100;
|
||||
achannels 2;
|
||||
output rtmp://127.0.0.1:[port]/[app]/[engine]/[stream]?vhost=transcode;
|
||||
output rtmp://127.0.0.1:[port]/[app]/[engine]/[stream]?vhost=hls.zap.stream;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# forward ingest, api decides route
|
||||
vhost __defaultVhost__ {
|
||||
forward {
|
||||
enabled on;
|
||||
backend http://10.100.2.226:5295/api/srs;
|
||||
}
|
||||
}
|
55
docker/srs-origin.conf
Normal file
55
docker/srs-origin.conf
Normal file
@ -0,0 +1,55 @@
|
||||
listen 1935;
|
||||
max_connections 1000;
|
||||
daemon off;
|
||||
srs_log_tank console;
|
||||
|
||||
http_api {
|
||||
enabled on;
|
||||
listen 1985;
|
||||
}
|
||||
|
||||
http_server {
|
||||
enabled on;
|
||||
listen 8080;
|
||||
}
|
||||
|
||||
vhost hls.zap.stream {
|
||||
cluster {
|
||||
mode local;
|
||||
}
|
||||
|
||||
hls {
|
||||
enabled on;
|
||||
hls_dispose 30;
|
||||
hls_fragment 2;
|
||||
hls_window 20;
|
||||
}
|
||||
|
||||
rtc {
|
||||
enabled on;
|
||||
rtmp_to_rtc on;
|
||||
}
|
||||
|
||||
http_hooks {
|
||||
enabled on;
|
||||
on_publish http://10.100.2.226:5295/api/srs;
|
||||
on_unpublish http://10.100.2.226:5295/api/srs;
|
||||
on_hls http://10.100.2.226:5295/api/srs;
|
||||
}
|
||||
|
||||
transcode {
|
||||
enabled on;
|
||||
ffmpeg ./objs/ffmpeg/bin/ffmpeg;
|
||||
|
||||
engine {
|
||||
enabled on;
|
||||
vcodec png;
|
||||
acodec an;
|
||||
vparams {
|
||||
vframes 1;
|
||||
}
|
||||
oformat image2;
|
||||
output ./objs/nginx/html/[app]/[stream].png;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user