Communitygithub.com

假屏幕录制 —— 截图模拟 screen recording

将静态截图转换为模拟的屏幕录制(TSX),包括动画光标、变化的 URL 栏、页面切换、滤镜交叉淡入淡出、平滑滚动和 Ken Burns 缩放效果。

假屏幕录制 —— 截图模拟 screen recording 是什么?

这个 AI 技能允许开发者通过一系列截图来模拟真实的屏幕录制(screen recording)。它适用于需要演示 Web 应用、仪表盘或设置页面的逐步操作,但无法或不想获取真实录制的情况。该技能基于 Remotion 的 `screencast.tsx` 组件,并通过定义一系列页面、光标轨迹和点击动作来生成具有动态效果的视频。技能支持硬剪辑(导航,URL 改变)、短交叉淡入淡出(页面内过滤,查询参数变化)、平滑滚动、Ken Burns 缩放和持续的漂移效果,让视频看起来更像真实的录制而非幻灯片。它主要用于 `make-tsx` 流程的第二步,生成可控制的 TSX 组件,方便 Re-render 和复用于不同视频。支持的平台包括 Remotion 相关的 AI 编码代理(如 Claude Code、Codex 等)。

兼容平台~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/raisaksham377-bot/youtube-shorts-ai-editor/tree/HEAD/.claude/skills/fake-screencast

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

假屏幕录制 —— 截图 → 模拟的屏幕录制

让一个截图演示看起来像真实的屏幕录制:持久的浏览器 chrome,每个页面会变化的网址栏,一个自定义光标沿着贝塞尔曲线路径平滑移动到每个点击目标,点击时带有涟漪效果,页面切换作为硬剪辑(URL 路径变化),页面内过滤作为短交叉淡入淡出(URL 查询变化),平滑滚动,对重点元素进行慢速 Ken Burns 缩放,以及持续的漂移让它看起来不像幻灯片。TSX 优先:可控、可重新渲染、可跨视频复用。

这是 make-tsx(第二步)内部的一种片段构建技术。使用 make-tsx 处理 timeline.json / 渲染 / 烘焙机制以及同步到词汇的原则;使用 vidtsx-2d-generator 处理底层规则,这些规则确保 Remotion 文件不会崩溃(仅基于帧,单调的 interpolate,Easing.bezier,无 useState/useEffect)。你在此编写的镜头遵循这些规则。

何时应使用该工具(决策门)

  • 假屏幕录制(本技能) —— 你拥有或可以捕获各状态的截图,并且想要一个受控的演示(光标路径、高亮、缩放、与旁白同步的时间)。这是 P4 级别的“用于配置的真实 UI”,只是模拟。最适合演示侧重于位置在哪里/执行步骤,而非原始速度的场景。
  • 真实屏幕录制 —— 仅在要点是提供真正的证据时使用:真实的延迟、实时出现的结果、你无法令人信服地伪造的东西。在录制到位之前,留一个明确标注的 pending_recording 占位符槽(参见 make-tsx)。
  • 单个静态页面克隆 —— 如果只有一个页面,没有导航/光标(例如,你只是高亮或滚动的定价页面),直接使用 lib/browser.tsx 中的 WebBrowserFrame。不要使用屏幕录制机制。

第一步 —— 获取截图(询问用户)

告诉用户你需要的精确镜头列表(光标所到的每个页面或状态一个截图),然后等待他们。要求:

  • 已登录/真实数据,实际的产品 UI,在一致的窗口大小下捕获(理想情况下约 1920 宽)。
  • 每个状态一个,包括中间状态:未过滤的列表及其过滤结果算两个截图(交叉淡入淡出营造出“搜索已应用”的效果)。
  • 对于长页面的真实滚动演示,你需要一个高的截图(整个页面,包括折叠部分以下)—— 单个视口截图无法真正滚动(你只能伪造几个像素的漂移)。如果节拍需要,明确说明并索要高的截图。
  • 通过名称索要任何缺失的视图(例如“过滤到 X 的模型列表”、“切换 Y 后的设置页面”)。

将它们保存到 media/library/images/<service>/,并使用清晰的名称(account-home.png, workers-ai.png, models-all.png, models-flux.png)。在页面中引用为 library/images/<service>/<name>.png(这是组件期望的 staticFile 相对路径)。

第二步 —— 库 API (remotion/src/lib/screencast.tsx)

<Screencast pages cursor clicks box glow favicon appearAt />。坐标是分数,以便适应任何尺寸调整:

  • 光标 x/y 和点击涟漪 → VIEWPORT 分数(0..1,相对于 URL 栏下方的页面区域)。
  • 缩放 fx/fy → IMAGE 分数(变换原点 focusing on the push)。
import { Screencast, ScreencastPage, CursorKey } from '../../lib/screencast';

const PAGES: ScreencastPage[] = [
  { img: 'library/images/svc/home.png',  url: 'app.svc.com/…/home',        tabTitle: 'Home | Svc',    enterAt: 0 },
  { img: 'library/images/svc/list.png',  url: 'app.svc.com/…/items',       tabTitle: 'Items | Svc',   enterAt: 130, transition: 'cut' },       // 导航 → 硬剪辑 + 新路径
  { img: 'library/images/svc/filtered.png', url: 'app.svc.com/…/items?q=x', tabTitle: 'Items | Svc',  enterAt: 262, transition: 'crossfade', transitionFrames: 5,   // 页面内过滤 → 交叉淡入淡出 + 相同路径 + 查询
    drift: 0.01, zoom: { from: 1.0, to: 1.4, fx: 0.32, fy: 0.52, range: [266, 289] } },  // Ken Burns 缩放到重点卡片
];

const CURSOR: CursorKey[] = [   // {frame, x, y} 使用视口分数;每段缓动
  { frame: 0, x: 0.60, y: 0.42 }, { frame: 128, x: 0.09, y: 0.68 }, /* … */ { frame: 294, x: 0.36, y: 0.52 },
];
const CLICKS = [130, 206, 255]; // 触发涟漪的帧(放在到达关键帧处)

export const compositionConfig = { id: 'SvcRecording', durationInSeconds: 10.0, fps: 30, width: 1920, height: 1080 };
const SvcRecording = () => <Screencast pages={PAGES} cursor={CURSOR} clicks={CLICKS} />;
export default SvcRecording;

页面字段:img, url, tabTitle, enterAt(必填);transition?: 'cut'|'crossfade'(默认 cut),transitionFrames?(默认 5),scroll?: {to, range:[a,b], from?}(图片像素 translateY),zoom?: {from,to,fx,fy,range:[a,b]},drift?(默认 0.02 —— 持续的缓慢“活跃”推动)。Screencast 属性:box?(默认 {x:60,y:63,w:1800,h:954}),glow?,appearAt?,favicon?(默认 Cloudflare 云——为其他服务传递你自己的图标)。

第三步 —— 时序 + 坐标

  • 帧 0 = 镜头的 master_in_s。 对于在 t 秒处的旁白提示:frame = round((t − master_in_s) × fps)。在 edited-transcript.json 中搜索单词精确的开始/结束(毫秒)。将点击/页面的 enterAt 放在单词之前几帧,以便结果落在单词上;结束 Ken Burns zoom.range 在重点单词上。
  • 从截图找到点击目标分数:元素的像素位置 ÷ 图片宽度/高度 ≈ 视口分数(图片填充页面区域,顶部对齐,适配宽度)。将光标的到达关键帧设置在那里,并在到达后约 2f 添加点击帧。然后渲染并查看(步骤 4)—— 调整分数直到指针位于元素上。
  • 将每个页面/光标移动序列化到其提示:仪表盘在介绍行上保持 → 光标平滑移动到侧边栏项目并在项目被命名时点击 → 下一页出现 → 当重点单词被说出时缩放到重点。

注意点(每个问题都花费了一次渲染才找到)

  • 零高度的包含块。 WebBrowserFrame 将子元素包裹在一个 transform 的 div 中,该 div 成为绝对定位后代元素的包含块并坍缩为 0 高度。因此页面层级需要明确的区域尺寸(来自 box 的 width/height),而不是 inset:0 —— 库已经这样做了;如果你扩展它,保持这样。
  • 导航与过滤是真实性的关键点。 页面变化 = 硬剪辑 + 不同的 URL 路径。页面内搜索/过滤 = 短交叉淡入淡出 + 相同路径(追加查询)。混淆这两点看起来是假的。
  • 单视口截图无法滚动—— 用 drift + ken-burns zoom 伪造“活跃感”。仅在你拥有高截图时才使用真实的 scroll。
  • 预览渲染使用 --scale=1(1080p,适用于 bake.py);最终 4K60 渲染使用 --scale=2。
  • 光标热点(尖端)靠近指针 SVG 的左上角;库会对其进行微调。如果指针偏移了几个像素,调整目标分数,而不是 SVG。

第四步 —— 验证,然后交回给 make-tsx

  • 在每个提示处渲染 + 截图(绝不只用一个静止帧):node remotion/scripts/render-all.mjs --scale=1 <Id>,然后使用 ffmpeg 在光标在目标上的帧、每个点击帧、页面变化帧和缩放重点帧处提取帧。确认指针落在元素上、URL 正确更改、缩放框住了正确的内容。迭代分数/帧并重新渲染。
  • 然后遵循 make-tsx 完成其余工作:更新 timeline.json(交换/重新调整 span 的时间,删除任何 pending_recording 注释),运行 python tools/bake.py,并在节拍及两个边界处抽检镜头在真实 master 上的合成帧。
  • 如果你改进了组件(页面级 favicon、字段中真实输入的文本、字幕层),将其推广回 lib/screencast.tsx,以便未来的视频继承它。

规范形式 —— 复制此编排

通过约 4 个捕获的页面和约 10 秒实现看起来像真实屏幕录制的动作:

  1. 保持在着陆页面上,同时旁白设定场景(一个 drift 节拍,绝不是静止帧)。
  2. 光标平滑运动到侧边栏项目,并点击命名它的词—— 点击落在名词上,而不是之前。
  3. 硬剪辑到该页面,URL 路径改变。这是一个导航。
  4. 输入过滤条件 → 短交叉淡入淡出,相同路径,追加查询。这不是导航,将其渲染为导航是最大的破绽。
  5. Ken Burns 缩放到重点,精确地在重点词被说出的时刻。

在构建之前阅读 remotion/src/lib/screencast.tsx —— 它是引擎,其属性是上述每个动作的文档。页面数组、光标关键帧、每个页面的 URL 和缩放都在那里有类型定义。

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

raisaksham377-bot/youtube-shorts-ai-editor

Makes this repo's videos look like YOUR channel instead of the house default — interviews you for palette, fonts, wordmark, motion energy, delivery specs and SFX taste, then rewrites brand.md + remotion/src/brand.ts + remotion/src/fonts.ts together and renders a proof card so you SEE it. Use whenever the user wants to set up or change their brand, rebrand the repo, "make it my colors/fonts", change the accent color, set their wordmark, adjust the motion feel, or asks why their videos look like someone else's. Run it once before the first video. Not for per-video art direction (that is /make-tsx) and not for thumbnails, which are deliberately louder than the brand (that is /packaging).

raisaksham377-bot/youtube-shorts-ai-editor

Build a split-frame vertical Short/Reel (1080x1920) from talking-head footage — real face cropped into the bottom half throughout, bespoke motion-graphic beats + word-by-word captions in the top half. Use when the user wants a "vertical short", "reel", "9:16 video", "split-frame" format, asks to keep their face on screen the whole time while graphics play above it, wants an in-context app/UI mockup moment (like clicking a button in a browser) without cutting away from their face, or hits caption-pill-covers-my-face / no-GPU-rendering / audio-duration-mismatch problems while building one. Covers the crop-offset technique for framing the face, the caption-pill safe zone, the top-half-only UI-mockup scene pattern, the full pipeline from raw footage to final SFX mix, and the environment gotchas (no NVIDIA GPU, AAC priming gap, comp-native transcode). Topic-agnostic — this is a layout/technique skill, not tied to any one video's content. Builds on /clean-cut, /make-tsx conventions, and /suggest-sfx; doesn't rep...

raisaksham377-bot/youtube-shorts-ai-editor

Voice/audio cleanup step of the AI Video Editor pipeline — diagnose a video's background noise, pick the right denoise method, and produce a cleaned master (voice isolated, levels preserved, video stream copied). Use when the user wants to "clean the audio / voice", "remove background noise", "denoise", "isolate voice", fix outdoor/room/water/hum/hiss noise, run ElevenLabs Voice Isolator or local RNNoise, A/B denoise methods, or produce a cleaned master for a video-N in this repo. Covers diagnosing the noise (spectrogram + levels), choosing eleven vs rnnoise by noise type, the sample A/B, tools/clean_voice.py, preserving levels (RMS-match, not LUFS), and rewiring the pipeline to the clean master. Not the SFX/music mix (that is /suggest-sfx + the final-mix step) and not the cut (that is /clean-cut).

raisaksham377-bot/youtube-shorts-ai-editor

Step 1 of the AI Video Editor pipeline — turn raw talking-head footage into a clean master cut. Use when the user wants to "clean cut", "cut the raw footage", "remove filler / dead air / bad takes", "tighten the pacing", produce cuts.json, run the cut editor, or render a cleaned preview/master for a video-N project in this repo. Covers audio extraction, AssemblyAI transcription, authoring cuts.json (keeps/cuts/fluff categorized), the cut policy (content-aggressive, pause-natural ~0.5s), QA + review docs, the local cut-editor UI, tight/natural previews, the final 4K60 render, and producing edited-transcript.json as the handoff to /make-tsx. Not for building TSX overlays (that is /make-tsx) or the raw TSX authoring rules (that is vidtsx-2d-generator).

raisaksham377-bot/youtube-shorts-ai-editor

Step 2 of the AI Video Editor pipeline — build the visual beats (Remotion TSX shots) over a project's master cut and bake a composited preview. Use when the user wants to add/edit overlays or full-screen animation segments, "make a shot / beat", implement an edit plan or a v2 update, retime a beat to the narration, re-render shots, or re-bake the video-N preview in this repo. Covers reading the plan + edited-transcript + brand + reusable kit, authoring shots library-first, syncing reveals to word times, updating timeline.json (cutaway vs overlay), rendering, verifying by screenshot, and baking with tools/bake.py. Defers raw TSX authoring rules to vidtsx-2d-generator and the cut itself to clean-cut.

raisaksham377-bot/youtube-shorts-ai-editor

Generates click-optimized YouTube packaging — 3 thumbnail bets under one fixed title, engineered for YouTube's built-in A/B/C thumbnail test, plus a value-forward description, then renders the thumbnails as real images. Use this whenever you want to package a long-form video or turn a video idea into titles and thumbnails. Triggers include how would you package this, title ideas for, thumbnail concept, package this video, A/B variations, and make this clickable. Calibrates to your channel's own CTR data if you have it. Long-form only, never Shorts. Not for non-YouTube copywriting.

raisaksham377-bot/youtube-shorts-ai-editor

Step 4 of the AI Video Editor pipeline — the SFX pass. Analyze a video's beats + narration and propose tasteful sound effects synced to them, drawing from (and growing) a shared, reusable SFX library, then render an SFX-mixed audition preview. Use when the user wants to "add SFX / sound effects", "suggest sfx", "score the transitions", "sound-design this beat", generate/source sound effects, build or extend the sfx library/catalog, author or audit a sfx-plan, or mix SFX over a video-N preview in this repo. Covers reading timeline + edited-transcript + brand §10, the library-first flow, generating misses with the ElevenLabs Sound Effects API, the per-video sfx-plan.json, the hard user-audit gate, and mixing with tools/mix_sfx.py (light voice ducking). Not the music bed (that is the final-mix step) and not the visual beats (that is /make-tsx).

raisaksham377-bot/youtube-shorts-ai-editor

Generate production-ready 2D TSX video files for VidTSX (Remotion-based) from a shot, scene, or video description. Use whenever the user wants to create or generate a VidTSX video, a 2D TSX shot or scene, an animated clip, title card, or rendered motion graphic — including when they describe a visual animation they want built, or say "make a shot", "build this scene", "generate the TSX", or "turn this into a video". Covers the mandatory file structure and composition config, dimension presets (horizontal/vertical/square), six style presets (minimalist, memphis, neo-brutalism, glassmorphism, neon, corporate), and the hard rules that keep renders from crashing, covering frame-based animation only (no useState/useEffect/setTimeout), strictly monotonic interpolate ranges, Easing.bezier not wrapper syntax, and the chroma-js and @remotion/paths import gotchas. Not for 3D/three.js compositions, general React work, or editing video files.

相关技能