Переглянути джерело

feat: add go2rtc streaming service with configuration and startup script

- Introduce go2rtc binary for RTSP to WebRTC streaming
- Create go2rtc.yaml configuration file for stream and API settings
- Add start.sh script for easy service launch and management
yb 2 тижнів тому
батько
коміт
5182a77587
3 змінених файлів з 39 додано та 0 видалено
  1. BIN
      go_stream/go2rtc
  2. 16 0
      go_stream/go2rtc.yaml
  3. 23 0
      go_stream/start.sh

BIN
go_stream/go2rtc


+ 16 - 0
go_stream/go2rtc.yaml

@@ -0,0 +1,16 @@
+# go2rtc 配置文件
+# 启动命令: ./go2rtc -config go2rtc.yaml
+
+streams:
+  camera1: rtsp://admin:Wxc767718929@192.168.0.64:554/Streaming/Channels/101
+
+webrtc:
+  candidates:
+    - stun:stun.l.google.com:19302
+
+api:
+  listen: ":1984"
+  origin: "*"
+
+log:
+  level: info

+ 23 - 0
go_stream/start.sh

@@ -0,0 +1,23 @@
+#!/bin/bash
+
+# go2rtc 快速启动脚本
+# 用于将 RTSP 摄像头转换为 WebRTC 流
+
+cd "$(dirname "$0")"
+
+echo "================================"
+echo "  go2rtc 流媒体服务"
+echo "================================"
+echo ""
+echo "启动服务..."
+echo ""
+echo "服务地址:"
+echo "  - 管理界面: http://localhost:1984"
+echo "  - WebRTC:   http://localhost:1984/api/webrtc?src=camera1"
+echo "  - HLS:      http://localhost:1984/api/stream.m3u8?src=camera1"
+echo ""
+echo "按 Ctrl+C 停止服务"
+echo "================================"
+echo ""
+
+./go2rtc -config go2rtc.yaml