文档安装
- 作者仓库星标 0
- 作者更新于 实时读取
- 作者仓库 skills-registry
- 领域
- 文档
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 88 / 100 · 社区维护
- 作者 / 版本 / 许可
- @tomevault-io · 未声明 license
- Token 消耗评级
- 中等消耗
- 接入复杂程度
- 需手动接入
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- macOS · Docker
- 底层运行要求
- Python · Docker
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- Shell 执行
- 网络行为
- 允许外网请求
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: mediamtx-docs
description: > Use when this capability is needed. uv run ${CLAUDESKILLDIR}/scripts/mtxdocs.py list-pages Top…
category: 文档
runtime: Python / Docker
---
# mediamtx-docs 输出预览
## PART A: 任务判断
- 适用问题:PRD、RFC、README、项目说明或知识库整理。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Quick start / When to use / Step 1 — Know the page catalog”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于PRD、RFC、README、项目说明或知识库整理,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Quick start / When to use / Step 1 — Know the page catalog”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、执行终端命令、会按任务需要访问外部网络、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件、执行终端命令;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/v3`、`/v2`、`/v1`、`/applications` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件、执行终端命令。
先用一个小任务确认它会围绕“Quick start / When to use / Step 1 — Know the page catalog”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: mediamtx-docs
description: > Use when this capability is needed. uv run ${CLAUDESKILLDIR}/scripts/mtxdocs.py list-pages Top…
category: 文档
source: tomevault-io/skills-registry
---
# mediamtx-docs
## 什么时候使用
- 把项目文档方向的常用动作沉淀成 Agent 可调用的技能 适合处理README、PRD、RFC、教程和知识库文档,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的…
- 面向PRD、RFC、README、项目说明或知识库整理,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Quick start / When to use / Step 1 — Know the page catalog」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件、执行终端命令;会按任务需要访问外部网络;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "mediamtx-docs" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Quick start / When to use / Step 1 — Know the page catalog
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> Python / Docker | 读取文件、写入/修改文件、执行终端命令 | 会按任务需要访问外部网络
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} MediaMTX Docs
Context: $ARGUMENTS
Quick start
- Find a config key / API endpoint / feature: -> Step 2 (
search --query <term>) - Read a how-to in full: -> Step 4 (
fetch --page <publish/X or read/X>) - Read one section: -> Step 3 (
section --page <page> --id <anchor>) - Prime cache for offline: -> Step 5 (
index)
When to use
- User asks "how do I push RTSP to MediaMTX?" or "how do I configure JWT auth?" or "what control-api endpoints exist?"
- Need to verify a MediaMTX config key or CLI flag before recommending it.
- Need the canonical mediamtx.org URL to cite.
- Before wiring up a publisher/reader, confirm the protocol endpoint and default port (RTSP 8554, RTMP 1935, HLS 8888, WebRTC 8889, SRT 8890, API 9997, Metrics 9998, pprof 9999).
- For the running-server wrapper + API calls, see the
mediamtx-serverskill.
Step 1 — Know the page catalog
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py list-pages
Top-level families:
| Family | When to pick |
|---|---|
kickoff/* |
Install, upgrade, first-run. |
features/* |
Core concepts (publish, read, record, playback, auth, hooks, metrics). |
features/<proto>-specific-features |
Per-protocol options (rtsp-specific-features, rtmp-specific-features, webrtc-specific-features, srt-specific-features). |
features/configuration + features/control-api + features/logging + features/metrics |
Operational — the knobs you actually turn in production. |
references/configuration-file |
Authoritative list of every YAML option. Start here for config questions. |
references/control-api |
Authoritative list of every /v3/* endpoint. |
publish/<client> |
How to SEND a stream in via ffmpeg / gstreamer / OBS / Python / Go / Unity / etc. |
read/<client> |
How to PLAY a stream out via ffmpeg / gstreamer / VLC / OBS / browsers / etc. |
github-readme, github-mediamtx.yml, github-apidocs |
Raw upstream files — the ground truth when mediamtx.org is behind. |
Read references/pages.md for the full catalog.
Step 2 — Search first
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py search --query "recordFormat" --limit 5
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py search --query "jwt" --page features/authentication
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py search --query "/v3/paths" --page references/control-api
Use --regex for anchored patterns. Each hit prints page:line, nearest heading, canonical URL, and ±3 lines of context.
Step 3 — Read one section
When a hit surfaces [§anchor]:
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py section --page features/authentication --id internal-users
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py section --page references/configuration-file --id paths
--id also accepts a heading keyword as fallback.
Step 4 — Fetch a whole page
Use sparingly — howto pages are compact enough to fetch whole when you actually need the full recipe:
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py fetch --page publish/ffmpeg
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py fetch --page read/web-browsers
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py fetch --page github-mediamtx.yml # raw upstream YAML
--format json for structured handoff.
Step 5 — Prime cache
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py index
Fetches every known page (~70 URLs) at 0.3s each. Override cache dir via MEDIAMTX_DOCS_CACHE. Clear with clear-cache.
Gotchas
- MediaMTX does NOT transcode — it remuxes only. If a publisher pushes HEVC into a path and a reader asks for WebRTC in the browser, the reader will FAIL (browsers don't universally support HEVC in WebRTC). The docs page
features/remuxing-reencoding-compressionis explicit: for transcoding, chain an externalffmpegpublisher. When in doubt, publish as H.264 + Opus. - The binary is now
mediamtx(wasrtsp-simple-server). Repo moved fromaler9/rtsp-simple-server->bluenviron/mediamtx. Old Docker tags and install scripts still float around the internet; ignore them. - Default ports you'll see quoted in docs: RTSP 8554, RTSPS 8322, RTMP 1935, RTMPS 1936, HLS 8888, WebRTC 8889, SRT 8890, Control API 9997, Metrics 9998, pprof 9999, Playback 9996. Each is a separate listener; disable any you don't need in
mediamtx.yml. - Three auth backends, exclusive.
internal(users in YAML underauthInternalUsers),http(POST to an external endpoint),jwt(verify a bearer token via JWK URL or static secret). You can't mix them globally — but per-pathpermissionsstill apply. Seefeatures/authentication. - Auth actions:
publish,read,playback,api,metrics,pprof. Default allowed users haveallwhich is shorthand for the union. Lock down production before exposing port 9997. - Hooks fire on path events, not on connection events.
runOnInitruns when the path is first registered, not when a client connects.runOnDemandis what you want for lazy pipelines. Readfeatures/hooks. always-availablevson-demand-publishing. SetsourceOnDemand: trueto startsource:only when readers appear (saves bandwidth).sourceOnDemandStartTimeout+sourceOnDemandCloseAftercontrol how long MediaMTX waits / keeps source alive after the last reader.- Control API lives at
/v3/*, NOT/v2/*or/v1/*. Older tutorials reference v2; the v3 namespace is the current stable. Full endpoint list is onreferences/control-api. - HLS has two variants: "HLS" (standard,
.tssegments, ~6s latency) and "Low-Latency HLS" (LL-HLS, fMP4 partial segments, ~2s latency). Configurable per path viahlsVariant. - WebRTC signalling is WHIP/WHEP over HTTP at
http://<host>:8889/<path>/whip(publish) and.../whep(read). Default ICE servers + STUN config live at the global level; per-path overrides are NOT supported. - SRT uses the "stream ID" trick for path routing.
srt://host:8890?streamid=publish:<path>:<user>:<pass>to publish;srt://host:8890?streamid=read:<path>:<user>:<pass>to read. Quotes required in most shells. recordFormat: fmp4is the default and what you want. MPEG-TS recording is deprecated for most cases because it can't seek.- Config file hot-reloads on SIGHUP, but some settings (listening ports, TLS certs) require a full restart. If a change "doesn't seem to take", restart the process.
- Docs site pagination is Next.js SSR; anchors are Markdown-slugified headings (
#internal-users,#authentication-methods). Thesection --idcommand accepts either the raw slug or a heading keyword. - Raw upstream YAML is the final authority.
github-mediamtx.ymlpage returns the exactmediamtx.ymlshipped inmainwith every default documented inline. When mediamtx.org lags a release, this is the ground truth.
Examples
Example 1 — "What do I put in mediamtx.yml to enable JWT auth?"
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py search --query "jwt" --page features/authentication --limit 5
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py section --page features/authentication --id jwt
Example 2 — "How do I publish with ffmpeg?"
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py fetch --page publish/ffmpeg
Example 3 — "What's the full list of control-api endpoints?"
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py fetch --page references/control-api
Example 4 — "What does runOnDemandCloseAfter default to?"
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py search --query "runOnDemandCloseAfter" --page github-mediamtx.yml --limit 3
(Upstream YAML has inline defaults — faster than the HTML docs here.)
Example 5 — "Record to disk, rotate every 15 min, keep 4 hours"
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py search --query "recordSegmentDuration" --page features/record
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py search --query "recordDeleteAfter" --page features/record
Example 6 — "WebRTC publish from a browser — what's the WHIP URL?"
uv run ${CLAUDE_SKILL_DIR}/scripts/mtxdocs.py fetch --page publish/web-browsers
Troubleshooting
Error: unknown page: foo
Cause: The name isn't in the catalog.
Solution: Run list-pages. Common mistakes: using record instead of features/record; api instead of references/control-api.
Error: urlopen error [SSL: CERTIFICATE_VERIFY_FAILED]
Cause: System certificate store is out of date (usually macOS Python).
Solution: Run /Applications/Python\ 3.x/Install\ Certificates.command or set SSL_CERT_FILE. Don't patch SSL verification off.
Search returns zero hits for a config key
Cause: Key might be new in main but not yet in the published docs.
Solution: Search against the upstream YAML — search --query "<key>" --page github-mediamtx.yml. The upstream file is the source of truth.
Results look like broken-up tables
Cause: The HTML extractor flattens cell borders into pipes but can't reconstruct multi-line cells. Solution: The search-hit header prints the canonical URL. Open it directly in a browser for the authoritative view.
Cache stale after MediaMTX release
Solution: clear-cache then index. The GitHub fallback pages already track main — if you want a specific release tag, edit the github-* URLs in the script's PAGES dict (or fetch directly with urllib).
Reference docs
- Full page catalog with protocol-to-page cross reference ->
references/pages.md
Source: damionrashford/media-os — distributed by TomeVault.
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核