Files
itxiaohui 463dbb1566 feat: XLive 直播平台初始版本
多用户网页直播平台:OBS/FFmpeg 鉴权 RTMP 推流到 SRS,HLS 低延迟播放;
Fastify 5 + Prisma + PostgreSQL + Redis 后端,Vue 3 前端,Docker Compose 部署。
2026-09-14 17:57:59 +08:00

54 lines
1.3 KiB
Plaintext

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;
}
vhost __defaultVhost__ {
tcp_nodelay on;
min_latency on;
play {
gop_cache off;
queue_length 10;
mw_latency 100;
}
publish {
mr off;
}
hls {
enabled on;
hls_path ./objs/nginx/html;
hls_fragment 1;
hls_window 6;
hls_cleanup on;
hls_dispose 30;
hls_m3u8_file live/[stream].m3u8;
hls_ts_file live/[stream]-[seq].ts;
}
dvr {
enabled on;
dvr_path ./objs/nginx/html/[app]/replays/[stream].[timestamp].flv;
dvr_plan session;
}
http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
http_hooks {
enabled on;
on_publish http://api:3000/api/media/hooks?secret=__HOOK_SECRET__;
on_unpublish http://api:3000/api/media/hooks?secret=__HOOK_SECRET__;
on_dvr http://api:3000/api/media/hooks?secret=__HOOK_SECRET__;
}
}