Logo: Video Clip Extractor

Video Clip Extractor

Communautéit
linzzzzzz
video-clip-extractor

Processes videos to identify engaging moments, generate transcripts, and create highlight clips with artistic titles and custom cover images. Use when user needs to: extract highlights from long videos or livestreams, clip or cut best moments from videos, cut video highlights, process Bilibili/YouTube URLs or local video files, generate transcripts via Whisper, analyze content for engaging moments, create short-form clips with styled titles and covers, adjust cover text position and colors, find and export memorable scenes from recordings, burn subtitles into clips (with optional translation), guide clip selection with user intent, or identify speakers in multi-person conversations.

Iwwersiicht

Editeurlinzzzzzz
Repositoryopenclip
Skill-Nummvideo-clip-extractor
Stären
569
Forks
70
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    linzzzzzz huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Video Clip Extractor an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/linzzzzzz/openclip/tree/main/.claude/skills/video-clip-extractor
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/linzzzzzz/openclip.git /tmp/openclip
mkdir -p .claude/skills
cp -r /tmp/openclip/.claude/skills/video-clip-extractor .claude/skills/video-clip-extractor
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Video Clip Extractor an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Video Clip Extractor automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Video Clip Extractor net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Video Clip Extractor Skill

Run the video orchestrator to process videos and extract engaging highlights.

When Triggered

  1. Get the source — if the user didn't provide a video URL or file path, ask for it.
  2. Clarify intent (optional) — if the user wants clips focused on a specific topic, capture it for --user-intent. If unclear, ask: "Any specific topic or moments to focus on? (e.g. 'funny moments', 'key arguments')"
  3. Check environment — does video_orchestrator.py exist in the current directory? If yes, run directly. Otherwise use the global install at ~/.local/share/openclip.
  4. Verify prerequisites — check ffmpeg is installed and at least one API key is set. Warn if missing before running.
  5. Run the command and stream output to user.
  6. Report results — after completion, list the generated clips with timestamps and titles.

Setup (first use only)

Before running, determine the execution context:

  1. Inside openclip repo — if video_orchestrator.py exists in the current directory, skip setup and run directly.
  2. Global install — if ~/.local/share/openclip does not exist, run these steps:

Prerequisites: git and uv must be installed.

  • Install uv if missing: macOS: brew install uv · Linux/Windows: pip install uv
bash
git clone https://github.com/linzzzzzz/openclip.git ~/.local/share/openclip
cd ~/.local/share/openclip && uv sync

To update openclip later:

bash
git -C ~/.local/share/openclip pull && cd ~/.local/share/openclip && uv sync

Execution

If inside the openclip repo (current directory contains video_orchestrator.py):

bash
uv run python video_orchestrator.py [options] <source>

If running globally (from any other directory):

bash
cd ~/.local/share/openclip && uv run python video_orchestrator.py -o "$OLDPWD/processed_videos" [options] <source>

$OLDPWD captures the user's original directory so clips are saved there, not inside the openclip install.

Where <source> is a video URL (Bilibili/YouTube) or local file path (MP4, WebM, AVI, MOV, MKV).

For local files with existing subtitles, place the .srt file in the same directory with the same filename (e.g. video.mp4 → video.srt).

Preflight Checklist

  • Inside openclip repo: run from the repo root so relative paths (e.g. references/, prompts/) resolve correctly
  • ffmpeg must be installed (required for all clip generation):
    • macOS: brew install ffmpeg
    • Ubuntu: sudo apt install ffmpeg
    • Windows: download from ffmpeg.org
    • If using --burn-subtitles: needs ffmpeg with libass (see README for details)
  • Set one API key:
    • QWEN_API_KEY (default provider: qwen), or
    • OPENROUTER_API_KEY (if --llm-provider openrouter), or
    • GLM_API_KEY (if --llm-provider glm), or
    • MINIMAX_API_KEY (if --llm-provider minimax)
  • If using --speaker-references: run uv sync --extra speakers and set HUGGINGFACE_TOKEN

CLI Reference

Required

ArgumentDescription
sourceVideo URL or local file path

Optional

FlagDefaultDescription
-o, --output <dir>processed_videosOutput directory
--max-clips <n>5Maximum number of highlight clips
--browser <browser>firefoxBrowser for cookies: chrome, firefox, edge, safari
--title-style <style>fire_flameTitle style: gradient_3d, neon_glow, metallic_gold, rainbow_3d, crystal_ice, fire_flame, metallic_silver, glowing_plasma, stone_carved, glass_transparent
--title-font-size <size>mediumFont size preset for artistic titles. Options: small(30px), medium(40px), large(50px), xlarge(60px)
--cover-text-location <loc>centerCover text position: top, upper_middle, bottom, center
--cover-fill-color <color>yellowCover text fill color: yellow, red, white, cyan, green, orange, pink, purple, gold, silver
--cover-outline-color <color>blackCover text outline color: yellow, red, white, cyan, green, orange, pink, purple, gold, silver, black
--language <lang>zhOutput language: zh (Chinese), en (English)
--llm-provider <provider>qwenLLM provider: qwen, openrouter, glm, minimax
--user-intent <text>—Free-text focus description (e.g. "moments about AI risks"). Steers LLM clip selection toward this topic
--subtitle-translation <lang>—Translate subtitles to this language before burning (e.g. "Simplified Chinese"). Requires --burn-subtitles and QWEN_API_KEY
--speaker-references <dir>—Directory of reference WAV files (one per speaker, filename = speaker name) for speaker diarization. Requires uv sync --extra speakers and HUGGINGFACE_TOKEN
-f, --filename <template>—yt-dlp template: %(title)s, %(uploader)s, %(id)s, etc.

Flags

FlagDescription
--force-whisperIgnore platform subtitles, use Whisper
--skip-downloadUse existing downloaded video
--skip-transcriptSkip transcript generation, use existing transcript file
--skip-analysisSkip analysis, use existing analysis file for clip generation
--use-backgroundInclude background info (streamer names/nicknames) in analysis prompts
--skip-clipsSkip clip generation
--add-titlesAdd artistic titles to clips (disabled by default)
--skip-coverSkip cover image generation
--burn-subtitlesBurn SRT subtitles into video. Output goes to clips_post_processed/. Requires ffmpeg with libass
-v, --verboseEnable verbose logging
--debugExport full prompts sent to LLM (saved to debug_prompts/)

Custom Filename Template (-f)

Uses yt-dlp template syntax. Common variables: %(title)s, %(uploader)s, %(upload_date)s, %(id)s, %(ext)s, %(duration)s.

Example: -f "%(upload_date)s_%(title)s.%(ext)s"

Environment Variables

Set the appropriate API key for the chosen --llm-provider:

  • QWEN_API_KEY — for --llm-provider qwen
  • OPENROUTER_API_KEY — for --llm-provider openrouter
  • GLM_API_KEY — for --llm-provider glm
  • MINIMAX_API_KEY — for --llm-provider minimax

Workflow

The orchestrator runs this pipeline automatically:

  1. Download — fetch video + platform subtitles (Bilibili/YouTube) or accept local file
  2. Split — divide videos longer than the built-in threshold into segments for parallel analysis
  3. Transcribe — use platform subtitles or Whisper AI; --force-whisper overrides
  4. Analyze — LLM scores transcript segments for engagement; --user-intent steers selection
  5. Generate clips — ffmpeg cuts the video at identified timestamps
  6. Add titles (opt-in) — render artistic text overlay using --title-style
  7. Generate covers — create thumbnail image for each clip

Use --skip-clips, --skip-cover to skip specific steps. Use --add-titles to enable artistic titles. Use --skip-download and --skip-analysis to resume from intermediate results.

Output Example

After a successful run, report results like this:

✅ Processing complete — 5 clips generated
📁 processed_videos/video_name/clips/

  clip_01.mp4  [00:12:34 – 00:15:20]  "Title of the moment"
  clip_02.mp4  [00:28:45 – 00:31:10]  "Another highlight"
  clip_03.mp4  [00:45:00 – 00:47:30]  "Key discussion point"
  ...

Cover images: clips/*.jpg

Output Structure

processed_videos/{video_name}/
├── downloads/              # Original video, subtitles, and metadata (URL sources)
├── local_videos/           # Copied video and subtitles (local file sources)
├── splits/                 # Split parts and AI analysis results
├── clips/                  # Generated highlight clips + cover images
└── clips_post_processed/   # Post-processed clips when using --add-titles and/or --burn-subtitles

Option Selection Guide

Whisper model — Default base works for clear audio. Use small for background noise, multiple speakers, or accents. Use turbo for speed + accuracy. Use large/medium only when transcript quality is critical.

--force-whisper — Use when platform subtitles are auto-generated (often inaccurate), when "no engaging moments found" occurs (better transcripts improve analysis), or for non-native language content where platform captions are unreliable.

--use-background — Use for content featuring recurring personalities (streamers, hosts) where nicknames and community references matter. Reads from prompts/background/background.md.

Multi-part analysis — Videos that get split are analyzed per-segment, then aggregated to the top 5 engaging moments across all segments.

--user-intent — Steers LLM clip selection at both the per-segment and cross-segment aggregation stages. Useful when you want to find clips about a specific topic (e.g. "AI safety predictions", "funny moments").

--burn-subtitles — Hardcodes the SRT subtitle into the video frame. Use when you want subtitles always visible (e.g. for social media). Combine with --subtitle-translation to add a translated subtitle track below the original.

--speaker-references — Enables speaker diarization for interviews/podcasts. Provide a directory of 10–30 second clean WAV clips (one per speaker), named after the speaker (e.g. references/Host.wav).

Troubleshooting

ErrorFix
"ffmpeg not found" / clip generation fails silentlyInstall ffmpeg: brew install ffmpeg (macOS) or sudo apt install ffmpeg (Ubuntu)
"No API key provided"Set QWEN_API_KEY, OPENROUTER_API_KEY, GLM_API_KEY, or MINIMAX_API_KEY env var
"Video download failed"Check network/URL; try different --browser; or use local file
"Transcript generation failed"Try --force-whisper or check audio quality
"No engaging moments found"Try --force-whisper for better transcript accuracy
"Clip generation failed"Ensure analysis completed; check for existing analysis file

Heefeg gestallte Froen

Wat mécht de KI-Skill Video Clip Extractor?

Processes videos to identify engaging moments, generate transcripts, and create highlight clips with artistic titles and custom cover images. Use when user needs to: extract highlights from long videos or livestreams, clip or cut best moments from videos, cut video highlights, process Bilibili/YouTube URLs or local video files, generate transcripts via Whisper, analyze content for engaging moments, create short-form clips with styled titles and covers, adjust cover text position and colors, find and export memorable scenes from recordings, burn subtitles into clips (with optional translatio...

Firwat Video Clip Extractor op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Video Clip Extractor besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Video Clip Extractor an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/linzzzzzz/openclip/tree/main/.claude/skills/video-clip-extractor an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Video Clip Extractor benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Video Clip Extractor benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Video Clip Extractor domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Video Clip Extractor gratis?

Jo. linzzzzzz huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇