[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JQW80GNBEXAFRFFB6FT0DJ":3,"skill-same:01M6JQW80GNBEXAFRFFB6FT0DJ":92},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":49,"commitSha":50,"skillDirectory":51,"forksCount":52,"repositoryHtmlUrl":53,"repositoryHomepageUrl":54,"ownerHtmlUrl":55,"ownerBlogUrl":56,"ownerDescription":6,"updatedAt":57,"install":58,"resources":71},"01M6JQW80GNBEXAFRFFB6FT0DJ","videodb",null,"Video and audio perception, indexing, and editing. Ingest files\u002FURLs\u002Flive streams, build visual\u002Fspoken indexes, search with timestamps, edit timelines, add overlays\u002Fsubtitles, generate media, and create real-time alerts.","LongLeo287\u002FOmniClaw","LongLeo287","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F141803367?v=4","01M6JK75C62VCNZKR5BRZ386YV","LongLeo","01M6JK75GQ78TSP1ZPXNKK3MCH",9,"MIT","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fvideodb\u002FSKILL.md",[],[5,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"read","overlays","perception","live","indexing","visual","time","files","edit","safe","Audio","Media","Video","streaming","search","desktop","generate","create","python","2026-11-10 10:12:30",false,"---\nname: videodb\ndescription: Video and audio perception, indexing, and editing. Ingest files\u002FURLs\u002Flive streams, build visual\u002Fspoken indexes, search with timestamps, edit timelines, add overlays\u002Fsubtitles, generate media, and create real-time alerts.\ncategory: media\nrisk: safe\nsource: community\ntags: \"[video, editing, transcription, subtitles, search, streaming, ai-generation, media, live-streams, desktop-capture]\"\ndate_added: \"2026-02-27\"\nallowed-tools: Read Grep Glob Bash(python:*)\nargument-hint: \"[task description]\"\n---\n\n# VideoDB Skill\n\n**Perception + memory + actions for video, live streams, and desktop sessions.**\n\nUse this skill when you need to:\n\n## When to Use\n\n- You need video or audio perception, indexing, search, or timeline editing from files, URLs, desktop sessions, or live streams.\n- The task involves timestamps, searchable evidence, subtitles, clips, overlays, or real-time monitoring alerts.\n- You want one workflow that combines ingestion, understanding, retrieval, and media actions.\n\n## 1) Desktop Perception\n- Start\u002Fstop a **desktop session** capturing **screen, mic, and system audio**\n- Stream **live context** and store **episodic session memory**\n- Run **real-time alerts\u002Ftriggers** on what's spoken and what's happening on screen\n- Produce **session summaries**, a searchable timeline, and **playable evidence links**\n\n## 2) Video ingest + stream\n- Ingest a **file or URL** and return a **playable web stream link**\n- Transcode\u002Fnormalize: **codec, bitrate, fps, resolution, aspect ratio**\n\n## 3) Index + search (timestamps + evidence)\n- Build **visual**, **spoken**, and **keyword** indexes\n- Search and return exact moments with **timestamps** and **playable evidence**\n- Auto-create **clips** from search results\n\n## 4) Timeline editing + generation\n- Subtitles: **generate**, **translate**, **burn-in**\n- Overlays: **text\u002Fimage\u002Fbranding**, motion captions\n- Audio: **background music**, **voiceover**, **dubbing**\n- Programmatic composition and exports via **timeline operations**\n\n## 5) Live streams (RTSP) + monitoring\n- Connect **RTSP\u002Flive feeds**\n- Run **real-time visual and spoken understanding** and emit **events\u002Falerts** for monitoring workflows\n\n---\n\n## Common inputs\n- Local **file path**, public **URL**, or **RTSP URL**\n- Desktop capture request: **start \u002F stop \u002F summarize session**\n- Desired operations: get context for understanding, transcode spec, index spec, search query, clip ranges, timeline edits, alert rules\n\n## Common outputs\n- **Stream URL**\n- Search results with **timestamps** and **evidence links**\n- Generated assets: subtitles, audio, images, clips\n- **Event\u002Falert payloads** for live streams\n- Desktop **session summaries** and memory entries\n\n---\n\n## Canonical prompts (examples)\n- \"Start desktop capture and alert when a password field appears.\"\n- \"Record my session and produce an actionable summary when it ends.\"\n- \"Ingest this file and return a playable stream link.\"\n- \"Index this folder and find every scene with people, return timestamps.\"\n- \"Generate subtitles, burn them in, and add light background music.\"\n- \"Connect this RTSP URL and alert when a person enters the zone.\"\n\n## Running Python code\n\nBefore running any VideoDB code, change to the project directory and load environment variables:\n\n```python\nfrom dotenv import load_dotenv\nload_dotenv(\".env\")\n\nimport videodb\nconn = videodb.connect()\n```\n\nThis reads `VIDEO_DB_API_KEY` from:\n1. Environment (if already exported)\n2. Project's `.env` file in current directory\n\nIf the key is missing, `videodb.connect()` raises `AuthenticationError` automatically.\n\nDo NOT write a script file when a short inline command works.\n\nWhen writing inline Python (`python -c \"...\"`), always use properly formatted code — use semicolons to separate statements and keep it readable. For anything longer than ~3 statements, use a heredoc instead:\n\n```bash\npython \u003C\u003C 'EOF'\nfrom dotenv import load_dotenv\nload_dotenv(\".env\")\n\nimport videodb\nconn = videodb.connect()\ncoll = conn.get_collection()\nprint(f\"Videos: {len(coll.get_videos())}\")\nEOF\n```\n\n## Setup\n\nWhen the user asks to \"setup videodb\" or similar:\n\n### 1. Install SDK\n\n```bash\npip install \"videodb[capture]\" python-dotenv\n```\n\nIf `videodb[capture]` fails on Linux, install without the capture extra:\n\n```bash\npip install videodb python-dotenv\n```\n\n### 2. Configure API key\n\nThe user must set `VIDEO_DB_API_KEY` using **either** method:\n\n- **Export in terminal** (before starting Claude): `export VIDEO_DB_API_KEY=your-key`\n- **Project `.env` file**: Save `VIDEO_DB_API_KEY=your-key` in the project's `.env` file\n\nGet a free API key at https:\u002F\u002Fconsole.videodb.io (50 free uploads, no credit card).\n\n**Do NOT** read, write, or handle the API key yourself. Always let the user set it.\n\n## Quick Reference\n\n### Upload media\n\n```python\n# URL\nvideo = coll.upload(url=\"https:\u002F\u002Fexample.com\u002Fvideo.mp4\")\n\n# YouTube\nvideo = coll.upload(url=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=VIDEO_ID\")\n\n# Local file\nvideo = coll.upload(file_path=\"\u002Fpath\u002Fto\u002Fvideo.mp4\")\n```\n\n### Transcript + subtitle\n\n```python\n# force=True skips the error if the video is already indexed\nvideo.index_spoken_words(force=True)\ntext = video.get_transcript_text()\nstream_url = video.add_subtitle()\n```\n\n### Search inside videos\n\n```python\nfrom videodb.exceptions import InvalidRequestError\n\nvideo.index_spoken_words(force=True)\n\n# search() raises InvalidRequestError when no results are found.\n# Always wrap in try\u002Fexcept and treat \"No results found\" as empty.\ntry:\n    results = video.search(\"product demo\")\n    shots = results.get_shots()\n    stream_url = results.compile()\nexcept InvalidRequestError as e:\n    if \"No results found\" in str(e):\n        shots = []\n    else:\n        raise\n```\n\n### Scene search\n\n```python\nimport re\nfrom videodb import SearchType, IndexType, SceneExtractionType\nfrom videodb.exceptions import InvalidRequestError\n\n# index_scenes() has no force parameter — it raises an error if a scene\n# index already exists. Extract the existing index ID from the error.\ntry:\n    scene_index_id = video.index_scenes(\n        extraction_type=SceneExtractionType.shot_based,\n        prompt=\"Describe the visual content in this scene.\",\n    )\nexcept Exception as e:\n    match = re.search(r\"id\\s+([a-f0-9]+)\", str(e))\n    if match:\n        scene_index_id = match.group(1)\n    else:\n        raise\n\n# Use score_threshold to filter low-relevance noise (recommended: 0.3+)\ntry:\n    results = video.search(\n        query=\"person writing on a whiteboard\",\n        search_type=SearchType.semantic,\n        index_type=IndexType.scene,\n        scene_index_id=scene_index_id,\n        score_threshold=0.3,\n    )\n    shots = results.get_shots()\n    stream_url = results.compile()\nexcept InvalidRequestError as e:\n    if \"No results found\" in str(e):\n        shots = []\n    else:\n        raise\n```\n\n### Timeline editing\n\n**Important:** Always validate timestamps before building a timeline:\n- `start` must be >= 0 (negative values are silently accepted but produce broken output)\n- `start` must be \u003C `end`\n- `end` must be \u003C= `video.length`\n\n```python\nfrom videodb.timeline import Timeline\nfrom videodb.asset import VideoAsset, TextAsset, TextStyle\n\ntimeline = Timeline(conn)\ntimeline.add_inline(VideoAsset(asset_id=video.id, start=10, end=30))\ntimeline.add_overlay(0, TextAsset(text=\"The End\", duration=3, style=TextStyle(fontsize=36)))\nstream_url = timeline.generate_stream()\n```\n\n### Transcode video (resolution \u002F quality change)\n\n```python\nfrom videodb import TranscodeMode, VideoConfig, AudioConfig\n\n# Change resolution, quality, or aspect ratio server-side\njob_id = conn.transcode(\n    source=\"https:\u002F\u002Fexample.com\u002Fvideo.mp4\",\n    callback_url=\"https:\u002F\u002Fexample.com\u002Fwebhook\",\n    mode=TranscodeMode.economy,\n    video_config=VideoConfig(resolution=720, quality=23, aspect_ratio=\"16:9\"),\n    audio_config=AudioConfig(mute=False),\n)\n```\n\n### Reframe aspect ratio (for social platforms)\n\n**Warning:** `reframe()` is a slow server-side operation. For long videos it can take\nseveral minutes and may time out. Best practices:\n- Always limit to a short segment using `start`\u002F`end` when possible\n- For full-length videos, use `callback_url` for async processing\n- Trim the video on a `Timeline` first, then reframe the shorter result\n\n```python\nfrom videodb import ReframeMode\n\n# Always prefer reframing a short segment:\nreframed = video.reframe(start=0, end=60, target=\"vertical\", mode=ReframeMode.smart)\n\n# Async reframe for full-length videos (returns None, result via webhook):\nvideo.reframe(target=\"vertical\", callback_url=\"https:\u002F\u002Fexample.com\u002Fwebhook\")\n\n# Presets: \"vertical\" (9:16), \"square\" (1:1), \"landscape\" (16:9)\nreframed = video.reframe(start=0, end=60, target=\"square\")\n\n# Custom dimensions\nreframed = video.reframe(start=0, end=60, target={\"width\": 1280, \"height\": 720})\n```\n\n### Generative media\n\n```python\nimage = coll.generate_image(\n    prompt=\"a sunset over mountains\",\n    aspect_ratio=\"16:9\",\n)\n```\n\n## Error handling\n\n```python\nfrom videodb.exceptions import AuthenticationError, InvalidRequestError\n\ntry:\n    conn = videodb.connect()\nexcept AuthenticationError:\n    print(\"Check your VIDEO_DB_API_KEY\")\n\ntry:\n    video = coll.upload(url=\"https:\u002F\u002Fexample.com\u002Fvideo.mp4\")\nexcept InvalidRequestError as e:\n    print(f\"Upload failed: {e}\")\n```\n\n### Common pitfalls\n\n| Scenario | Error message | Solution |\n|----------|--------------|----------|\n| Indexing an already-indexed video | `Spoken word index for video already exists` | Use `video.index_spoken_words(force=True)` to skip if already indexed |\n| Scene index already exists | `Scene index with id XXXX already exists` | Extract the existing `scene_index_id` from the error with `re.search(r\"id\\s+([a-f0-9]+)\", str(e))` |\n| Search finds no matches | `InvalidRequestError: No results found` | Catch the exception and treat as empty results (`shots = []`) |\n| Reframe times out | Blocks indefinitely on long videos | Use `start`\u002F`end` to limit segment, or pass `callback_url` for async |\n| Negative timestamps on Timeline | Silently produces broken stream | Always validate `start >= 0` before creating `VideoAsset` |\n| `generate_video()` \u002F `create_collection()` fails | `Operation not allowed` or `maximum limit` | Plan-gated features — inform the user about plan limits |\n\n## Additional docs\n\nReference documentation is in the `reference\u002F` directory adjacent to this SKILL.md file. Use the Glob tool to locate it if needed.\n\n- [reference\u002Fapi-reference.md](reference\u002Fapi-reference.md) - Complete VideoDB Python SDK API reference\n- [reference\u002Fsearch.md](reference\u002Fsearch.md) - In-depth guide to video search (spoken word and scene-based)\n- [reference\u002Feditor.md](reference\u002Feditor.md) - Timeline editing, assets, and composition\n- [reference\u002Fstreaming.md](reference\u002Fstreaming.md) - HLS streaming and instant playback\n- [reference\u002Fgenerative.md](reference\u002Fgenerative.md) - AI-powered media generation (images, video, audio)\n- [reference\u002Frtstream.md](reference\u002Frtstream.md) - Live stream ingestion workflow (RTSP\u002FRTMP)\n- [reference\u002Frtstream-reference.md](reference\u002Frtstream-reference.md) - RTStream SDK methods and AI pipelines\n- [reference\u002Fcapture.md](reference\u002Fcapture.md) - Desktop capture workflow\n- [reference\u002Fcapture-reference.md](reference\u002Fcapture-reference.md) - Capture SDK and WebSocket events\n- [reference\u002Fuse-cases.md](reference\u002Fuse-cases.md) - Common video processing patterns and examples\n\n## Screen Recording (Desktop Capture)\n\nUse `ws_listener.py` to capture WebSocket events during recording sessions. Desktop capture supports **macOS** only.\n\n### Quick Start\n\n1. **Start listener**: `python scripts\u002Fws_listener.py &`\n2. **Get WebSocket ID**: `cat \u002Ftmp\u002Fvideodb_ws_id`\n3. **Run capture code** (see reference\u002Fcapture.md for full workflow)\n4. **Events written to**: `\u002Ftmp\u002Fvideodb_events.jsonl`\n\n### Query Events\n\n```python\nimport json\nevents = [json.loads(l) for l in open(\"\u002Ftmp\u002Fvideodb_events.jsonl\")]\n\n# Get all transcripts\ntranscripts = [e[\"data\"][\"text\"] for e in events if e.get(\"channel\") == \"transcript\"]\n\n# Get visual descriptions from last 5 minutes\nimport time\ncutoff = time.time() - 300\nrecent_visual = [e for e in events \n                 if e.get(\"channel\") == \"visual_index\" and e[\"unix_ts\"] > cutoff]\n```\n\n### Utility Scripts\n\n- [scripts\u002Fws_listener.py](scripts\u002Fws_listener.py) - WebSocket event listener (dumps to JSONL)\n\nFor complete capture workflow, see [reference\u002Fcapture.md](reference\u002Fcapture.md).\n\n**Do not use ffmpeg, moviepy, or local encoding tools** when VideoDB supports the operation. The following are all handled server-side by VideoDB — trimming, combining clips, overlaying audio or music, adding subtitles, text\u002Fimage overlays, transcoding, resolution changes, aspect-ratio conversion, resizing for platform requirements, transcription, and media generation. Only fall back to local tools for operations listed under Limitations in reference\u002Feditor.md (transitions, speed changes, crop\u002Fzoom, colour grading, volume mixing).\n\n### When to use what\n\n| Problem | VideoDB solution |\n|---------|-----------------|\n| Platform rejects video aspect ratio or resolution | `video.reframe()` or `conn.transcode()` with `VideoConfig` |\n| Need to resize video for Twitter\u002FInstagram\u002FTikTok | `video.reframe(target=\"vertical\")` or `target=\"square\"` |\n| Need to change resolution (e.g. 1080p → 720p) | `conn.transcode()` with `VideoConfig(resolution=720)` |\n| Need to overlay audio\u002Fmusic on video | `AudioAsset` on a `Timeline` |\n| Need to add subtitles | `video.add_subtitle()` or `CaptionAsset` |\n| Need to combine\u002Ftrim clips | `VideoAsset` on a `Timeline` |\n| Need to generate voiceover, music, or SFX | `coll.generate_voice()`, `generate_music()`, `generate_sound_effect()` |\n\n## Repository\n\nhttps:\u002F\u002Fgithub.com\u002Fvideo-db\u002Fskills\n\n**Maintained By:** [VideoDB](https:\u002F\u002Fgithub.com\u002Fvideo-db)\n","# VideoDB Skill\n\n**Perception + memory + actions for video, live streams, and desktop sessions.**\n\nUse this skill when you need to:\n\n## When to Use\n\n- You need video or audio perception, indexing, search, or timeline editing from files, URLs, desktop sessions, or live streams.\n- The task involves timestamps, searchable evidence, subtitles, clips, overlays, or real-time monitoring alerts.\n- You want one workflow that combines ingestion, understanding, retrieval, and media actions.\n\n## 1) Desktop Perception\n- Start\u002Fstop a **desktop session** capturing **screen, mic, and system audio**\n- Stream **live context** and store **episodic session memory**\n- Run **real-time alerts\u002Ftriggers** on what's spoken and what's happening on screen\n- Produce **session summaries**, a searchable timeline, and **playable evidence links**\n\n## 2) Video ingest + stream\n- Ingest a **file or URL** and return a **playable web stream link**\n- Transcode\u002Fnormalize: **codec, bitrate, fps, resolution, aspect ratio**\n\n## 3) Index + search (timestamps + evidence)\n- Build **visual**, **spoken**, and **keyword** indexes\n- Search and return exact moments with **timestamps** and **playable evidence**\n- Auto-create **clips** from search results\n\n## 4) Timeline editing + generation\n- Subtitles: **generate**, **translate**, **burn-in**\n- Overlays: **text\u002Fimage\u002Fbranding**, motion captions\n- Audio: **background music**, **voiceover**, **dubbing**\n- Programmatic composition and exports via **timeline operations**\n\n## 5) Live streams (RTSP) + monitoring\n- Connect **RTSP\u002Flive feeds**\n- Run **real-time visual and spoken understanding** and emit **events\u002Falerts** for monitoring workflows\n\n---\n\n## Common inputs\n- Local **file path**, public **URL**, or **RTSP URL**\n- Desktop capture request: **start \u002F stop \u002F summarize session**\n- Desired operations: get context for understanding, transcode spec, index spec, search query, clip ranges, timeline edits, alert rules\n\n## Common outputs\n- **Stream URL**\n- Search results with **timestamps** and **evidence links**\n- Generated assets: subtitles, audio, images, clips\n- **Event\u002Falert payloads** for live streams\n- Desktop **session summaries** and memory entries\n\n---\n\n## Canonical prompts (examples)\n- \"Start desktop capture and alert when a password field appears.\"\n- \"Record my session and produce an actionable summary when it ends.\"\n- \"Ingest this file and return a playable stream link.\"\n- \"Index this folder and find every scene with people, return timestamps.\"\n- \"Generate subtitles, burn them in, and add light background music.\"\n- \"Connect this RTSP URL and alert when a person enters the zone.\"\n\n## Running Python code\n\nBefore running any VideoDB code, change to the project directory and load environment variables:\n\n```python\nfrom dotenv import load_dotenv\nload_dotenv(\".env\")\n\nimport videodb\nconn = videodb.connect()\n```\n\nThis reads `VIDEO_DB_API_KEY` from:\n1. Environment (if already exported)\n2. Project's `.env` file in current directory\n\nIf the key is missing, `videodb.connect()` raises `AuthenticationError` automatically.\n\nDo NOT write a script file when a short inline command works.\n\nWhen writing inline Python (`python -c \"...\"`), always use properly formatted code — use semicolons to separate statements and keep it readable. For anything longer than ~3 statements, use a heredoc instead:\n\n```bash\npython \u003C\u003C 'EOF'\nfrom dotenv import load_dotenv\nload_dotenv(\".env\")\n\nimport videodb\nconn = videodb.connect()\ncoll = conn.get_collection()\nprint(f\"Videos: {len(coll.get_videos())}\")\nEOF\n```\n\n## Setup\n\nWhen the user asks to \"setup videodb\" or similar:\n\n### 1. Install SDK\n\n```bash\npip install \"videodb[capture]\" python-dotenv\n```\n\nIf `videodb[capture]` fails on Linux, install without the capture extra:\n\n```bash\npip install videodb python-dotenv\n```\n\n### 2. Configure API key\n\nThe user must set `VIDEO_DB_API_KEY` using **either** method:\n\n- **Export in terminal** (before starting Claude): `export VIDEO_DB_API_KEY=your-key`\n- **Project `.env` file**: Save `VIDEO_DB_API_KEY=your-key` in the project's `.env` file\n\nGet a free API key at https:\u002F\u002Fconsole.videodb.io (50 free uploads, no credit card).\n\n**Do NOT** read, write, or handle the API key yourself. Always let the user set it.\n\n## Quick Reference\n\n### Upload media\n\n```python\n# URL\nvideo = coll.upload(url=\"https:\u002F\u002Fexample.com\u002Fvideo.mp4\")\n\n# YouTube\nvideo = coll.upload(url=\"https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=VIDEO_ID\")\n\n# Local file\nvideo = coll.upload(file_path=\"\u002Fpath\u002Fto\u002Fvideo.mp4\")\n```\n\n### Transcript + subtitle\n\n```python\n# force=True skips the error if the video is already indexed\nvideo.index_spoken_words(force=True)\ntext = video.get_transcript_text()\nstream_url = video.add_subtitle()\n```\n\n### Search inside videos\n\n```python\nfrom videodb.exceptions import InvalidRequestError\n\nvideo.index_spoken_words(force=True)\n\n# search() raises InvalidRequestError when no results are found.\n# Always wrap in try\u002Fexcept and treat \"No results found\" as empty.\ntry:\n    results = video.search(\"product demo\")\n    shots = results.get_shots()\n    stream_url = results.compile()\nexcept InvalidRequestError as e:\n    if \"No results found\" in str(e):\n        shots = []\n    else:\n        raise\n```\n\n### Scene search\n\n```python\nimport re\nfrom videodb import SearchType, IndexType, SceneExtractionType\nfrom videodb.exceptions import InvalidRequestError\n\n# index_scenes() has no force parameter — it raises an error if a scene\n# index already exists. Extract the existing index ID from the error.\ntry:\n    scene_index_id = video.index_scenes(\n        extraction_type=SceneExtractionType.shot_based,\n        prompt=\"Describe the visual content in this scene.\",\n    )\nexcept Exception as e:\n    match = re.search(r\"id\\s+([a-f0-9]+)\", str(e))\n    if match:\n        scene_index_id = match.group(1)\n    else:\n        raise\n\n# Use score_threshold to filter low-relevance noise (recommended: 0.3+)\ntry:\n    results = video.search(\n        query=\"person writing on a whiteboard\",\n        search_type=SearchType.semantic,\n        index_type=IndexType.scene,\n        scene_index_id=scene_index_id,\n        score_threshold=0.3,\n    )\n    shots = results.get_shots()\n    stream_url = results.compile()\nexcept InvalidRequestError as e:\n    if \"No results found\" in str(e):\n        shots = []\n    else:\n        raise\n```\n\n### Timeline editing\n\n**Important:** Always validate timestamps before building a timeline:\n- `start` must be >= 0 (negative values are silently accepted but produce broken output)\n- `start` must be \u003C `end`\n- `end` must be \u003C= `video.length`\n\n```python\nfrom videodb.timeline import Timeline\nfrom videodb.asset import VideoAsset, TextAsset, TextStyle\n\ntimeline = Timeline(conn)\ntimeline.add_inline(VideoAsset(asset_id=video.id, start=10, end=30))\ntimeline.add_overlay(0, TextAsset(text=\"The End\", duration=3, style=TextStyle(fontsize=36)))\nstream_url = timeline.generate_stream()\n```\n\n### Transcode video (resolution \u002F quality change)\n\n```python\nfrom videodb import TranscodeMode, VideoConfig, AudioConfig\n\n# Change resolution, quality, or aspect ratio server-side\njob_id = conn.transcode(\n    source=\"https:\u002F\u002Fexample.com\u002Fvideo.mp4\",\n    callback_url=\"https:\u002F\u002Fexample.com\u002Fwebhook\",\n    mode=TranscodeMode.economy,\n    video_config=VideoConfig(resolution=720, quality=23, aspect_ratio=\"16:9\"),\n    audio_config=AudioConfig(mute=False),\n)\n```\n\n### Reframe aspect ratio (for social platforms)\n\n**Warning:** `reframe()` is a slow server-side operation. For long videos it can take\nseveral minutes and may time out. Best practices:\n- Always limit to a short segment using `start`\u002F`end` when possible\n- For full-length videos, use `callback_url` for async processing\n- Trim the video on a `Timeline` first, then reframe the shorter result\n\n```python\nfrom videodb import ReframeMode\n\n# Always prefer reframing a short segment:\nreframed = video.reframe(start=0, end=60, target=\"vertical\", mode=ReframeMode.smart)\n\n# Async reframe for full-length videos (returns None, result via webhook):\nvideo.reframe(target=\"vertical\", callback_url=\"https:\u002F\u002Fexample.com\u002Fwebhook\")\n\n# Presets: \"vertical\" (9:16), \"square\" (1:1), \"landscape\" (16:9)\nreframed = video.reframe(start=0, end=60, target=\"square\")\n\n# Custom dimensions\nreframed = video.reframe(start=0, end=60, target={\"width\": 1280, \"height\": 720})\n```\n\n### Generative media\n\n```python\nimage = coll.generate_image(\n    prompt=\"a sunset over mountains\",\n    aspect_ratio=\"16:9\",\n)\n```\n\n## Error handling\n\n```python\nfrom videodb.exceptions import AuthenticationError, InvalidRequestError\n\ntry:\n    conn = videodb.connect()\nexcept AuthenticationError:\n    print(\"Check your VIDEO_DB_API_KEY\")\n\ntry:\n    video = coll.upload(url=\"https:\u002F\u002Fexample.com\u002Fvideo.mp4\")\nexcept InvalidRequestError as e:\n    print(f\"Upload failed: {e}\")\n```\n\n### Common pitfalls\n\n| Scenario | Error message | Solution |\n|----------|--------------|----------|\n| Indexing an already-indexed video | `Spoken word index for video already exists` | Use `video.index_spoken_words(force=True)` to skip if already indexed |\n| Scene index already exists | `Scene index with id XXXX already exists` | Extract the existing `scene_index_id` from the error with `re.search(r\"id\\s+([a-f0-9]+)\", str(e))` |\n| Search finds no matches | `InvalidRequestError: No results found` | Catch the exception and treat as empty results (`shots = []`) |\n| Reframe times out | Blocks indefinitely on long videos | Use `start`\u002F`end` to limit segment, or pass `callback_url` for async |\n| Negative timestamps on Timeline | Silently produces broken stream | Always validate `start >= 0` before creating `VideoAsset` |\n| `generate_video()` \u002F `create_collection()` fails | `Operation not allowed` or `maximum limit` | Plan-gated features — inform the user about plan limits |\n\n## Additional docs\n\nReference documentation is in the `reference\u002F` directory adjacent to this SKILL.md file. Use the Glob tool to locate it if needed.\n\n- [reference\u002Fapi-reference.md](reference\u002Fapi-reference.md) - Complete VideoDB Python SDK API reference\n- [reference\u002Fsearch.md](reference\u002Fsearch.md) - In-depth guide to video search (spoken word and scene-based)\n- [reference\u002Feditor.md](reference\u002Feditor.md) - Timeline editing, assets, and composition\n- [reference\u002Fstreaming.md](reference\u002Fstreaming.md) - HLS streaming and instant playback\n- [reference\u002Fgenerative.md](reference\u002Fgenerative.md) - AI-powered media generation (images, video, audio)\n- [reference\u002Frtstream.md](reference\u002Frtstream.md) - Live stream ingestion workflow (RTSP\u002FRTMP)\n- [reference\u002Frtstream-reference.md](reference\u002Frtstream-reference.md) - RTStream SDK methods and AI pipelines\n- [reference\u002Fcapture.md](reference\u002Fcapture.md) - Desktop capture workflow\n- [reference\u002Fcapture-reference.md](reference\u002Fcapture-reference.md) - Capture SDK and WebSocket events\n- [reference\u002Fuse-cases.md](reference\u002Fuse-cases.md) - Common video processing patterns and examples\n\n## Screen Recording (Desktop Capture)\n\nUse `ws_listener.py` to capture WebSocket events during recording sessions. Desktop capture supports **macOS** only.\n\n### Quick Start\n\n1. **Start listener**: `python scripts\u002Fws_listener.py &`\n2. **Get WebSocket ID**: `cat \u002Ftmp\u002Fvideodb_ws_id`\n3. **Run capture code** (see reference\u002Fcapture.md for full workflow)\n4. **Events written to**: `\u002Ftmp\u002Fvideodb_events.jsonl`\n\n### Query Events\n\n```python\nimport json\nevents = [json.loads(l) for l in open(\"\u002Ftmp\u002Fvideodb_events.jsonl\")]\n\n# Get all transcripts\ntranscripts = [e[\"data\"][\"text\"] for e in events if e.get(\"channel\") == \"transcript\"]\n\n# Get visual descriptions from last 5 minutes\nimport time\ncutoff = time.time() - 300\nrecent_visual = [e for e in events \n                 if e.get(\"channel\") == \"visual_index\" and e[\"unix_ts\"] > cutoff]\n```\n\n### Utility Scripts\n\n- [scripts\u002Fws_listener.py](scripts\u002Fws_listener.py) - WebSocket event listener (dumps to JSONL)\n\nFor complete capture workflow, see [reference\u002Fcapture.md](reference\u002Fcapture.md).\n\n**Do not use ffmpeg, moviepy, or local encoding tools** when VideoDB supports the operation. The following are all handled server-side by VideoDB — trimming, combining clips, overlaying audio or music, adding subtitles, text\u002Fimage overlays, transcoding, resolution changes, aspect-ratio conversion, resizing for platform requirements, transcription, and media generation. Only fall back to local tools for operations listed under Limitations in reference\u002Feditor.md (transitions, speed changes, crop\u002Fzoom, colour grading, volume mixing).\n\n### When to use what\n\n| Problem | VideoDB solution |\n|---------|-----------------|\n| Platform rejects video aspect ratio or resolution | `video.reframe()` or `conn.transcode()` with `VideoConfig` |\n| Need to resize video for Twitter\u002FInstagram\u002FTikTok | `video.reframe(target=\"vertical\")` or `target=\"square\"` |\n| Need to change resolution (e.g. 1080p → 720p) | `conn.transcode()` with `VideoConfig(resolution=720)` |\n| Need to overlay audio\u002Fmusic on video | `AudioAsset` on a `Timeline` |\n| Need to add subtitles | `video.add_subtitle()` or `CaptionAsset` |\n| Need to combine\u002Ftrim clips | `VideoAsset` on a `Timeline` |\n| Need to generate voiceover, music, or SFX | `coll.generate_voice()`, `generate_music()`, `generate_sound_effect()` |\n\n## Repository\n\nhttps:\u002F\u002Fgithub.com\u002Fvideo-db\u002Fskills\n\n**Maintained By:** [VideoDB](https:\u002F\u002Fgithub.com\u002Fvideo-db)\n",{"name":5,"risk":28,"tags":43,"source":44,"category":45,"date_added":46,"description":7,"allowed-tools":47,"argument-hint":48},"[video, editing, transcription, subtitles, search, streaming, ai-generation, media, live-streams, desktop-capture]","community","media","2026-02-27","Read Grep Glob Bash(python:*)","[task description]","main","c173cdffe08e788a99b91928a831b476b8434838","ecosystem\u002Fskills\u002Fvideodb",0,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw","https:\u002F\u002Fportfolio-longleo.vercel.app\u002Flabs\u002Fomniclaw.html","https:\u002F\u002Fgithub.com\u002FLongLeo287","https:\u002F\u002Fwww.facebook.com\u002FResourceRookie2023","2026-11-14 08:48:28",{"source":8,"skillName":5,"commands":59,"prompt":69,"zipAvailable":70},[60,63,66],{"tool":61,"command":62},"npx","npx skills add LongLeo287\u002FOmniClaw --skill videodb",{"tool":64,"command":65},"bunx","bunx skills add LongLeo287\u002FOmniClaw --skill videodb",{"tool":67,"command":68},"pnpm","pnpm dlx skills add LongLeo287\u002FOmniClaw --skill videodb","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fvideodb\u002FSKILL.md",true,[72,78,82,86],{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"_DIR_IDENTITY.md","REFERENCE","参考文档",135,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fvideodb\u002F_DIR_IDENTITY.md",{"path":79,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":80,"sourceHtmlUrl":81},"README.md",449,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fvideodb\u002FREADME.md",{"path":83,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":84,"sourceHtmlUrl":85},"schema.json",423,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fvideodb\u002Fschema.json",{"path":87,"resourceType":88,"resourceTypeDesc":89,"sizeBytes":90,"sourceHtmlUrl":91},"scripts\u002Fws_listener.py","SCRIPT","脚本",7725,"https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fvideodb\u002Fscripts\u002Fws_listener.py",[93,119,140,164,180,201],{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":38},"01M6JR0KQP4MHT32TN40D9CBFX","UI-UX Pro Max","Advanced UI\u002FUX analysis and generation skills with data-driven patterns. Python scripts (core.py, search.py) for systematic UI pattern extraction, design system generation, and component search from curated data sources.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fui_components\u002Fui_ux_pro_max\u002FSKILL.md",[],[100,101,102,103,104,105,106,107,33,108,109,110,111,112,113,114,115,116,117,118],"ux","ui","ui ux pro max","max","pro","ui ux","design","component","analysis","team","rd","ui-ux","active","systematic","scripts","pattern extraction","sources","advanced","data-driven",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":38},"01M6JR0EF5AEQHP2FSTB57H05P","shadcn-ui","Expert guidance for integrating and building applications with shadcn\u002Fui components, including component discovery, installation, customization, and best practices.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fui_components\u002Fshadcn_ui\u002FSKILL.md",[],[126,101,127,128,107,129,130,131,132,109,133,134,135,112,136,137,138,139],"shadcn","shadcn ui","components","core","best practices","applications","discovery","customization","guidance","expert","installation","ui components","with","for",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":38},"01M6JR08F51BEN17RHFYX65WVE","zustand_store_ts","Create Zustand stores with TypeScript, subscribeWithSelector middleware, and proper state\u002Faction separation. Use when building React state management, creating global stores, or implementing reactive state patterns with Zustand.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fzustand_store_ts\u002FSKILL.md",[],[147,148,149,150,151,152,36,153,154,155,156,157,158,159,160,161,138,162,163],"zustand store ts","zustand","store","typescript","microsoft","react","state management","state","react state management","management","global","use","patterns","separation","middleware","action","implementing",{"skillNo":165,"name":148,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":38},"01M6JR00TDMVAFFCZXZ04AN7Q7","Zustand state management guide. Use when working with store code (src\u002Fstore\u002F**), implementing actions, managing state, or creating slices. Triggers on Zustand store development, state management questions, or action implementation.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fzustand\u002FSKILL.md",[],[148,170,153,171,154,172,173,156,174,158,175,176,177,149,138,178,179,162,163],"development","code","actions","src","guide","implementation","zustand state","triggers","questions","zustand state management",{"skillNo":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":186,"publishedAt":38},"01M6JQZSWV4KWJP112G6XHEP44","youtube_summarizer","Automatically fetch YouTube video transcripts, generate structured summaries, and send full transcripts to messaging platforms. Detects YouTube URLs and provides metadata, key insights, and downloadable transcripts.","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fyoutube_summarizer\u002FSKILL.md",[],[187,188,189,35,190,191,31,192,193,194,195,196,197,198,199,200],"youtube","youtube summarizer","summarizer","metadata","messaging","fetch","telegram","transcription","summarization","structured","full","insights","transcripts","summaries",{"skillNo":202,"name":203,"nameZh":6,"description":204,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":205,"categories":206,"keywords":207,"publishedAt":38},"01M6JQZN3QJB6B77JGKJD62DQT","youtube_clipper","YouTube 视频智能剪辑工具。下载视频和字幕，AI 分析生成精细章节（几分钟级别）， 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频，并生成总结文案。 使用场景：当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词：视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video","https:\u002F\u002Fgithub.com\u002FLongLeo287\u002FOmniClaw\u002Fblob\u002Fmain\u002Fecosystem\u002Fskills\u002Fyoutube_clipper\u002FSKILL.md",[],[187,208,209,31,210,211,212,213,214,215,19,216,217,218,219,220,221],"clipper","youtube clipper","Bash","下载","视频","生成","关键词","翻译","write","clip","总结","工具","文案","sonnet"]