{"skill":{"slug":"tiktok-clipper","displayName":"TikTok Clipper","summary":"Automatically extracts engaging TikTok clips with hooks and adds styled, synchronized subtitles from long videos using transcription and ffmpeg.","description":"# TikTok Clipper — Video → Viral Clips with Subtitles\n\n## What it does\nTakes a long-form video, transcribes it, identifies the most engaging segments for TikTok/Reels, clips them with ffmpeg, and adds TikTok-style animated subtitles.\n\n## When to use\n- User sends a video and wants TikTok/Reels clips\n- User asks to \"clip this\", \"find viral moments\", \"cut for TikTok\"\n- User wants subtitles added to video clips\n\n## Pipeline\n\n### Step 1: Transcribe\n```bash\n# Transcribe with Whisper (word-level timestamps)\npython3 SKILL_DIR/transcribe.py --input VIDEO_PATH --output TRANSCRIPT.json\n```\nUses OpenAI Whisper API with `timestamp_granularities=[\"word\",\"segment\"]` for precise subtitle timing.\n\n### Step 2: Analyze & Suggest Clips\nRead the transcript and identify segments that would perform well on TikTok:\n- **Hooks**: Strong opening lines, provocative statements, questions\n- **Value bombs**: Key insights, surprising facts, actionable tips\n- **Emotional peaks**: Enthusiasm, humor, strong opinions\n- **Story arcs**: Complete mini-stories with beginning/middle/end\n- **Controversy/debate**: Polarizing takes that drive comments\n\nPresent clips as numbered options with:\n- Time range (start → end)\n- Duration\n- Hook line (first sentence)\n- Why it could be viral\n- Suggested caption\n\nUser picks which ones to cut.\n\n### Step 3: Cut clips\n```bash\npython3 SKILL_DIR/clip.py --input VIDEO_PATH --start MM:SS --end MM:SS --output CLIP.mp4\n```\n- Uses ffmpeg with re-encoding for clean cuts\n- Converts to 9:16 vertical if needed (crop or pad)\n- Ensures TikTok-compatible format (h264, aac, mp4)\n\n### Step 4: Add TikTok-style subtitles\n```bash\npython3 SKILL_DIR/subtitles.py --input CLIP.mp4 --transcript TRANSCRIPT.json --start SS --end SS --style STYLE --output FINAL.mp4\n```\n\n#### Subtitle Styles Available:\n1. **bold-center**: White bold text, black outline, centered bottom third (classic TikTok)\n2. **word-highlight**: Word-by-word highlight in yellow/green (like CapCut auto-captions)\n3. **karaoke**: Current word scales up + color change (Alex Hormozi style)\n4. **box**: Text with colored background box (MrBeast style)\n\nAll styles use ASS (Advanced SubStation Alpha) for rich formatting via ffmpeg.\n\n### Step 5: Vertical format\nIf source is horizontal (16:9), auto-crop to 9:16:\n- Center crop for talking head\n- Or blur-background padding (video small in center, blurred fill)\n\n## File outputs\nAll outputs go to `/home/ubuntu/clawd/clips/` with naming: `{source}-clip{N}-{style}.mp4`\n\n## Requirements\n- `ffmpeg` (installed)\n- OpenAI API key for Whisper (in .env)\n- Source video file\n\n## Notes\n- Max TikTok length: 90 seconds for best performance\n- Sweet spot: 30-60 seconds\n- Always start with a hook (first 3 seconds matter most)\n- Subtitles should be max 2 lines, ~5-7 words per line\n","tags":{"latest":"1.0.0","subtitles":"1.0.0","tiktok":"1.0.0","video":"1.0.0"},"stats":{"comments":0,"downloads":245,"installsAllTime":9,"installsCurrent":1,"stars":0,"versions":1},"createdAt":1771626787205,"updatedAt":1778491594064},"latestVersion":{"version":"1.0.0","createdAt":1771626787205,"changelog":"Initial release","license":null},"metadata":null,"owner":{"handle":"pauldelavallaz","userId":"s17es8yqc61443cxz7kbvr73rs884ggf","displayName":"Paul de Lavallaz","image":"https://avatars.githubusercontent.com/u/51497690?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780089730401}}