The Problem
Video files from social media and streaming platforms are often too large to share in messaging apps (Discord’s 25MB limit, email attachments). Existing compression tools are either low-quality, riddled with ads, or require manual ffmpeg knowledge.
The Solution
ClipCrunch is a video downloader and compressor that automatically produces iPhone-friendly MP4 files under 25MB. It’s accessible via:
- Web UI — drag-and-drop upload or paste a URL
- Discord bot —
/crunch <url>slash command - Telegram bot —
/crunch <url>or send a video directly
Architecture
The system uses dynamic bitrate calculation with a 2Mbps quality ceiling, automatically scaling resolution and bitrate to hit the target file size while maintaining the best possible quality.
Technical Highlights
- 12 Terraform modules managing the full AWS stack (CloudFront, Cognito, S3, Lambda, EC2, IAM, Route53, ACM)
- GitHub OIDC for CI/CD — no static AWS credentials
- Multi-platform — YouTube, TikTok, Instagram, Facebook, Twitch, Kick, Streamable, Twitter/X
- Browser impersonation via curl_cffi for anti-bot bypass
- Cookie management — upload Netscape cookies.txt for authenticated downloads
- User accounts with PostgreSQL persistence
- Stripe integration (Pro $5/mo, API $15/mo tiers)
Infrastructure (IaC)
The AWS infrastructure was fully managed via Terraform with environment separation, cost budgeting ($100/mo alerts), and automated deployments via GitHub Actions with OIDC role assumption.
Results
- Deployed to production on AWS, later migrated to self-hosted homelab
- 159 unit tests with comprehensive coverage
- Handles concurrent downloads with queue management
- Sub-10 second processing for most clips