cli-anything-openscreen

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

cli-anything-openscreen

cli-anything-openscreen

A stateful command-line interface for editing screen recordings. Transform raw captures into polished demo videos with zoom effects, speed adjustments, trimming, annotations, and beautiful backgrounds.
一款用于编辑屏幕录制内容的有状态命令行界面。通过缩放效果、速度调整、裁剪、添加注释以及精美背景,将原始录制内容转换为精修的演示视频。

Installation

安装

bash
pip install cli-anything-openscreen
Prerequisites:
  • Python 3.10+
  • ffmpeg must be installed on your system
bash
pip install cli-anything-openscreen
前置要求:
  • Python 3.10+
  • 系统必须安装ffmpeg

Usage

使用方法

Basic Commands

基础命令

bash
cli-anything-openscreen --help
cli-anything-openscreen                     # REPL mode
cli-anything-openscreen project new -v recording.mp4 -o project.openscreen
cli-anything-openscreen --json project info
bash
cli-anything-openscreen --help
cli-anything-openscreen                     # 进入REPL交互模式
cli-anything-openscreen project new -v recording.mp4 -o project.openscreen
cli-anything-openscreen --json project info

REPL Mode

REPL模式

Run
cli-anything-openscreen
without arguments to enter interactive mode. Type
help
for available commands,
quit
to exit.
不带参数运行
cli-anything-openscreen
即可进入交互模式。输入
help
查看可用命令,输入
quit
退出。

Command Groups

命令组

project

project(项目)

Create, open, save, and configure projects.
CommandDescription
project new [-v VIDEO] [-o PATH]
Create new project with optional video
project open <path>
Open existing .openscreen project
project save [-o PATH]
Save project to file
project info
Show project metadata and region counts
project set-video <path>
Set source video file
project set <key> <value>
Set editor setting (padding, wallpaper, etc.)
创建、打开、保存和配置项目。
命令描述
project new [-v VIDEO] [-o PATH]
创建新项目(可指定视频文件)
project open <path>
打开已有的.openscreen项目
project save [-o PATH]
将项目保存到文件
project info
显示项目元数据和区域数量
project set-video <path>
设置源视频文件
project set <key> <value>
设置编辑器参数(内边距、壁纸等)

zoom

zoom(缩放)

Manage zoom regions — smooth zoom effects on specific timeline areas.
CommandDescription
zoom list
List all zoom regions
zoom add --start MS --end MS [--depth 1-6] [--focus-x 0-1] [--focus-y 0-1]
Add zoom
zoom remove <id>
Remove zoom region
Zoom depths: 1=1.25x, 2=1.5x, 3=1.8x, 4=2.2x, 5=3.5x, 6=5.0x
管理缩放区域——为时间轴特定区域添加平滑缩放效果。
命令描述
zoom list
列出所有缩放区域
zoom add --start MS --end MS [--depth 1-6] [--focus-x 0-1] [--focus-y 0-1]
添加缩放效果
zoom remove <id>
删除指定缩放区域
缩放倍率:1=1.25x,2=1.5x,3=1.8x,4=2.2x,5=3.5x,6=5.0x

speed

speed(调速)

Manage speed regions — speed up idle time, slow down important moments.
CommandDescription
speed list
List all speed regions
speed add --start MS --end MS [--speed 0.25-2.0]
Add speed change
speed remove <id>
Remove speed region
Valid speeds: 0.25, 0.5, 0.75, 1.25, 1.5, 1.75, 2.0
管理调速区域——加快空闲时段速度,放慢重要时刻速度。
命令描述
speed list
列出所有调速区域
speed add --start MS --end MS [--speed 0.25-2.0]
添加调速效果
speed remove <id>
删除指定调速区域
有效速度值:0.25、0.5、0.75、1.25、1.5、1.75、2.0

trim

trim(裁剪)

Manage trim regions — cut out sections of the recording.
CommandDescription
trim list
List all trim regions
trim add --start MS --end MS
Cut out a section
trim remove <id>
Remove trim region
管理裁剪区域——移除录制内容中的指定片段。
命令描述
trim list
列出所有裁剪区域
trim add --start MS --end MS
移除指定时间段的片段
trim remove <id>
删除指定裁剪区域

crop

crop(裁切)

Set the visible area of the recording.
CommandDescription
crop get
Show current crop region
crop set --x 0-1 --y 0-1 --width 0-1 --height 0-1
Set crop (normalized)
设置录制内容的可视区域。
命令描述
crop get
显示当前裁切区域
crop set --x 0-1 --y 0-1 --width 0-1 --height 0-1
设置裁切区域(归一化坐标)

annotation

annotation(注释)

Add text overlays to the recording.
CommandDescription
annotation list
List all annotations
annotation add-text --start MS --end MS --text "..." [--x 0-1] [--y 0-1]
Add text
annotation remove <id>
Remove annotation
为录制内容添加文本叠加层。
命令描述
annotation list
列出所有注释
annotation add-text --start MS --end MS --text "..." [--x 0-1] [--y 0-1]
添加文本注释
annotation remove <id>
删除指定注释

media

media(媒体)

Inspect and validate media files.
CommandDescription
media probe <path>
Show video metadata (resolution, duration, codec)
media check <path>
Validate a video file
media thumbnail <input> <output> [-t TIME]
Extract a frame
检查和验证媒体文件。
命令描述
media probe <path>
显示视频元数据(分辨率、时长、编码格式)
media check <path>
验证视频文件有效性
media thumbnail <input> <output> [-t TIME]
提取视频帧作为缩略图

export

export(导出)

Render the final polished video.
CommandDescription
export presets
List available export presets
export render <output_path>
Render project to video file
渲染最终精修视频。
命令描述
export presets
列出可用的导出预设
export render <output_path>
将项目渲染为视频文件

session

session(会话)

Manage session state with undo/redo.
CommandDescription
session status
Show session info
session undo
Undo last operation
session redo
Redo last undone operation
session save
Save session state to disk
session list
List all saved sessions
通过撤销/重做管理会话状态。
命令描述
session status
显示会话信息
session undo
撤销上一步操作
session redo
重做上一次撤销的操作
session save
将会话状态保存到磁盘
session list
列出所有已保存的会话

State Management

状态管理

  • Undo/Redo: Up to 50 levels of undo history
  • Project persistence: JSON
    .openscreen
    files
  • Session tracking: auto-tracks modifications
  • 撤销/重做: 最多支持50级撤销历史
  • 项目持久化: 以JSON格式的.openscreen文件存储
  • 会话跟踪: 自动跟踪修改操作

Output Formats

输出格式

  • Human-readable (default): Formatted key-value pairs
  • Machine-readable (
    --json
    ): Structured JSON output
  • 人类可读格式(默认): 格式化的键值对
  • 机器可读格式(
    --json
    参数): 结构化JSON输出

Editor Settings

编辑器设置

SettingTypeDefaultDescription
aspectRatio
string"16:9"16:9, 9:16, 1:1, 4:3, 4:5
wallpaper
string"gradient_dark"Background preset
padding
int500-100, padding around video
borderRadius
int12Corner radius in pixels
shadowIntensity
float00-1, drop shadow strength
motionBlurAmount
float00-1, motion blur during zoom
exportQuality
string"good"medium, good, source
exportFormat
string"mp4"mp4, gif
设置项类型默认值描述
aspectRatio
字符串"16:9"可选值:16:9、9:16、1:1、4:3、4:5
wallpaper
字符串"gradient_dark"背景预设
padding
整数500-100,视频周围的内边距
borderRadius
整数12圆角半径(像素)
shadowIntensity
浮点数00-1,投影强度
motionBlurAmount
浮点数00-1,缩放时的运动模糊程度
exportQuality
字符串"good"可选值:medium、good、source
exportFormat
字符串"mp4"可选值:mp4、gif

For AI Agents

针对AI Agent的使用说明

  1. Always use
    --json
    for parseable output
  2. Check return codes — 0 = success, non-zero = error
  3. Parse stderr for error messages in non-JSON mode
  4. Use absolute file paths
  5. After
    export render
    , verify the output exists and probe it
  6. Times are in milliseconds for all region commands
  7. Coordinates (focus, crop, position) are normalized 0-1
  1. 始终使用
    --json
    参数获取可解析的输出
  2. 检查返回码——0表示成功,非0表示错误
  3. 在非JSON模式下,解析stderr获取错误信息
  4. 使用绝对文件路径
  5. 执行
    export render
    后,验证输出文件是否存在并检查其信息
  6. 所有区域命令中的时间单位为毫秒
  7. 坐标(焦点、裁切、位置)为归一化0-1值

Version

版本

1.0.0
1.0.0