[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74198":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":14,"forks30d":14,"starsTrendScore":18,"compositeScore":19,"rankGlobal":8,"rankLanguage":8,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":8,"pushedAt":8,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":14,"starSnapshotCount":14,"syncStatus":28,"lastSyncTime":29,"discoverSource":30},74198,"Youtube-clipper-skill","op7418\u002FYoutube-clipper-skill","op7418",null,"Python",1949,292,11,7,0,6,23,121,18,20.4,"MIT License",false,"main",true,[],"2026-06-12 02:03:23","# YouTube Clipper Skill\n\n> AI-powered YouTube video clipper for Claude Code. Download videos, generate semantic chapters, clip segments, translate subtitles to bilingual format, and burn subtitles into videos.\n\n[![License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-MIT-blue.svg)](LICENSE)\n[![Python](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fpython-3.8+-blue.svg)](https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F)\n\nEnglish | [简体中文](README.zh-CN.md)\n\n[Features](#features) • [Installation](#installation) • [Usage](#usage) • [Requirements](#requirements) • [Configuration](#configuration) • [Troubleshooting](#troubleshooting)\n\n---\n\n## Features\n\n- **AI Semantic Analysis** - Generate fine-grained chapters (2-5 minutes each) by understanding video content, not just mechanical time splitting\n- **Precise Clipping** - Use FFmpeg to extract video segments with frame-accurate timing\n- **Bilingual Subtitles** - Batch translate subtitles to Chinese\u002FEnglish with 95% API call reduction\n- **Subtitle Burning** - Hardcode bilingual subtitles into videos with customizable styling\n- **Content Summarization** - Auto-generate social media content (Xiaohongshu, Douyin, WeChat)\n\n---\n\n## Installation\n\n### Option 1: npx skills (Recommended)\n\n```bash\nnpx skills add https:\u002F\u002Fgithub.com\u002Fop7418\u002FYoutube-clipper-skill\n```\n\nThis command will automatically install the skill to `~\u002F.claude\u002Fskills\u002Fyoutube-clipper\u002F`.\n\n### Option 2: Manual Installation\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fop7418\u002FYoutube-clipper-skill.git\ncd Youtube-clipper-skill\nbash install_as_skill.sh\n```\n\nThe install script will:\n- Copy files to `~\u002F.claude\u002Fskills\u002Fyoutube-clipper\u002F`\n- Install Python dependencies (yt-dlp, pysrt, python-dotenv)\n- Check system dependencies (Python, yt-dlp, FFmpeg)\n- Create `.env` configuration file\n\n---\n\n## Requirements\n\n### System Dependencies\n\n| Dependency | Version | Purpose | Installation |\n|------------|---------|---------|--------------|\n| **Python** | 3.8+ | Script execution | [python.org](https:\u002F\u002Fwww.python.org\u002Fdownloads\u002F) |\n| **yt-dlp** | Latest | YouTube download | `brew install yt-dlp` (macOS)\u003Cbr>`sudo apt install yt-dlp` (Ubuntu)\u003Cbr>`pip install yt-dlp` (pip) |\n| **FFmpeg with libass** | Latest | Video processing & subtitle burning | `brew install ffmpeg-full` (macOS)\u003Cbr>`sudo apt install ffmpeg libass-dev` (Ubuntu) |\n\n### Python Packages\n\nThese are automatically installed by the install script:\n- `yt-dlp` - YouTube downloader\n- `pysrt` - SRT subtitle parser\n- `python-dotenv` - Environment variable management\n\n### Important: FFmpeg libass Support\n\n**macOS users**: The standard `ffmpeg` package from Homebrew does NOT include libass support (required for subtitle burning). You must install `ffmpeg-full`:\n\n```bash\n# Remove standard ffmpeg (if installed)\nbrew uninstall ffmpeg\n\n# Install ffmpeg-full (includes libass)\nbrew install ffmpeg-full\n```\n\n**Verify libass support**:\n```bash\nffmpeg -filters 2>&1 | grep subtitles\n# Should output: subtitles    V->V  (...)\n```\n\n---\n\n## Usage\n\n### In Claude Code\n\nSimply tell Claude to clip a YouTube video:\n\n```\nClip this YouTube video: https:\u002F\u002Fyoutube.com\u002Fwatch?v=VIDEO_ID\n```\n\nor\n\n```\n剪辑这个 YouTube 视频：https:\u002F\u002Fyoutube.com\u002Fwatch?v=VIDEO_ID\n```\n\n### Workflow\n\n1. **Environment Check** - Verifies yt-dlp, FFmpeg, and Python dependencies\n2. **Video Download** - Downloads video (up to 1080p) and English subtitles\n3. **AI Chapter Analysis** - Claude analyzes subtitles to generate semantic chapters (2-5 min each)\n4. **User Selection** - Choose which chapters to clip and processing options\n5. **Processing** - Clips video, translates subtitles, burns subtitles (if requested)\n6. **Output** - Organized files in `.\u002Fyoutube-clips\u002F\u003Ctimestamp>\u002F`\n\n### Output Files\n\nFor each clipped chapter:\n\n```\n.\u002Fyoutube-clips\u002F20260122_143022\u002F\n└── Chapter_Title\u002F\n    ├── Chapter_Title_clip.mp4              # Original clip (no subtitles)\n    ├── Chapter_Title_with_subtitles.mp4    # With burned subtitles\n    ├── Chapter_Title_bilingual.srt         # Bilingual subtitle file\n    └── Chapter_Title_summary.md            # Social media content\n```\n\n---\n\n## Configuration\n\nThe skill uses environment variables for customization. Edit `~\u002F.claude\u002Fskills\u002Fyoutube-clipper\u002F.env`:\n\n### Key Settings\n\n```bash\n# FFmpeg path (auto-detected if empty)\nFFMPEG_PATH=\n\n# Output directory (default: current working directory)\nOUTPUT_DIR=.\u002Fyoutube-clips\n\n# Video quality limit (720, 1080, 1440, 2160)\nMAX_VIDEO_HEIGHT=1080\n\n# Translation batch size (20-25 recommended)\nTRANSLATION_BATCH_SIZE=20\n\n# Target language for translation\nTARGET_LANGUAGE=中文\n\n# Target chapter duration in seconds (180-300 recommended)\nTARGET_CHAPTER_DURATION=180\n```\n\nFor full configuration options, see [.env.example](.env.example).\n\n---\n\n## Examples\n\n### Example 1: Extract highlights from a tech interview\n\n**Input**:\n```\nClip this video: https:\u002F\u002Fyoutube.com\u002Fwatch?v=Ckt1cj0xjRM\n```\n\n**Output** (AI-generated chapters):\n```\n1. [00:00 - 03:15] AGI as an exponential curve, not a point in time\n2. [03:15 - 06:30] China's gap in AI development\n3. [06:30 - 09:45] The impact of chip bans\n...\n```\n\n**Result**: Select chapters → Get clipped videos with bilingual subtitles + social media content\n\n### Example 2: Create short clips from a course\n\n**Input**:\n```\nClip this lecture video and create bilingual subtitles: https:\u002F\u002Fyoutube.com\u002Fwatch?v=LECTURE_ID\n```\n\n**Options**:\n- Generate bilingual subtitles: Yes\n- Burn subtitles into video: Yes\n- Generate summary: Yes\n\n**Result**: High-quality clips ready for sharing on social media platforms\n\n---\n\n## Key Differentiators\n\n### AI Semantic Chapter Analysis\n\nUnlike mechanical time-based splitting, this skill uses Claude's AI to:\n- Understand content semantics\n- Identify natural topic transitions\n- Generate meaningful chapter titles and summaries\n- Ensure complete coverage with no gaps\n\n**Example**:\n```\n❌ Mechanical splitting: [0:00-30:00], [30:00-60:00]\n✅ AI semantic analysis:\n   - [00:00-03:15] AGI definition\n   - [03:15-07:30] China's AI landscape\n   - [07:30-12:00] Chip ban impacts\n```\n\n### Batch Translation Optimization\n\nTranslates 20 subtitles at once instead of one-by-one:\n- 95% reduction in API calls\n- 10x faster translation\n- Better translation consistency\n\n### Bilingual Subtitle Format\n\nGenerated subtitle files contain both English and Chinese:\n\n```srt\n1\n00:00:00,000 --> 00:00:03,500\nThis is the English subtitle\n这是中文字幕\n\n2\n00:00:03,500 --> 00:00:07,000\nAnother English line\n另一行中文\n```\n\n---\n\n## Troubleshooting\n\n### FFmpeg subtitle burning fails\n\n**Error**: `Option not found: subtitles` or `filter not found`\n\n**Solution**: Install `ffmpeg-full` (macOS) or ensure `libass-dev` is installed (Ubuntu):\n```bash\n# macOS\nbrew uninstall ffmpeg\nbrew install ffmpeg-full\n\n# Ubuntu\nsudo apt install ffmpeg libass-dev\n```\n\n### Video download is slow\n\n**Solution**: Set a proxy in `.env`:\n```bash\nYT_DLP_PROXY=http:\u002F\u002Fproxy-server:port\n# or\nYT_DLP_PROXY=socks5:\u002F\u002Fproxy-server:port\n```\n\n### Subtitle translation fails\n\n**Cause**: API rate limiting or network issues\n\n**Solution**: The skill automatically retries up to 3 times. If persistent, check:\n- Network connectivity\n- Claude API status\n- Reduce `TRANSLATION_BATCH_SIZE` in `.env`\n\n### Special characters in filenames\n\n**Issue**: Filenames with `:`, `\u002F`, `?`, etc. may cause errors\n\n**Solution**: The skill automatically sanitizes filenames by:\n- Removing special characters: `\u002F \\ : * ? \" \u003C > |`\n- Replacing spaces with underscores\n- Limiting length to 100 characters\n\n---\n\n## Documentation\n\n- **[SKILL.md](SKILL.md)** - Complete workflow and technical details\n- **[TECHNICAL_NOTES.md](TECHNICAL_NOTES.md)** - Implementation notes and design decisions\n- **[FIXES_AND_IMPROVEMENTS.md](FIXES_AND_IMPROVEMENTS.md)** - Changelog and bug fixes\n- **[references\u002F](references\u002F)** - FFmpeg, yt-dlp, and subtitle formatting guides\n\n---\n\n## Contributing\n\nContributions are welcome! Please:\n- Report bugs via [GitHub Issues](https:\u002F\u002Fgithub.com\u002Fop7418\u002FYoutube-clipper-skill\u002Fissues)\n- Submit feature requests\n- Open pull requests for improvements\n\n---\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## Acknowledgements\n\n- **[Claude Code](https:\u002F\u002Fclaude.ai\u002Fclaude-code)** - The AI-powered CLI tool\n- **[yt-dlp](https:\u002F\u002Fgithub.com\u002Fyt-dlp\u002Fyt-dlp)** - YouTube download engine\n- **[FFmpeg](https:\u002F\u002Fffmpeg.org\u002F)** - Video processing powerhouse\n\n---\n\n\u003Cdiv align=\"center\">\n\n**Made with ❤️ by [op7418](https:\u002F\u002Fgithub.com\u002Fop7418)**\n\nIf this skill helps you, please give it a ⭐️\n\n\u003C\u002Fdiv>\n","YouTube Clipper Skill 是一个基于AI的YouTube视频剪辑工具，专为Claude Code设计。它能够下载视频、生成语义章节、精确剪辑片段、将字幕翻译成双语格式并嵌入视频中。该项目利用了AI语义分析来生成精细的章节（每个2-5分钟），使用FFmpeg实现帧精度的视频剪辑，并通过批量翻译字幕减少95%的API调用成本。此外，它还支持自定义样式硬编码双语字幕到视频中以及自动为社交媒体生成内容摘要。适合需要高效处理和编辑YouTube视频内容的场景，如教育、娱乐或个人项目分享等。",2,"2026-06-11 03:49:27","high_star"]