android record screen and extract key frames

# Skill: 录屏并提取关键帧

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "android record screen and extract key frames" with this command: npx skills add qomg/screen-record-frames

Skill: 录屏并提取关键帧

描述

这个skill用于通过scrcpy录制Android设备屏幕,然后使用ffmpeg提取关键帧。支持动态计算关键帧间隔,避免提取过多帧。

前置条件

  • Android设备已通过USB连接并启用调试模式
  • 已安装必要的工具:adb, scrcpy, ffmpeg

工具检查

运行前会自动检查以下工具是否安装:

  • adb (Android Debug Bridge)
  • scrcpy (屏幕录制工具)
  • ffmpeg (视频处理工具)

主要功能

1. 录屏

使用scrcpy录制Android设备屏幕:

scrcpy -t -r input.mp4
  • -t:显示触摸操作
  • -r:录制到文件
  • Ctrl+C停止录制并保存

2. 设置关键帧间隔

动态计算关键帧间隔,避免提取过多帧:

ffmpeg -i input.mp4 -c:v libx264 -x264opts keyint=10 output.mp4
  • keyint=10:每10帧一个关键帧(可调整)

3. 提取关键帧

提取所有关键帧为PNG图片:

ffmpeg -i output.mp4 -vf "select=eq(pict_type\,I)" -vsync vfr keyframes_%03d.png

4. 列出提取的帧

显示所有提取的关键帧图片:

ls -la keyframes_*.png

使用方式

快速开始

# 1. 检查工具
openclaw skill screen-record-frames check-tools

# 2. 开始录屏(按Ctrl+C停止)
openclaw skill screen-record-frames record

# 3. 处理视频并提取关键帧
openclaw skill screen-record-frames extract-frames

# 4. 列出提取的帧
openclaw skill screen-record-frames list-frames

完整流程

# 一次性执行完整流程
openclaw skill screen-record-frames full-process

配置选项

关键帧间隔

可以通过环境变量设置关键帧间隔:

export KEYFRAME_INTERVAL=20  # 每20帧一个关键帧
openclaw skill screen-record-frames extract-frames

输出目录

export OUTPUT_DIR=./recordings
openclaw skill screen-record-frames full-process

注意事项

  1. 确保Android设备已连接并启用USB调试
  2. 录屏过程中按Ctrl+C停止录制
  3. 关键帧数量取决于视频长度和间隔设置
  4. 提取的帧会保存为keyframes_001.png格式

故障排除

  • adb设备未找到:检查USB连接和调试模式
  • scrcpy无法启动:确保设备屏幕已解锁
  • ffmpeg处理失败:检查视频文件格式
  • 无关键帧提取:调整keyint值或检查视频编码

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Trunkate AI

Semantically optimizes context history and large text blocks via the Trunkate AI API. Includes proactive context pruning hooks for automated token management.

Registry SourceRecently Updated
General

Long-term Task Progress Manager

Manages multi-session, multi-stage projects by maintaining and syncing MISSION.md, PROGRESS.md, and NEXT_STEPS.md for seamless long-term progress tracking.

Registry SourceRecently Updated
General

Event Planner Pro

活动策划助手。活动方案(婚礼/生日/年会)、预算编制、准备清单、邀请函文案、时间轴、供应商清单。Event planner for weddings, birthdays, corporate events with budgets, checklists, invitations, timelines. 活动策...

Registry SourceRecently Updated
General

Trigger

Trigger - command-line tool for everyday use

Registry SourceRecently Updated