
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Self-hosted multistream relay server for Eriol. Receives a single video stream via SRT and redistributes it simultaneously to multiple RTMP destinations (***, ***, Kick, *** Live, Restream, or any RTMP-compatible endpoint).
bashdocker run -d \ --name eriol-streaming \ -p 8080:8080 \ -p 5000:5000/udp \ eriolapp/server-streaming:latest
On startup the container auto-generates authentication credentials and prints them to the logs:
bashdocker logs eriol-streaming
╔══════════════════════════════════════════════════════════════╗ ║ ERIOL STREAMING SERVER - CREDENTIALS ║ ╠══════════════════════════════════════════════════════════════╣ ║ Username: aBcDeFgHiJkL ║ ║ Password: xYz0123456789AbCdEfGh ║ ╚══════════════════════════════════════════════════════════════╝
You can retrieve them again at any time:
bashdocker exec eriol-streaming cat /app/.credentials.txt
┌─────────────┐ SRT (UDP:5000) ┌──────────────────────┐ │ Eriol App │ ─────────────────────────────► │ Streaming Server │ │ (Desktop) │ │ │ └─────────────┘ │ Demux ► Transcode │ │ ► FLV Mux ► Tee │ │ │ │ │ ┌────┴────┐ │ │ │ RTMP │ │ │ │ Sinks │ │ └────┴─────────┘───────┘ │ │ │ ┌─────────┘ │ └─────────┐ ▼ ▼ ▼ Twitch YouTube Kick
This means you only upload one stream from your machine — the server handles duplication to all platforms, saving bandwidth and CPU on the broadcaster's side.
| Port | Protocol | Purpose |
|---|---|---|
8080 | TCP | HTTP REST API (management, health, metrics) |
5000 | UDP | SRT ingest (receives the video stream) |
| Variable | Default | Description |
|---|---|---|
STREAMING_AUTH_USER | (auto-generated) | Override the API username |
STREAMING_AUTH_PASS | (auto-generated) | Override the API password |
RUST_LOG | info | Log level (trace, debug, info, warn, error) |
GST_DEBUG | 2 | GStreamer debug level (0-9) |
TZ | UTC | Container timezone |
bashdocker run -d \ --name eriol-streaming \ -p 8080:8080 \ -p 5000:5000/udp \ -e STREAMING_AUTH_USER=myadmin \ -e STREAMING_AUTH_PASS=mysecretpassword \ eriolapp/server-streaming:latest
The server is configured via a TOML file mounted at /app/config/config.toml. A default configuration is embedded in the image — mount your own to customize:
bashdocker run -d \ --name eriol-streaming \ -p 8080:8080 \ -p 5000:5000/udp \ -v ./config.toml:/app/config/config.toml:ro \ eriolapp/server-streaming:latest
toml[server] bind = "0.0.0.0" http_port = 8080 public_host = "your-domain.com" # Public domain or IP cert_path = "/app/config/cert.pem" # TLS cert (optional) key_path = "/app/config/key.pem" # TLS key (optional) [auth] # Managed automatically — override with env vars username = "placeholder" password = "placeholder" [srt] port = 5000 latency_ms = 120 # passphrase = "optional-secret-min-10-chars" # SRT encryption [session] grace_period_secs = 30 # Time before orphaned sessions are cleaned keepalive_timeout_secs = 60 # Max time without keepalive before timeout max_sessions = 1 # Concurrent session limit [stream] default_width = 1920 default_height = 1080 default_framerate = 30 default_bitrate = 6000000 # 6 Mbps video default_audio_bitrate = 128000 # 128 kbps audio keyframe_interval_ms = 2000 # 2 seconds transcode = true # false = passthrough (requires H264+AAC input) [logging] level = "info" # trace, debug, info, warn, error format = "json" # json or pretty
yamlservices: eriol-server: image: eriolapp/server-streaming:latest container_name: eriol-streaming-server restart: unless-stopped ports: - "8080:8080" - "5000:5000/udp" volumes: - ./config.toml:/app/config/config.toml:ro - ./logs:/app/logs environment: - RUST_LOG=info - TZ=UTC deploy: resources: limits: cpus: '4' memory: 4G reservations: cpus: '2' memory: 2G healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8080/api/health"] interval: 30s timeout: 10s retries: 3 start_period: 10s
yamlservices: eriol-server: image: eriolapp/server-streaming:latest runtime: nvidia environment: - NVIDIA_VISIBLE_DEVICES=all - NVIDIA_DRIVER_CAPABILITIES=compute,video,utility ports: - "8080:8080" - "5000:5000/udp"
Requires https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html on the host.
yamlservices: eriol-server: image: eriolapp/server-streaming:latest devices: - /dev/dri:/dev/dri environment: - GST_VAAPI_ALL_DRIVERS=1 ports: - "8080:8080" - "5000:5000/udp"
All endpoints require HTTP Basic Auth (Authorization: Basic base64(user:pass)).
| Method | Endpoint | Description |
|---|---|---|
GET | /api/health | Health check |
GET | /api/metrics | System metrics (CPU, memory, network) |
GET | /api/stream/status | Current stream status |
| Method | Endpoint | Description |
|---|---|---|
POST | /api/stream/start | Start streaming |
POST | /api/stream/stop | Stop streaming |
| Method | Endpoint | Description |
|---|---|---|
GET | /api/providers | List all RTMP providers |
POST | /api/providers | Add an RTMP provider |
PUT | /api/providers/:name | Update a provider |
DELETE | /api/providers/:name | Remove a provider |
| Method | Endpoint | Description |
|---|---|---|
POST | /api/v1/sessions | Create session (returns session ID + SRT details) |
GET | /api/v1/sessions/:id | Get session state |
POST | /api/v1/sessions/:id/keepalive | Send keepalive heartbeat |
PUT | /api/v1/sessions/:id/providers | Update RTMP providers mid-stream |
DELETE | /api/v1/sessions/:id | End session |
bashcurl -u admin:password -X POST https://your-server:8080/api/v1/sessions \ -H "Content-Type: application/json" \ -d '{ "providers": [ { "name": "twitch", "url": "rtmp://live.twitch.tv/app/live_xxxxx" }, { "name": "youtube", "url": "rtmp://a.rtmp.youtube.com/live2/xxxx-xxxx" } ] }'
Response:
json{ "session_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "srt_url": "srt://your-server:5000?streamid=a1b2c3d4-e5f6-7890-abcd-ef1234567890", "status": "waiting_stream" }
The server auto-detects available GPU encoders at startup. Priority order:
| Priority | Encoder | GPU |
|---|---|---|
| 1 | nvh264enc | NVIDIA (NVENC) |
| 2 | amfh264enc | AMD (AMF) |
| 3 | qsvh264enc | Intel (Quick Sync) |
| 4 | msdkh264enc | Intel (Media SDK) |
| 5 | vah264enc | VA-API |
| 6 | vaapih264enc | VA-API (legacy) |
| 7 | x264enc | Software (CPU) |
If no GPU is available, it falls back to software encoding (x264enc). Set transcode = false in config for zero-copy passthrough if your input is already H.264 + AAC.
POST /api/v1/sessions → WaitingStream │ SRT stream connects (port 5000) │ ▼ Live ◄──── POST keepalive (every ~30s) │ SRT disconnects or timeout │ ▼ Disconnected │ DELETE /api/v1/sessions/:id │ ▼ Ended
Sessions expire after keepalive_timeout_secs (default 60s) without a heartbeat.
| Path | Purpose |
|---|---|
/app/config/config.toml | Configuration file (mount read-only) |
/app/logs | Application logs |
/app/.credentials.txt | Auto-generated credentials (runtime) |
| Scenario | CPU | Memory | Notes |
|---|---|---|---|
| Software transcoding (1080p30) | 4 cores | 4 GB | x264enc baseline |
| Hardware transcoding (1080p30) | 2 cores | 2 GB | With GPU passthrough |
| Passthrough (no transcode) | 1 core | 512 MB | transcode = false |
| Multi-destination (5+ RTMP) | +1 core | +512 MB | Per additional output |
| Component | Formats |
|---|---|
| Container | MPEG-TS, Matroska (MKV) |
| Video Codec | H.264, H.265, VP8, VP9 (re-encoded to H.264) |
| Audio Codec | AAC, ***, MP3, FLAC (re-encoded to AAC) |
| Protocol | SRT (listener mode, UDP) |
cert_path and key_path in configpassphrase in [srt] config (minimum 10 characters)eriol (UID 1000)bashcurl -u user:pass http://localhost:8080/api/health
bashdocker logs -f eriol-streaming-server
bashdocker run -e RUST_LOG=debug -e GST_DEBUG=4 eriolapp/server-streaming:latest
Check startup logs for encoder detection:
INFO Detected H264 encoder: nvh264enc (hardware)
If no hardware encoder is found:
INFO Detected H264 encoder: x264enc (software fallback)
| Issue | Cause | Fix |
|---|---|---|
401 Unauthorized | Wrong credentials | Check docker logs or .credentials.txt |
| SRT connection refused | Port not exposed | Ensure -p 5000:5000/udp |
| High CPU usage | Software encoding | Enable GPU passthrough or set transcode = false |
| Stream lag | SRT latency too low | Increase latency_ms in config (try 200-500) |
| No audio in output | Input codec unsupported | Check input has AAC/*** audio |
| Tag | Description |
|---|---|
latest | Latest stable release |
0.1.0 | Specific version |
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务