Communitygithub.com

iamaanahmad/screen-recording-demos

录制干净的产品和Web应用演示——通过Playwright脚本化浏览器录制,附带光标和缩放优化、速度调整、裁剪空档时间并与旁白同步。适用于用户需要制作网页应用的导览、教程、UI演示或发布视频,以及需要可重复执行的录制场景。

screen-recording-demos 是什么?

Screen Recording and Demos 技能(iamaanahmad/screen-recording-demos)旨在帮助开发者和内容创作者高效录制高质量的产品演示与教程视频。其核心理念是脚本化录制——通过编写可重复执行的脚本,当UI变更时只需更新脚本而非手动重新录制,从而大幅提升工作效率。该技能支持多种录制方式:对于浏览器中的Web应用,推荐使用Playwright进行脚本化录制,可精确控制视口尺寸、光标显示和操作节奏;对于桌面应用或全屏工作流,则建议使用OBS Studio、Windows Game Bar或macOS Screenshot等操作系统级录屏工具;若追求极致的流畅效果且拥有应用源代码,还可利用Remotion重建屏幕为静态组件进行程序化视频生成;CLI录制则可选用asciinema或VHS等终端录制工具。除录制外,技能还覆盖后期处理全流程,包括使用ffmpeg裁剪空档时间、调整片段速度、放大关键区域,以及通过 Remotion 实现跟随光标的平滑动画缩放和平移。为了方便与旁白同步,技能建议先编写脚本脚本、录制旁白,再调整每段画面的速度使动作与语音精确对齐。最后,技能特别强调安全性——全程不得出现真实客户数据、API密钥或内部URL,并提供了隐藏书签栏、禁用通知、使用演示账号等最佳实践。

兼容平台~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/iamaanahmad/agents-video-editing-skills/tree/HEAD/skills/screen-recording-demos

在你喜欢的 AI 中提问

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

文档

屏幕录制与演示

脚本化录制是可重复执行的。当UI发生变化时,你只需更新脚本,而非重新手动录制。

选择方法

场景方法
可以在浏览器中打开的Web应用Playwright脚本化录制
桌面应用或全屏工作流OS录屏工具(OBS Studio、Windows Game Bar、macOS Screenshot)
应用源代码可用,且追求无卡顿的完美效果在Remotion中将屏幕重建为静态组件(参见remotion-programmatic-video)
CLI终端录制工具(asciinema、VHS)或动画终端组件

Playwright录制(Python)

pip install playwright && playwright install chromium
from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch()
    ctx = browser.new_context(
        viewport={"width": 1920, "height": 1080},
        record_video_dir="recordings/",
        record_video_size={"width": 1920, "height": 1080},
    )
    page = ctx.new_page()
    page.goto("https://example.com")
    page.wait_for_load_state("networkidle")
    page.wait_for_timeout(800)                       # 让观众有时间阅读
    page.get_by_role("button", name="Sign in").click()
    page.get_by_label("Email").type("[email protected]", delay=60)   # 可见的输入过程
    page.wait_for_timeout(1200)
    ctx.close()                                      # 视频在关闭上下文时完成
    browser.close()

输出为WebM格式。转换命令:

ffmpeg -i recordings/xyz.webm -c:v libx264 -crf 18 -pix_fmt yuv420p -r 30 out/demo.mp4

让视频看起来更专业

  • 演示数据: 使用预置的演示账户,填充真实且不敏感的数据。切勿录制真实的客户数据、令牌或邮箱。
  • 窗口: 固定使用1920x1080视口,隐藏书签栏和通知,轻微缩放(110%到125%)以确保在手机上文字清晰可读。
  • 节奏: 每次操作后暂停0.5到1秒。打字时加入延迟。避免瞬间跳转。
  • 光标: Playwright不会绘制光标。可以注入一个小的DOM光标,或在后期制作中添加(Remotion或叠加层)。
  • 确定性: 使用 expect(locator).to_be_visible() 等待,而不是固定的睡眠时间,然后再故意暂停以方便观众观看。
  • 敏感信息: 在录制前,通过页面脚本 (page.add_style_tag) 对字段进行模糊处理或遮罩。

后期制作

# 裁剪空档时间:保留12秒到41秒
ffmpeg -ss 12 -i demo.mp4 -t 29 -c:v libx264 -crf 18 out/trimmed.mp4

# 加速无聊的等待(例如,从20秒到30秒加速4倍)需要分割;最简单的方法是裁剪、加速、重新拼接
# 放大某个区域:先裁剪再缩放(源像素中的x:y:w:h)
ffmpeg -i demo.mp4 -vf "crop=960:540:480:270,scale=1920:1080" out/zoom.mp4

如需跟随光标的平滑动画缩放/平移,请使用Remotion(在scale和translate上使用interpolate)。

与旁白同步

  1. 先编写脚本(video-planning),录制旁白(voiceover-tts)。
  2. 录制屏幕,然后调整每个场景的速度,使每个动作准确地落在对应的语句上。计算公式:speed = recorded_seconds / narration_seconds。
  3. 使用 ffmpeg-essentials 中的速度调节方法,或在合成内部重新调整时间。

检查清单

  • 无个人数据、API密钥或内部URL可见。
  • 文本在缩放到手机屏幕的1080p分辨率下清晰可读。
  • 没有超过1秒的加载旋转图标残留。
  • 除非需要,否则机器音频已静音。

Individual skills in this repo

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

iamaanahmad/captions-subtitles

Create, edit, translate and burn in captions and subtitles - transcribe speech with Whisper, write SRT/VTT/ASS files, style them, and hard-burn word-highlight captions for Shorts, Reels and TikTok. Use for any captioning, subtitle, transcript or accessibility request.

iamaanahmad/ffmpeg-essentials

Core FFmpeg and ffprobe recipes for trimming, joining, converting, resizing, compressing, speed changes, fades, audio extraction and GIF conversion. Use for any direct media transformation task, or when a video will not play, has odd dimensions, or is out of sync.

iamaanahmad/motion-design-craft

Motion design rules for programmatic and edited video - durations, easing, springs, staggering, read time for on-screen text, beat grids, transitions and visual hierarchy, plus the defaults that make a video look AI-generated. Use when animating scenes, choosing timings, or reviewing a video that feels off.

iamaanahmad/moviepy-python-video

Compose and edit video in pure Python with moviepy 2.x - overlay text, lower thirds and captions on footage, cut and join clips, add audio, build short single-file build.py videos without Node. Use when the user wants Python-based video editing or deterministic text over AI-generated video.

iamaanahmad/remotion-programmatic-video

Build videos as React code with Remotion - compositions, sequences, springs, interpolation, audio sync, data-driven props, studio preview and rendering to MP4. Use for explainers, product demos, release notes, data charts, branded templates, or any video that should be reproducible from code.

iamaanahmad/voiceover-tts

Generate and time narration with text-to-speech (ElevenLabs, OpenAI TTS, Kokoro, Piper) or prepare a recorded voice - script prep, per-scene audio files, pacing, pronunciation, cleanup and loudness. Use when the user needs a voiceover, narration, dubbing, or voice cloning guidance.

相关技能