Media Hosting
Mushu Media provides image and video hosting with automatic processing. Upload files directly from your app or CLI, and get optimized URLs for delivery.
What This Is
A media hosting service built on Cloudflare R2 (storage) and AWS MediaConvert (video processing). You get presigned upload URLs for secure direct uploads, automatic image resizing, and optimized video variants for download.
Key Features
- Direct Uploads - Upload directly to storage, bypassing your server
- Image Variants - Automatic thumbnail, small, medium, large versions
- Video Optimization - MP4 + WebM variants plus thumbnails
- Multi-Tenant - Organize media by org and tenant
- Zero Egress Fees - Cloudflare R2 has no download bandwidth charges
How It Works
Images
- Request a presigned upload URL from Mushu
- Upload the image directly to Cloudflare R2
- Confirm the upload to trigger processing
- Access image variants via transform URLs
Videos
- Request a presigned upload URL from Mushu
- Upload the video directly to Cloudflare R2
- Confirm the upload to start transcoding
- Poll for status until variants are ready
- Download MP4, WebM, or thumbnail files
Architecture
| Service | URL | Purpose |
|---|---|---|
mushu-media | media.mushucorp.com | API for upload URLs, metadata |
| Cloudflare R2 | (presigned URLs) | Image and video storage |
| Cloudflare Images | images.mushucorp.com | Image transforms and CDN |
| AWS MediaConvert | (internal) | Video transcoding |
Supported Formats
Images
- JPEG, PNG, GIF, WebP
- Max size: 10MB
Videos
- Input: MP4, MOV, MKV, AVI, WebM
- Output: MP4 (H.264), WebM (VP9), JPEG thumbnails
- Max size: 500MB
Pricing
- Image upload: $0.005 per file
- Video upload: $0.005 per file
- Video transcode: $0.02 per video
- Storage: $0.018/GB/month (images and videos)
- Download: Free (zero egress fees)
- Image transforms: $0.0006 per transform
See Pricing for full details and a cost calculator.