{
  "clide": 1,
  "name": "Video to GIF",
  "description": "Convert a video clip to an animated GIF with ffmpeg.",
  "input": [
    { "id": "video", "type": "file", "label": "Video", "required": true, "extensions": ["mp4", "mov", "webm"] },
    { "id": "fps", "type": "number", "label": "Frames per second", "default": 12, "min": 1, "max": 60 },
    { "id": "width", "type": "number", "label": "Width (px)", "default": 480, "min": 16 }
  ],
  "run": {
    "command": "ffmpeg",
    "args": ["-y", "-i", "{{video}}", "-vf", "fps={{fps}},scale={{width}}:-1", "{{runDir}}/out.gif"]
  },
  "requires": [
    {
      "command": "ffmpeg",
      "why": "Reads the video and writes the GIF.",
      "install": {
        "macos": "brew install ffmpeg",
        "windows": "winget install --id Gyan.FFmpeg",
        "linux": "sudo apt install ffmpeg"
      },
      "url": "https://ffmpeg.org/download.html"
    }
  ],
  "output": [
    { "id": "gif", "type": "file", "label": "GIF", "from": "file", "path": "{{runDir}}/out.gif" }
  ]
}
