新增串流轉發方案(MediaMTX/ffmpeg)突破單一RTSP連線限制

This commit is contained in:
Timmy
2026-06-21 09:23:47 +08:00
parent 19d68c5653
commit 22277f8f2c
3 changed files with 75 additions and 0 deletions

14
mediamtx.yml Normal file
View File

@@ -0,0 +1,14 @@
# MediaMTX 設定:把攝影機唯一的 RTSP 串流轉發給多個觀看端
# 用法mediamtx ./mediamtx.yml
paths:
# 主碼流 H.265 1080p → 對外路徑 /cam
cam:
source: rtsp://192.168.42.150:554/stream1
rtspTransport: tcp
sourceOnDemand: yes # 沒人看時不連攝影機,自動釋放那唯一的連線槽
# 子碼流 H.264 704×576 → 對外路徑 /cam-sub手機/縮圖用)
cam-sub:
source: rtsp://192.168.42.150:554/stream2
rtspTransport: tcp
sourceOnDemand: yes