trae-screen-tutorial
Skill0 starsChanged 3 days agoMITView on GitHub
把 IDE / 软件录屏剪成 9:16 竖屏教程短片:逐拍选取片段、按内容裁切放大、加步骤号与标题、两行字幕、进度点和可选中文 TTS 配音,输出 1080×1920 MP4。用户要把开发过程、操作演示、AI 编码录屏做成教程视频或竖屏短视频时调用。
- Installs packages
In this repository46 other files it gives its agents.
- api-engineeringSkill
- baidu-api-devSkill
- business-managementSkill
- computer-useSkill
- copywritingSkill
- doubao-web-imageSkill
- doubao-web-videoSkill
- douyin-pip-shortsSkill
- douyin-script-studioSkill
- geoSkill
- huarui-devSkill
- huarui-videoSkill
- huarui-zhisuanSkill
- juhe-nexgate-devSkill
- juhe-nexgateSkill
- kuaishou-script-studioSkill
- ops-btpanelSkill
- ops-deploySkill
- ops-linuxSkill
- ops-tencentcloudSkill
- seedance-devSkill
- seoSkill
- short-dramaSkill
- site-auditSkill
- site-deliverySkill
- site-incidentSkill
- site-launchSkill
- site-maintenanceSkill
- site-promotionSkill
- site-rescueSkill
- site-visual-designSkill
- svg-lecture-deckSkill
- task-deliverySkill
- toutiao-article-studioSkill
- tutorial-series-planSkill
- tutorial-video-assembleSkill
- versus-script-studioSkill
- video-post-productionSkill
- wechat-mp-studioSkill
- workbuddy-foodSkill
- workbuddy-imageSkill
- wp-adminSkill
- wp-devSkill
- wxchannels-script-studioSkill
- xhs-note-studioSkill
- xingqiao-mediaSkill
The file
Files
录屏转 9:16 教程片
把一整段(或几段)横屏录屏,剪成一条竖屏教程短片。核心不是「转比例」,而是逐拍重新裁切:每一拍只保留画面里真正需要看的区域,放大到接近 1:1,文字才在手机上看清。
什么时候用
- 手上是 16:9 的 IDE / 浏览器 / 桌面录屏,要发抖音、视频号、小红书等竖屏平台。
- 要展示「开发过程」「操作步骤」「AI 干活过程」,而不是单纯搬运整段录像。
- 需要步骤号、标题、字幕、配音,让观众不看画面也能跟上。
不适用:纯口播、无人值守长录屏(>30 分钟)、需要 16:9 成片的场景。
交付形态
<项目目录>/
├─ 成片/<name>-<时长>s-1080x1920.mp4 # 交付物
├─ audio/ # 每拍 TTS(可复用缓存)
├─ _build/ # 分段 mp4、背景卡、preview/ 静帧
└─ beats.json # 唯一的事实源流程
- 定位素材与时间窗。先用
ffprobe记录分辨率、帧率、时长;再按 5–10 秒间隔抽帧,找出一段录屏里「有信息变化」的窗口(文件出现、页面切换、弹层打开)。录屏里 80% 是等待,剪掉。 - 量裁切框,不要靠猜。在原分辨率上确定
crop=[w,h,x,y]。经验值:裁切宽度 800–1400(原始 2432 宽时),缩放后文字约 18–24px。先裁出画面看文字是否被切断,再算坐标。- 聊天/文档区:避开左侧文件树和右侧滚动条。
- 手机原型预览:整块 9:16 面板直接裁,天然适配。
- 某拍裁切宽大于面板比例时,脚本会用同片段模糊铺底补边,不会出现黑边。
- 写
beats.json。每拍:srct_int_outcropsteptitlecap(两行以内,每行 ≤16 字)voice(可长于字幕)。片头片尾可选。字段完整说明见references/配置字段.md。 --preview先看静帧。每拍出一张 1080×1920 的合成图,检查三件事:文字有没有被切断、字幕有没有溢出、裁切里有没有混进无关面板。改beats.json重跑,直到每张都干净。- 出片。脚本按每拍配音时长反推画面时长:
dur = max(min_dur, 配音 + 0.55);素材窗口比时长长时自动setpts加速,短时用tpad=clone挂尾帧。拼完立刻校验总时长,误差 >0.25s 报错。 - 验收。按
references/验收清单.md逐项过:分辨率、帧率、音轨、时长、逐拍抽帧、响度。没有抽帧看过成片不算完成。
版式规则
- 1080×1920;顶部品牌行 + 大号步骤号(绿色)+ 步骤标题;中间 960×980 面板;面板下 9 个进度点;下方两行字幕。
- 字幕是结论,不是旁白原文;旁白可以更长。字幕用粗体主行 + 灰色副行。
- 时长控制在 45–70 秒、9–11 拍;单拍 4.3–6.5 秒。见
references/版式与节奏.md。 - 配音默认
zh-CN-XiaoxiaoNeural、+8%,只在用户允许联网 TTS 时启用;否则voice.enabled=false,靠字幕。见references/配音与字幕.md。
命令
# 每拍静帧自查(先跑这个)
python scripts/build_tutorial.py --config beats.json --preview
# 出片
python scripts/build_tutorial.py --config beats.json依赖:ffmpeg / ffprobe 在 PATH,pip install -r requirements.txt(Pillow + edge-tts,后者仅在开配音时用)。
边界
- 只做「已有录屏 → 短视频」,不做录屏、不做 ASR、不做场景自动识别;时间窗与裁切框由人和预览决定。
- 不自动上传、不自动裁字幕、不猜测素材内容;文案必须来自实际画面或用户提供的事实。
- 中文路径在部分 IDE 预览器里打不开,交付时同时给一份 ASCII 文件名的副本(
output/)。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

