VideoDB Screen Recording Skill
Screen recording capabilities powered by VideoDB. Use this when the user asks for screen recordings, wants to search past activity, or needs transcripts.
Run commands from {baseDir} using npx tsx videodb.ts.
Prerequisites
1. Check API Key
Before using any commands, verify the API key is configured:
CODEBLOCK0
If not set or empty:
- - Ask the user for their VideoDB API key
- If they provide it, set it for them:
openclaw config set skills.entries.videodb-monitoring.env.VIDEODB_API_KEY 'sk-xxx'
- - If they don't have one, direct them to: https://console.videodb.io
2. Check Monitor is Running
CODEBLOCK2
If not true, start the monitor:
CODEBLOCK3
Verify it started:
CODEBLOCK4
If you get a session ID (e.g., cap-xxxxxxxx-...), the monitor is ready.
Commands
Get Current Timestamp
CODEBLOCK5
Returns current Unix timestamp (seconds since epoch).
Generate Stream URL
CODEBLOCK6
Creates a playable recording URL for the time range.
If --title or --description is provided, the generated player share page uses that metadata.
Start Indexing
Start indexing only when the user asks for search, summaries, or transcripts:
CODEBLOCK7
This starts:
- - transcript capture for system audio
- audio indexing
- visual indexing
You can also control them individually:
CODEBLOCK8
Stop Indexing
Stop indexing as soon as it is no longer needed to save cost:
CODEBLOCK9
Individual stop commands:
CODEBLOCK10
Search Recordings
CODEBLOCK11
Searches indexed screen activity for matching events. If no visual index exists yet, start indexing first.
Activity Summary
CODEBLOCK12
Audio Transcripts
CODEBLOCK13
Recording Workflow
When user requests screen recording of a task:
- 1. Capture start time:
cd {baseDir} && npx tsx videodb.ts now
Store this as
start_time.
- 2. Do the work (browser actions, file editing, etc.)
- 3. Capture end time:
CODEBLOCK15
- 4. Generate stream URL:
CODEBLOCK16
Optional player metadata:
CODEBLOCK17
- 5. Include URL in response:
CODEBLOCK18
If the command prints a player page URL, prefer sharing that URL with the user.
Indexing is not started automatically by the monitor. If the user also wants search, summaries, or transcripts, start indexing explicitly before those commands and stop it afterwards.
Example
User: "Open example.com and send me the recording"
CODEBLOCK19
Response:
Done! I opened example.com.
Screen recording: https://rt.stream.videodb.io/abc123
When to Use
| User Request | Command |
|---|
| "Record my screen while you do X" | Use workflow above |
| "What did I do in the last hour?" |
start-indexing, then
summary --hours 1, then
stop-indexing |
| "Find when I opened the spreadsheet" |
start-indexing, then
search "opened spreadsheet" |
| "What was said in that meeting?" |
start-indexing, then
transcript |
| "Get the recording from 5 mins ago" |
stream with timestamps |
| "Record this and set the title/description" |
stream with
--title and
--description |
Troubleshooting
If commands fail with "No capture session":
- 1. Check if monitor is running: INLINECODE18
- If not, start it (see Prerequisites above)
- If it shows running but still fails, restart the monitor
If summary/search/transcript say no index or no transcript:
- 1. Start indexing with INLINECODE19
- Wait briefly for data to accumulate
- Retry the command
- Stop indexing with
cd {baseDir} && npx tsx videodb.ts stop-indexing when done
VideoDB 屏幕录制技能
由 VideoDB 驱动的屏幕录制功能。当用户请求屏幕录制、搜索过往活动或需要转录文本时使用此技能。
从 {baseDir} 目录使用 npx tsx videodb.ts 运行命令。
前置条件
1. 检查 API 密钥
使用任何命令前,请确认 API 密钥已配置:
bash
openclaw config get skills.entries.videodb-monitoring.env.VIDEODBAPIKEY
如果未设置或为空:
- - 询问用户的 VideoDB API 密钥
- 如果用户提供,则为其设置:
bash
openclaw config set skills.entries.videodb-monitoring.env.VIDEODB
APIKEY sk-xxx
- - 如果用户没有密钥,引导其访问:https://console.videodb.io
2. 检查监控器是否运行
bash
openclaw config get skills.entries.videodb-monitoring.env.VIDEODBISRUNNING
如果不是 true,启动监控器:
bash
cd {baseDir} && nohup npx tsx monitor.ts > ~/.videodb/logs/monitor.log 2>&1 & disown && sleep 3
验证是否启动成功:
bash
openclaw config get skills.entries.videodb-monitoring.env.VIDEODBCAPTURESESSION_ID
如果获取到会话 ID(例如 cap-xxxxxxxx-...),则监控器已就绪。
命令
获取当前时间戳
bash
cd {baseDir} && npx tsx videodb.ts now
返回当前 Unix 时间戳(自纪元起的秒数)。
生成流媒体 URL
bash
cd {baseDir} && npx tsx videodb.ts stream timestamp> timestamp>
cd {baseDir} && npx tsx videodb.ts stream timestamp> timestamp> --title 结账流程 --description OpenClaw 浏览器运行
为指定时间范围创建可播放的录制 URL。
如果提供了 --title 或 --description,生成的播放器分享页面将使用这些元数据。
开始索引
仅在用户请求搜索、摘要或转录时开始索引:
bash
cd {baseDir} && npx tsx videodb.ts start-indexing
这将启动:
也可以单独控制:
bash
cd {baseDir} && npx tsx videodb.ts start-visual-index
cd {baseDir} && npx tsx videodb.ts start-transcript
cd {baseDir} && npx tsx videodb.ts start-audio-index
停止索引
在不再需要索引时立即停止以节省成本:
bash
cd {baseDir} && npx tsx videodb.ts stop-indexing
单独停止命令:
bash
cd {baseDir} && npx tsx videodb.ts stop-visual-index
cd {baseDir} && npx tsx videodb.ts stop-transcript
cd {baseDir} && npx tsx videodb.ts stop-audio-index
搜索录制内容
bash
cd {baseDir} && npx tsx videodb.ts search 用户打开了亚马逊
搜索已索引的屏幕活动以查找匹配事件。如果尚无视觉索引,请先开始索引。
活动摘要
bash
cd {baseDir} && npx tsx videodb.ts summary # 最近30分钟
cd {baseDir} && npx tsx videodb.ts summary --hours 2 # 最近2小时
音频转录
bash
cd {baseDir} && npx tsx videodb.ts transcript # 最近30分钟
cd {baseDir} && npx tsx videodb.ts transcript --hours 1 # 最近1小时
录制工作流程
当用户请求录制某项任务的屏幕时:
- 1. 捕获开始时间:
bash
cd {baseDir} && npx tsx videodb.ts now
将其存储为 start_time。
- 2. 执行工作(浏览器操作、文件编辑等)
- 3. 捕获结束时间:
bash
cd {baseDir} && npx tsx videodb.ts now
- 4. 生成流媒体 URL:
bash
cd {baseDir} && npx tsx videodb.ts stream
time> time>
可选的播放器元数据:
bash
cd {baseDir} && npx tsx videodb.ts stream time> time> --title 任务录制 --description 在 OpenClaw 任务执行期间捕获
- 5. 在回复中包含 URL:
屏幕录制:https://rt.stream.videodb.io/...
如果命令输出了播放器页面 URL,优先与用户分享该 URL。
监控器不会自动启动索引。如果用户还需要搜索、摘要或转录,请在这些命令之前显式启动索引,并在完成后停止索引。
示例
用户:打开 example.com 并把录制发给我
bash
检查前置条件
openclaw config get skills.entries.videodb-monitoring.env.VIDEODBISRUNNING
true
开始时间
cd {baseDir} && npx tsx videodb.ts now
1709740800
执行工作(打开浏览器,导航)
...
结束时间
cd {baseDir} && npx tsx videodb.ts now
1709740830
生成 URL
cd {baseDir} && npx tsx videodb.ts stream 1709740800 1709740830 --title example.com 演示 --description OpenClaw 浏览器自动化
📹 屏幕录制(30秒):https://rt.stream.videodb.io/abc123
播放器页面:https://player.videodb.io/watch?v=example-slug
回复:
完成!我已打开 example.com。
屏幕录制:https://rt.stream.videodb.io/abc123
使用场景
| 用户请求 | 命令 |
|---|
| 在我做X的时候录制屏幕 | 使用上述工作流程 |
| 我过去一小时做了什么? |
start-indexing,然后 summary --hours 1,然后 stop-indexing |
| 找到我打开电子表格的时间 | start-indexing,然后 search 打开电子表格 |
| 那个会议上说了什么? | start-indexing,然后 transcript |
| 获取5分钟前的录制 | 使用时间戳的 stream |
| 录制这个并设置标题/描述 | 带 --title 和 --description 的 stream |
故障排除
如果命令失败并显示无捕获会话:
- 1. 检查监控器是否运行:openclaw config get skills.entries.videodb-monitoring.env.VIDEODBISRUNNING
- 如果没有,启动监控器(参见上方前置条件)
- 如果显示运行但仍失败,重启监控器
如果摘要/搜索/转录显示无索引或无转录:
- 1. 使用 cd {baseDir} && npx tsx videodb.ts start-indexing 开始索引
- 稍等片刻让数据积累
- 重试命令
- 完成后使用 cd {baseDir} && npx tsx videodb.ts stop-indexing 停止索引