Files
42_150/CLAUDE.md
Timmy ce4f9f19bd 調校 MediaMTX 抗閃爍:加大寫入佇列、強制 RTSP 走 TCP
實況偶發「閃一下」,查 journalctl 為應用層問題(非網路):
- reader is too slow → 加 writeQueueSize: 1024(預設 512)吸收瞬時卡頓
- UDP decode errors → rtspTransports: [tcp] 杜絕 UDP 掉包花屏
.103 線上設定已同步並重啟驗證;另補上 init 產生的 CLAUDE.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-22 20:54:28 +08:00

28 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
## 這是什麼
純研究/文件記錄 repo主題是 TP-Link **TL-IPC42EW-4** 網路攝影機(`192.168.42.150`)。沒有應用程式原始碼、沒有建置/測試/lint 流程——內容是 Markdown 文件加一份 MediaMTX 設定檔。
檔案:
- `TL-IPC42EW-4-研究報告.md` — 裝置身分、開放埠、RTSP/Web 探測結果(事實來源)
- `串流轉發.md` — 用 MediaMTX 突破單一 RTSP 連線限制的方案說明
- `mediamtx.yml` — 上述方案實際用的設定檔
- `README.md` — 兩份文件的索引與摘要
## 必須跨多檔一致的關鍵事實
這幾項貫穿三份文件,改一處就要同步其餘:
- **RTSP 匿名可看**`/stream1`(H.265 1080p) 與 `/stream2`(H.264 704×576) 兩條碼流皆**無需帳密**。
- **併發限制**:直連 RTSP 實測只剩 1 個空檔,多連線會撞 `406 Not Acceptable`這是「剩餘空檔」非確定的硬上限見研究報告的判定方法。MediaMTX 用 `sourceOnDemand` 只佔 1 條來源連線再對外複製。
- **已部署實況**MediaMTX v1.19.1 跑在 **CT103 / `192.168.42.103`**Ubuntu 24.04systemd 服務名 `mediamtx`,設定檔 `/usr/local/etc/mediamtx.yml`,內容須與本 repo 的 `mediamtx.yml` 一致)。
- **對外路徑命名**`cam`(主碼流) / `cam-sub`(子碼流)。⚠️ 此命名須符合 .103 線上實況——近期 commit 曾在 `cam``ipc150` 間改動,改名時務必同步 `mediamtx.yml``串流轉發.md`、README 三處及 .103 上的設定檔。
## 慣例
- 一律用繁體中文撰寫文件。
- 文件區分「已實測驗證」與「規格查證/推測」——研究報告刻意標註哪些是 ffplay 實測、哪些是廠商資料,新增內容請延續這個區分,不要把未驗證的當成事實。