类似 YouTube 直播的推流接收 + 播放平台。内置 nginx-rtmp 接收推流,自动转 HLS 播放。
cd /root/stream-live
docker compose up -d
访问:
http://<IP>:5201http://<IP>:5201/login (admin / admin123)rtmp://<IP>:1935/live<频道密钥>ffmpeg -re -i video.mp4 -c copy -f flv rtmp://<IP>:1935/live/<推流密钥>
在频道设置中填写源 URL,点击"拉流"按钮。
| 变量 | 默认值 | 说明 |
|---|---|---|
ADMIN_USER | admin | 管理员用户名 |
ADMIN_PASS | admin123 | 管理员密码 |
SECRET_KEY | 自动生成 | Session密钥(持久化) |
SERVER_HOST | 空 | 外部IP/域名(展示推流地址用) |
OBS/FFmpeg 推流
│
▼
nginx-rtmp (:1935) ←── 接收 RTMP + 推流鉴权(on_publish回调)
│ 自动转 HLS 切片
▼
HLS 文件 (/app/data/hls/<stream_key>/)
│
▼
Flask (:5200→:5201) ←── HLS 文件服务 + Web UI + REST API
│
▼
浏览器 HLS.js 播放器
stream-live/
├── app.py # Flask 后端
├── templates/ # 页面模板
├── static/css/ # 暗色主题样式
├── nginx-rtmp.conf # nginx-rtmp 配置
├── supervisord.conf # 进程管理(nginx+gunicorn)
├── Dockerfile
├── docker-compose.yml
└── README.md
https://github.com/yyzq-cf/stream-live
MIT
Content type
Image
Digest
sha256:94850a7a7…
Size
228.9 MB
Last updated
11 days ago
docker pull ywsj/stream-live