跳到正文
所有工具

video_export_gif

屏幕、窗口与界面 · macOS · Windows

效果: 写入. 状态: 受限可用.

“受限可用”表示工具可能取决于版本、平台、权限、账户或配置,并不表示它在所有安装中都已启用。

macOS

用途

将视频(或其 [start_ms,end_ms] 片段)导出为经过优化的循环 GIF——用于 README/社交媒体。fps(默认 12)和 width(默认 640,高度自动)控制大小。返回输出路径、帧数和大小。首次调用返回预览;confirm: true 才会写入文件。

必填输入

输入名称会严格保持工具要求的形式。下方可展开的架构中保留英文规范技术定义。

权限与确认

架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。

英文规范技术架构 — macOS
{
  "properties": {
    "confirm": {
      "description": "Must be true to write the output. Without it the call returns a preview and writes nothing.",
      "type": "boolean"
    },
    "end_ms": {
      "description": "Slice end (default: end of video).",
      "type": "integer"
    },
    "fps": {
      "description": "Frames per second in the GIF (default 12).",
      "type": "integer"
    },
    "input": {
      "description": "Path to the source video.",
      "type": "string"
    },
    "output": {
      "description": "Output path (default: <input>.gif). Missing parent folders are created.",
      "type": "string"
    },
    "overwrite": {
      "description": "Replace an existing file at output. Without it an existing output is refused. The input is never overwritten.",
      "type": "boolean"
    },
    "start_ms": {
      "description": "Slice start (default 0).",
      "type": "integer"
    },
    "width": {
      "description": "Output width in px, 64–1920 (a value outside is clamped to the nearest end); height scales to keep aspect (default 640).",
      "maximum": 1920,
      "minimum": 64,
      "type": "integer"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}

文档示例

video_export_gif 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。

{
  "confirm": false,
  "input": "/Users/demo/Documents/meeting.mov"
}

Windows

用途

将视频(或其 [start_ms,end_ms] 片段)导出为经过优化的循环 GIF——用于 README/社交媒体。fps(默认 12)和 width(默认 640,高度自动)控制大小。返回输出路径、帧数和大小。首次调用返回预览,不写入任何内容;confirm=true 才会导出。

必填输入

输入名称会严格保持工具要求的形式。下方可展开的架构中保留英文规范技术定义。

权限与确认

架构声明了明确的确认参数。请检查预览,并按此平台的契约授权实际操作。

英文规范技术架构 — Windows
{
  "properties": {
    "confirm": {
      "description": "Must be true to export. Without it, returns a preview.",
      "type": "boolean"
    },
    "end_ms": {
      "description": "Slice end in ms (default: end of video).",
      "type": "integer"
    },
    "fps": {
      "description": "GIF frame rate 1-30 (default 12).",
      "type": "integer"
    },
    "input": {
      "description": "Path to the source video.",
      "type": "string"
    },
    "output": {
      "description": "Output path (default: <input>_clip.gif).",
      "type": "string"
    },
    "start_ms": {
      "description": "Slice start in ms (default 0).",
      "type": "integer"
    },
    "width": {
      "description": "Output width in px, height scales to keep aspect (default 640).",
      "type": "integer"
    }
  },
  "required": [
    "input"
  ],
  "type": "object"
}

文档示例

video_export_gif 的文档示例。请勿执行此示例。所示参数属于虚构数据集;在实际调用前,请解析真实标识符并获得授权。

{
  "confirm": false,
  "input": "C:\\Users\\demo\\Documents\\meeting.mov"
}