rightnow-ai/openfang/clip
- community
Checking that the SKILL.md file is still in the repository.
Expert knowledge for AI video clipping — yt-dlp downloading, whisper transcription, SRT generation, and ffmpeg processing
Install
npx vskill@latest install rightnow-ai/openfang/clipSKILL.md
The same SKILL.md was published earlier as rfdiosuao/openfang-cn/clip.
Video Clipping Expert Knowledge
Cross-Platform Notes
All tools (ffmpeg, ffprobe, yt-dlp, whisper) use identical CLI flags on Windows, macOS, and Linux. The differences are only in shell syntax:
| Feature | macOS / Linux | Windows (cmd.exe) | |||
|---|---|---|---|---|---|
| Suppress stderr | 2>/dev/null | 2>NUL | |||
| Filter output | `\ | grep pattern` | `\ | findstr pattern` | |
| Delete files | rm file1 file2 | del file1 file2 | |||
| Null output device | -f null - | -f null - (same) | |||
| ffmpeg subtitle paths | subtitles=clip.srt | subtitles=clip.srt (relative OK, absolute needs C\\:/path) |
IMPORTANT: ffmpeg filter paths (-vf "subtitles=...") always need forward slashes. On Windows with absolute paths, escape the colon: subtitles=C\\:/Users/me/clip.srt
Prefer using file_write tool for creating SRT/text files instead of shell echo/heredoc.
yt-dlp Reference
Download with Format Selection
Metadata Inspection
YouTube Auto-Subtitles
Useful Flags
--restrict-filenames— safe ASCII filenames (no spaces/special chars) — important on all platforms--no-playlist— download single video even if URL is in a playlist-o "template.%(ext)s"— output template (%(ext)s auto-detects format)--cookies-from-browser chrome— use browser cookies for age-restricted content--extract-audio/-x— extract audio only--audio-format wav— convert audio to wav (for whisper)
Whisper Transcription Reference
Audio Extraction for Whisper
Basic Transcription
Model Sizes
| Model | VRAM | Speed | Quality | Use When | |
|---|---|---|---|---|---|
| tiny | ~1GB | Fastest | Rough | Quick previews, testing pipeline | |
| base | ~1GB | Fast | OK | Short clips, clear speech | |
| small | ~2GB | Good | Good | Default — best balance | |
| medium | ~5GB | Slow | Better | Important content, accented speech | |
| large-v3 | ~10GB | Slowest | Best | Final production, multiple languages |
Note: On macOS Apple Silicon, consider mlx-whisper as a faster native alternative.
JSON Output Structure
segments[].words[]gives word-level timing when--word_timestamps trueprobabilityindicates confidence (< 0.5 = likely wrong)
YouTube json3 Subtitle Parsing
Format Structure
Extracting Word Timing
For each event and each segment within it:
word_start_ms = event.tStartMs + seg.tOffsetMsword_start_secs = word_start_ms / 1000.0word_text = seg.utf8.trim()
Events without segs are line breaks or formatting — skip them. Events with segs containing only "\n" are newlines — skip them.
SRT Generation from Transcript
SRT Format
Rules for Building Good SRT
- Group words into subtitle lines of ~8-12 words (2-3 seconds per line)
- Break at natural pause points (periods, commas, clause boundaries)
- Keep lines under 42 characters for readability on mobile
- Adjust timestamps relative to clip start (subtract clip start time from all timestamps)
- Timestamp format:
HH:MM:SS,mmm(comma separator, not dot) - Each entry: index line, timestamp line, text line(s), blank line
- Use
file_writetool to create the SRT file — works identically on all platforms
Styled Captions with ASS Format
For animated/styled captions, use ASS subtitle format instead of SRT:
Key ASS style properties:
PrimaryColour=&H00FFFFFF— white text (AABBGGRR format)OutlineColour=&H00000000— black outlineOutline=2— outline thicknessAlignment=2— bottom centerMarginV=40— margin from bottom edgeFontSize=22— good size for 1080x1920 vertical
FFmpeg Video Processing
Scene Detection
- Threshold 0.1 = very sensitive, 0.5 = only major cuts
- Parse
pts_time:from showinfo output for timestamps - On macOS/Linux pipe through
grep showinfo, on Windows pipe throughfindstr showinfo
Silence Detection
d=1.5= minimum 1.5 seconds of silence- Look for
silence_startandsilence_endin output
Clip Extraction
-ssbefore-i= fast seek (recommended for extraction)-to= end timestamp,-t= duration
Vertical Video (9:16 for Shorts/Reels/TikTok)
Caption Burn-in
Windows path escaping: subtitles=C\\:/Users/me/subs.srt (double-backslash before colon)
Thumbnail Generation
Video Analysis
API-Based STT Reference
Groq Whisper API
Fastest cloud STT — uses whisper-large-v3 on Groq hardware. Free tier available.
Response: {"text": "...", "words": [{"word": "hello", "start": 0.0, "end": 0.32}]}
- Max file size: 25MB. For longer audio, split with ffmpeg first.
timestamp_granularities[]=wordis required for word-level timing.
OpenAI Whisper API
Response format same as Groq. Max 25MB.
Deepgram Nova-2
Response: {"results": {"channels": [{"alternatives": [{"words": [{"word": "hello", "start": 0.0, "end": 0.32, "confidence": 0.99}]}]}]}}
- Supports streaming, but for clips use batch mode.
smart_format=trueadds punctuation and casing.
TTS Reference
Edge TTS (free, no API key needed)
Install: pip install edge-tts
OpenAI TTS
Voices: alloy, echo, fable, onyx, nova, shimmer Models: tts-1 (fast), tts-1-hd (quality)
ElevenLabs
Voice ID 21m00Tcm4TlvDq8ikWAM = Rachel (default). List voices: GET /v1/voices
Audio Merging (TTS + Original)
Quality & Performance Tips
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingcrates/openfang-hands/bundled/clip/SKILL.md
Popularity
- Repository stars
- 17,930
- Repository forks
- 2,272
- 7-day trend score
- 49
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rightnow-ai/openfang/clip)