's'
This commit is contained in:
41
d2ypp2/services/srs/conf/srs.conf
Normal file
41
d2ypp2/services/srs/conf/srs.conf
Normal file
@@ -0,0 +1,41 @@
|
||||
listen 1935;
|
||||
max_connections 1000;
|
||||
daemon off;
|
||||
srs_log_tank console;
|
||||
|
||||
http_api {
|
||||
enabled on;
|
||||
listen 1985;
|
||||
}
|
||||
|
||||
http_server {
|
||||
enabled on;
|
||||
listen 8080;
|
||||
dir ./objs/nginx/html;
|
||||
}
|
||||
|
||||
srt_server {
|
||||
enabled on;
|
||||
listen 10080;
|
||||
}
|
||||
|
||||
vhost __defaultVhost__ {
|
||||
tcp_nodelay on;
|
||||
min_latency on;
|
||||
play {
|
||||
gop_cache off;
|
||||
queue_length 1;
|
||||
}
|
||||
|
||||
http_remux {
|
||||
enabled on;
|
||||
mount [vhost]/[app]/[stream].flv;
|
||||
}
|
||||
|
||||
hls {
|
||||
enabled on;
|
||||
hls_path ./objs/nginx/html;
|
||||
hls_fragment 3;
|
||||
hls_window 18;
|
||||
}
|
||||
}
|
||||
51
d2ypp2/services/srs/data/index.html
Normal file
51
d2ypp2/services/srs/data/index.html
Normal file
@@ -0,0 +1,51 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>SRS · Live Hub</title>
|
||||
<style>
|
||||
:root { color-scheme: dark; }
|
||||
body { font-family: system-ui, sans-serif; max-width: 42rem; margin: 2rem auto; padding: 0 1rem;
|
||||
background: #0c0c0f; color: #e4e4e7; line-height: 1.5; }
|
||||
h1 { font-size: 1.25rem; margin-bottom: 0.5rem; }
|
||||
p { color: #a1a1aa; font-size: 0.9rem; }
|
||||
ul { padding-left: 1.2rem; }
|
||||
a { color: #7dd3fc; text-decoration: none; }
|
||||
a:hover { text-decoration: underline; }
|
||||
.card { border: 1px solid #27272a; border-radius: 0.75rem; padding: 1rem 1.25rem; margin-top: 1rem;
|
||||
background: #18181b; }
|
||||
code { background: #27272a; padding: 0.1em 0.35em; border-radius: 0.25rem; font-size: 0.85em; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<h1>SRS 流媒体(本机)</h1>
|
||||
<p>此页由仓库内 <code>services/srs/data/index.html</code> 提供;静态目录挂载后根路径不再 404。</p>
|
||||
<div class="card">
|
||||
<p><strong>常用入口</strong></p>
|
||||
<ul>
|
||||
<li><a id="api-versions" href="#">SRS HTTP API — 版本信息 (JSON)</a></li>
|
||||
<li><a id="api-summaries" href="#">SRS — 摘要接口</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="card">
|
||||
<p><strong>端口说明(默认)</strong></p>
|
||||
<ul>
|
||||
<li><code>1935</code> RTMP 推/拉流</li>
|
||||
<li><code>1985</code> HTTP API</li>
|
||||
<li><code>8080</code> 本页与 HLS/HTTP 静态</li>
|
||||
<li><code>10080/udp</code> SRT</li>
|
||||
</ul>
|
||||
</div>
|
||||
<script>
|
||||
(function () {
|
||||
var h = location.hostname || "live.local";
|
||||
var api = "http://" + h + ":1985";
|
||||
var av = document.getElementById("api-versions");
|
||||
var as = document.getElementById("api-summaries");
|
||||
if (av) { av.href = api + "/api/v1/versions"; }
|
||||
if (as) { as.href = api + "/api/v1/summaries"; }
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
16
d2ypp2/services/srs/docker-compose.yml
Normal file
16
d2ypp2/services/srs/docker-compose.yml
Normal file
@@ -0,0 +1,16 @@
|
||||
version: "3.3"
|
||||
|
||||
services:
|
||||
srs:
|
||||
image: ossrs/srs:5
|
||||
container_name: live-srs
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "${SRS_RTMP_PORT:-1935}:1935"
|
||||
- "${SRS_API_PORT:-1985}:1985"
|
||||
- "${SRS_HTTP_PORT:-8080}:8080"
|
||||
- "${SRS_SRT_PORT:-10080}:10080/udp"
|
||||
volumes:
|
||||
- ./conf/srs.conf:/usr/local/srs/conf/live.conf:ro
|
||||
- ./data:/usr/local/srs/objs/nginx/html
|
||||
command: ["./objs/srs", "-c", "conf/live.conf"]
|
||||
Reference in New Issue
Block a user