Back to search
douyin-live-recorder
SkillWorks with Claude CodeGitHub
抖音直播切片号矩阵内容生产 Skill。支持多直播间监控、开播自动录制、边录边传、高光识别、自动剪辑、标题生成和授权账号批量发布。用户需要配置、启动、停止或查看直播内容流水线时使用;仅处理已获授权的直播内容。
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Checked today
Badge for your README
Markdown
[](/listings/weizhuochun--douyin-live-recorder)HTML
<a href="/listings/weizhuochun--douyin-live-recorder"><img src="/api/listings/weizhuochun--douyin-live-recorder/badge.svg" alt="findsafeskills safety rating" /></a>Install
i
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
git clone https://github.com/WeiZhuochun/douyin-live-recorder \ ~/.claude/skills/douyin-live-recorder
环境和账号配置见 [setup.md](reference/setup.md)。
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 182 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- ---
- name: douyin-live-recorder
- version: v3.0.0
- description: 抖音直播切片号矩阵内容生产 Skill。支持多直播间监控、开播自动录制、边录边传、高光识别、自动剪辑、标题生成和授权账号批量发布。用户需要配置、启动、停止或查看直播内容流水线时使用;仅处理已获授权的直播内容。
- ---
- # 抖音直播切片号矩阵内容生产 Skill
- 多直播间监控 → 开播自动录制 → 边录边传 → 高光识别 → 自动剪辑 → 标题生成 → 多账号发布。
- 适用场景:将已授权直播内容加工为切片号矩阵的持续素材供给。
- ## 架构概览
- ```
- monitor.sh(主守护进程)
- ├── 每 60 秒轮询所有目标直播间
- ├── 检测到开播 → 启动 record_room.sh(后台)
- │ └── ffmpeg 分片录制(每 10 分钟一个 clip)
- │ └── 启动 watch_upload.sh(后台)
- │ └── 分片完成即上传网盘
- └── 检测到下播 → 上传末尾分片 → content_pipeline.py
- ├── 高光候选排序
- ├── 竖屏自动剪辑
- ├── 标题/元数据生成
- └── 多账号发布适配器
- ```
- ## 目录结构
- ```
- ~/douyin_archive/
- ├── recordings/<session_tag>/ # 录制分片
- │ ├── clip_000.mp4
- │ ├── clip_001.mp4
- │ ├── .uploaded/ # 已上传标记
- │ └── highlights/ # 成片、元数据与发布台账
- ├── logs/
- │ ├── monitor.log
- │ └── <room_id>.log
- └── state/
- ├── monitor.pid
- ├── <room_id>.pid # 录制进程 PID
- └── <room_id>.session # 当前会话信息
- ~/.claude/skills/douyin-live-recorder/config/
- ├── rooms.json # 监控房间配置
- ├── pipeline.json # 高光、剪辑、标题与发布策略
- └── accounts.json # 本地账号适配器,不提交仓库
- ```
- ---
- ## 触发规则
- 满足以下任一条件即执行:
- - 用户提及"启动监控"、"开始录制"、"无人值守"
- - 用户提及"添加直播间"、"配置房间"
- - 用户提及"查看录制状态"、"录制进度"
- - 用户提及"停止监控"、"停止录制"
- - 用户提及"高光识别"、"自动剪辑"、"标题生成"、"矩阵发布"
- ---
- ## 核心操作
- ### 1. 配置监控房间
- 编辑 `~/.claude/skills/douyin-live-recorder/config/rooms.json`,添加目标直播间:
- ```json
- {
- "rooms": [
- {"douyin_id": "直播间ID_1", "name": "主播A", "enabled": true},
- {"douyin_id": "直播间ID_2", "name": "主播B", "enabled": true}
- ],
- "segment_seconds": 600,
- "check_interval": 60,
- "netdisk_base": "直播归档"
- }
- ```
- ### 2. 启动无人值守监控
- ```bash
- bash ~/.claude/skills/douyin-live-recorder/scripts/monitor.sh start
- ```
- - 后台运行,关闭终端不受影响
- - 日志写入 `~/douyin_archive/logs/monitor.log`
- ### 3. 查看录制状态
- ```bash
- bash ~/.claude/skills/douyin-live-recorder/scripts/status.sh
- ```
- 输出当前正在录制的房间、分片上传、高光生成与矩阵发布进度。
- ### 4. 停止监控
- ```bash
- bash ~/.claude/skills/douyin-live-recorder/scripts/monitor.sh stop
- ```
- 停止监控守护进程,**不中断**正在进行的录制。
- 如需同时停止所有录制:
- ```bash
- bash ~/.claude/skills/douyin-live-recorder/scripts/monitor.sh stopall
- ```
- ### 5. 运行内容生产流水线
- 录制结束后自动执行。手动补跑或预演发布时:
- ```bash
- python3 ~/.claude/skills/douyin-live-recorder/scripts/content_pipeline.py \
- --session-dir ~/douyin_archive/recordings/<session> \
- --session-tag <session> --streamer <主播> \
- --config ~/.claude/skills/douyin-live-recorder/config/pipeline.json \
- --publish --dry-run
- ```
- 发布属于外部操作。先检查生成的视频、标题和账号映射,得到用户明确确认后才能移除 `--dry-run`。账号密钥只能通过环境变量注入。
- ---
- ## 工作流:开播到归档完整链路
- ```
- monitor.sh 检测到开播
- ↓
- record_room.sh 启动
- ├── streamlink 拉取直播流
- └── ffmpeg -f segment 每 600 秒切一个分片
- ↓(分片写完)
- watch_upload.sh 检测到新完整分片
- ├── bdpan whoami(确认登录)
- ├── bdpan mkdir 直播归档/<YYYYMM>/<session_tag>/raw
- ├── bdpan upload <本地分片> <远端路径含文件名>
- └── 写入 .uploaded/<分片名> 标记
- ↓(主播下播,ffmpeg 退出)
- record_room.sh 退出前上传最后一片
- ↓(watch_upload.sh 清理退出)
- content_pipeline.py 识别高光并生成竖屏切片
- ↓
- 生成标题和元数据 → 发布适配器分发至已授权账号
- ↓
- 记录 publish-ledger.jsonl 发布台账
- ```
- ---
- ## 与 bdpan-storage Skill 的协作
- 上传操作遵循 bdpan-storage Skill 所有规范:
- - 命令使用 API 路径,展示时使用"我的应用数据/bdpan/..."
- - 执行前先 `bdpan whoami` 确认登录
- - 网盘路径规则:`直播归档/<YYYYMM>/<session_tag>/raw/<文件名>`
- - 远端路径**必须含文件名**
- ---
- ## 注意事项
- - 分片上传(`bdpan upload`)为免费功能;分享链接生成需 SVIP
- - 建议 `segment_seconds` 设为 600(10 分钟),过短影响上传效率
- - 本 Skill 不录制直播弹幕
- - 仅处理已获得主播或版权方授权的直播内容
- - 默认关闭真实发布;启用前必须配置本地账号文件并完成预演
- ---
- ## 参考文档
- | 文档 | 何时查阅 |
- |------|---------|
- | [setup.md](./reference/setup.md) | 首次配置环境 |
- | [troubleshooting.md](./reference/troubleshooting.md) | 录制/上传失败排查 |
- | [content-pipeline.md](./reference/content-pipeline.md) | 配置高光、标题和多账号发布 |
README.md · README · 112 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- # douyin-live-recorder
- 面向切片号矩阵的直播内容生产 Skill:多直播间无人值守监控、边录边传、高光识别、自动剪辑、标题生成和多账号发布。
- ## 功能
- - 🔍 **多直播间监控** — 7×24 小时轮询,开播自动启动录制
- - 🎬 **边录边传** — 按固定时长切片,完整分片立即归档百度网盘
- - ✨ **高光与剪辑** — 内置音频活跃度检测,可替换为多模态模型;自动输出竖屏短视频
- - ✍️ **标题生成** — 默认模板零依赖运行,也可通过命令适配器接入 LLM
- - 📣 **矩阵发布** — 一个片段分发至多个授权账号,支持重试和 JSONL 发布台账
- - 🤖 **Agent 操作** — 用自然语言配置、启停并查询录制与加工进度
- ## 依赖
- | 工具 | 安装方式 | 用途 |
- |------|----------|------|
- | [streamlink](https://streamlink.github.io/) | `pip3 install streamlink` | 抓取直播流 |
- | [ffmpeg](https://ffmpeg.org/) | `brew install ffmpeg` | 分片、分析和剪辑 |
- | [bdpan](https://github.com/WeiZhuochun/bdpan-storage) | 参见 bdpan-storage Skill | 百度网盘 CLI |
- | Python 3.10+ | 系统 Python | 高光分析、标题与发布编排 |
- ## 安装
- ```bash
- git clone https://github.com/WeiZhuochun/douyin-live-recorder \
- ~/.claude/skills/douyin-live-recorder
- ```
- 环境和账号配置见 [setup.md](reference/setup.md)。
- ## 使用方式
- 安装后直接用自然语言指令触发:
- ```text
- 添加主播 A 和主播 B,启动无人值守监控。
- 录制结束后生成 5 条高光切片,检查无误后发布到矩阵账号。
- ```
- Agent 自动完成:检测直播 → 录制分片 → 边录边传 → 高光识别 → 竖屏剪辑 → 标题生成 → 多账号发布。
- 真实发布默认关闭。先按[内容生产与多账号发布](reference/content-pipeline.md)配置本地账号适配器,并使用 `--dry-run` 检查发布计划。
- ## 工作流
- ```text
- 多直播间轮询
- └─ 开播 → 分片录制 ─┬─ 完整分片实时上传百度网盘
- └─ 下播 → 高光排序 → 自动剪辑 → 标题生成
- └─ 授权账号矩阵发布
- ```
- 默认高光检测器分析音频活跃度,无需额外模型即可运行。团队可配置命令适配器,将检测器替换为自有 ASR、多模态理解模型,并将标题生成替换为 LLM。
- ## 产物结构
- 原始分片按月份和录制场次归档到百度网盘(`/apps/bdpan/` 下):
- ```text
- 直播归档/<YYYYMM>/<YYYYMMDD_HHMM_主播昵称>/raw/clip_000.mp4
- ```
- 本地会话生成可发布视频、元数据和发布台账:
- ```text
- <session>/
- ├── clip_000.mp4
- └── highlights/
- ├── highlight_01.mp4
- ├── highlight_01.json
- ├── manifest.json
- └── publish-ledger.jsonl
- ```
- ## 与 bdpan-storage Skill 协作
- 上传环节直接调用 `bdpan`,遵循 [bdpan-storage Skill](https://github.com/WeiZhuochun/bdpan-storage) 的路径和安全规范。
- ## 文件结构
- ```text
- douyin-live-recorder/
- ├── SKILL.md
- ├── config/
- │ ├── rooms.json
- │ ├── pipeline.json
- │ └── accounts.json.example
- ├── scripts/
- │ ├── monitor.sh
- │ ├── check_live.sh
- │ ├── record_room.sh
- │ ├── watch_upload.sh
- │ ├── content_pipeline.py
- │ └── status.sh
- └── reference/
- ├── setup.md
- ├── content-pipeline.md
- └── troubleshooting.md
- ```
- ## 注意事项
- - 仅处理已获得主播或版权方授权的直播内容,并遵守平台规则
- - 账号凭据只通过本地环境变量注入,`config/accounts.json` 不会提交
- - 真实发布前必须检查视频、标题和账号映射;默认使用 `--dry-run`
- - `bdpan share` 为百度网盘付费接口,需 SVIP 权限
- - 不录制直播弹幕
- ## License
- MIT
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.