{
  "schemaVersion": "1.0",
  "item": {
    "slug": "skill-video-caption-overlay",
    "name": "Skill Video Caption Overlay",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/Zero2Ai-hub/skill-video-caption-overlay",
    "canonicalUrl": "https://clawhub.ai/Zero2Ai-hub/skill-video-caption-overlay",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/skill-video-caption-overlay",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=skill-video-caption-overlay",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "scripts/example_captions.json",
      "scripts/overlay.py"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/skill-video-caption-overlay"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/skill-video-caption-overlay",
    "agentPageUrl": "https://openagent3.xyz/skills/skill-video-caption-overlay/agent",
    "manifestUrl": "https://openagent3.xyz/skills/skill-video-caption-overlay/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/skill-video-caption-overlay/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Video Caption Overlay",
        "body": "Animated pill-style caption overlays for short-form video. No Premiere, no CapCut — pure Python."
      },
      {
        "title": "Usage",
        "body": "uv run --with moviepy --with pillow scripts/overlay.py \\\n  --video base.mp4 \\\n  --output final.mp4 \\\n  --captions scripts/example_captions.json \\\n  --audio music.mp3 \\\n  --audio-start 8 \\\n  --audio-vol 0.5\n\nNo --audio if you want to keep the original video audio."
      },
      {
        "title": "Custom fonts",
        "body": "--font-black /path/to/Montserrat-Black.ttf \\\n--font-bold  /path/to/Montserrat-Bold.ttf\n\nFalls back to Montserrat from ~/.local/share/fonts/ if not specified."
      },
      {
        "title": "captions.json format",
        "body": "Array of phases — each phase is a time window with one or more pill lines stacked vertically.\n\n[\n  {\n    \"start\": 0,\n    \"end\": 3.2,\n    \"y_frac\": 0.06,\n    \"lines\": [\n      {\n        \"text\": \"POV:\",\n        \"size\": 28,\n        \"bold\": true,\n        \"bg\": [0, 195, 255],\n        \"fg\": [0, 0, 0],\n        \"bg_opacity\": 0.9,\n        \"px\": 20, \"py\": 9, \"r\": 12\n      },\n      {\n        \"text\": \"drink more water\",\n        \"size\": 50,\n        \"bg\": [255, 255, 255],\n        \"fg\": [0, 0, 0]\n      }\n    ]\n  }\n]\n\nFieldTypeDefaultDescriptionstartfloatrequiredPhase start time (seconds)endfloatrequiredPhase end time (seconds)y_fracfloat0.06Vertical position as fraction of video heightlines[].textstringrequiredCaption textlines[].sizeint50Font size (px)lines[].boldboolfalseUse bold font (vs black/heavy)lines[].bg[R,G,B][255,255,255]Pill background colorlines[].fg[R,G,B][0,0,0]Text colorlines[].bg_opacityfloat0.93Pill background opacity (0–1)lines[].pxint26Horizontal paddinglines[].pyint13Vertical paddinglines[].rint18Border radius"
      },
      {
        "title": "PIL textbbox fix",
        "body": "PIL's textbbox((0,0), text, font) returns (x0, y0, x1, y1) where y0 is a non-zero offset (typically 7–15px depending on font size). Drawing text at (x, y) without compensating for this offset causes text to appear below the pill's visual center.\n\nFix implemented in pill():\n\nbb    = draw.textbbox((0, 0), text, font=font)\nx_off, y_off = bb[0], bb[1]\nvis_w = bb[2] - bb[0]   # actual visual width\nvis_h = bb[3] - bb[1]   # actual visual height\n\n# Compensate offsets when drawing text\ntx = cx - vis_w // 2 - x_off\nty = y - y_off\ndraw.text((tx, ty), text, font=font, fill=fg)"
      },
      {
        "title": "Emoji note",
        "body": "NotoColorEmoji.ttf fails with PIL at arbitrary sizes (bitmap font with limited supported sizes). Use text alternatives (\"Free delivery\" instead of \"Free delivery 🚚\") for reliable rendering."
      },
      {
        "title": "Example output",
        "body": "See scripts/example_captions.json for the full 3-phase TikTok ad structure:\n\nPhase 1 (0–3.2s): Hook — top-screen pill stack\nPhase 2 (2.8–5.8s): Product claim — overlapping fade\nPhase 3 (5.3–8.0s): CTA — bottom-screen price + delivery + bio link"
      }
    ],
    "body": "Video Caption Overlay\n\nAnimated pill-style caption overlays for short-form video. No Premiere, no CapCut — pure Python.\n\nUsage\nuv run --with moviepy --with pillow scripts/overlay.py \\\n  --video base.mp4 \\\n  --output final.mp4 \\\n  --captions scripts/example_captions.json \\\n  --audio music.mp3 \\\n  --audio-start 8 \\\n  --audio-vol 0.5\n\n\nNo --audio if you want to keep the original video audio.\n\nCustom fonts\n--font-black /path/to/Montserrat-Black.ttf \\\n--font-bold  /path/to/Montserrat-Bold.ttf\n\n\nFalls back to Montserrat from ~/.local/share/fonts/ if not specified.\n\ncaptions.json format\n\nArray of phases — each phase is a time window with one or more pill lines stacked vertically.\n\n[\n  {\n    \"start\": 0,\n    \"end\": 3.2,\n    \"y_frac\": 0.06,\n    \"lines\": [\n      {\n        \"text\": \"POV:\",\n        \"size\": 28,\n        \"bold\": true,\n        \"bg\": [0, 195, 255],\n        \"fg\": [0, 0, 0],\n        \"bg_opacity\": 0.9,\n        \"px\": 20, \"py\": 9, \"r\": 12\n      },\n      {\n        \"text\": \"drink more water\",\n        \"size\": 50,\n        \"bg\": [255, 255, 255],\n        \"fg\": [0, 0, 0]\n      }\n    ]\n  }\n]\n\nField\tType\tDefault\tDescription\nstart\tfloat\trequired\tPhase start time (seconds)\nend\tfloat\trequired\tPhase end time (seconds)\ny_frac\tfloat\t0.06\tVertical position as fraction of video height\nlines[].text\tstring\trequired\tCaption text\nlines[].size\tint\t50\tFont size (px)\nlines[].bold\tbool\tfalse\tUse bold font (vs black/heavy)\nlines[].bg\t[R,G,B]\t[255,255,255]\tPill background color\nlines[].fg\t[R,G,B]\t[0,0,0]\tText color\nlines[].bg_opacity\tfloat\t0.93\tPill background opacity (0–1)\nlines[].px\tint\t26\tHorizontal padding\nlines[].py\tint\t13\tVertical padding\nlines[].r\tint\t18\tBorder radius\nPIL textbbox fix\n\nPIL's textbbox((0,0), text, font) returns (x0, y0, x1, y1) where y0 is a non-zero offset (typically 7–15px depending on font size). Drawing text at (x, y) without compensating for this offset causes text to appear below the pill's visual center.\n\nFix implemented in pill():\n\nbb    = draw.textbbox((0, 0), text, font=font)\nx_off, y_off = bb[0], bb[1]\nvis_w = bb[2] - bb[0]   # actual visual width\nvis_h = bb[3] - bb[1]   # actual visual height\n\n# Compensate offsets when drawing text\ntx = cx - vis_w // 2 - x_off\nty = y - y_off\ndraw.text((tx, ty), text, font=font, fill=fg)\n\nEmoji note\n\nNotoColorEmoji.ttf fails with PIL at arbitrary sizes (bitmap font with limited supported sizes). Use text alternatives (\"Free delivery\" instead of \"Free delivery 🚚\") for reliable rendering.\n\nExample output\n\nSee scripts/example_captions.json for the full 3-phase TikTok ad structure:\n\nPhase 1 (0–3.2s): Hook — top-screen pill stack\nPhase 2 (2.8–5.8s): Product claim — overlapping fade\nPhase 3 (5.3–8.0s): CTA — bottom-screen price + delivery + bio link"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/Zero2Ai-hub/skill-video-caption-overlay",
    "publisherUrl": "https://clawhub.ai/Zero2Ai-hub/skill-video-caption-overlay",
    "owner": "Zero2Ai-hub",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/skill-video-caption-overlay",
    "downloadUrl": "https://openagent3.xyz/downloads/skill-video-caption-overlay",
    "agentUrl": "https://openagent3.xyz/skills/skill-video-caption-overlay/agent",
    "manifestUrl": "https://openagent3.xyz/skills/skill-video-caption-overlay/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/skill-video-caption-overlay/agent.md"
  }
}