Video Hosting Made Easy
Imperial supports video uploads with automatic processing, thumbnail generation, and optimized CDN delivery. Upload videos just like images - no special configuration needed.Videos can be uploaded via the Dashboard or through the Upload API.
Supported Video Formats
MP4
Most Common
- Codec: H.264, H.265
- Best browser support
- Efficient compression
WebM
Web Optimized
- Codec: VP8, VP9, AV1
- Open source
- Great for web
MOV
Apple Format
- Codec: ProRes, H.264
- High quality
- Large file sizes
AVI
Legacy Format
- Various codecs
- Wide compatibility
- Less efficient
Automatic Thumbnail Generation
Every video uploaded to Imperial automatically generates a thumbnail for faster gallery loading and video previews.How It Works
1
Video Upload
You upload a video file through the dashboard or API
2
Frame Extraction
Imperial uses FFmpeg to extract a frame at the 1-second mark
3
Optimization
The frame is resized and compressed to JPEG format
4
CDN Upload
Both video and thumbnail are uploaded to R2 and cached globally
5
Ready to Use
Thumbnail URL is included in the API response
Example Response
Technical Implementation
FFmpeg Processing
Imperial uses FFmpeg, the industry-standard video processing tool:Processing Pipeline
Video Streaming
Range Request Support
Imperial’s CDN supports HTTP range requests, enabling:Seek/Skip
Users can jump to any point in the video
Resume Playback
Continue watching after interruption
Partial Downloads
Download only the needed portion
Bandwidth Savings
Don’t load entire video upfront
How Range Requests Work
Playback Optimization
Browser Compatibility
Videos are delivered with optimal settings for all major browsers:| Browser | Preferred Format | Fallback |
|---|---|---|
| Chrome | MP4 (H.264), WebM (VP9) | MP4 |
| Firefox | MP4 (H.264), WebM (VP9) | MP4 |
| Safari | MP4 (H.264) | MP4 |
| Edge | MP4 (H.264), WebM (VP9) | MP4 |
MP4 with H.264 has the best compatibility across all devices and browsers.
Mobile Optimization
Special handling for mobile devices:- Mobile Networks
- Battery Saving
- Data Saving
Adaptive Loading:
- Start with thumbnail display
- Load video only when played
- Support for lower quality on slow connections
Storage Considerations
File Size Guidelines
Videos can be significantly larger than images:| Quality | Resolution | Duration | Approx Size |
|---|---|---|---|
| Low | 480p | 1 min | 5-10 MB |
| Medium | 720p | 1 min | 15-25 MB |
| High | 1080p | 1 min | 40-80 MB |
| Ultra | 4K | 1 min | 150-300 MB |
Compression Recommendations
Unlike images, Imperial doesn’t compress videos automatically. Compress before uploading:FFmpeg (Command Line)
FFmpeg (Command Line)
-crf 23: Quality (18-28, lower = better)-preset slow: Slower encoding, better compressionscale=1280:720: Resize to 720p
HandBrake (GUI)
HandBrake (GUI)
Desktop application for easy video compression:
- Load your video
- Select “Web” preset
- Choose quality (RF 20-24)
- Click “Start”
CloudConvert (Online)
CloudConvert (Online)
Web-based video converter:
- Upload video
- Convert to MP4
- Set quality/resolution
- Download result
API Integration
Upload Video
Response with Thumbnail
Embed in HTML
Performance Metrics
Thumbnail Generation Time
| Video Size | Resolution | Generation Time |
|---|---|---|
| 10 MB | 1080p | 1-2 seconds |
| 50 MB | 1080p | 2-4 seconds |
| 100 MB | 4K | 4-6 seconds |
| 500 MB | 4K | 10-15 seconds |
Thumbnail generation happens asynchronously. The video is immediately available even if thumbnail generation is still processing.
CDN Delivery Performance
First load (uncached):Limitations
Future Features (Coming Soon)
- ✨ Multiple quality options (auto-generated 720p/480p)
- ✨ Adaptive bitrate streaming (HLS/DASH)
- ✨ Custom thumbnail selection (choose frame)
- ✨ Video analytics (views, watch time)
Best Practices
Optimize Before Upload
Optimize Before Upload
- Compress videos with FFmpeg or HandBrake
- Use H.264 codec for best compatibility
- Target 720p or 1080p for web use
- Use reasonable bitrates (2-8 Mbps for 1080p)
Choose Right Format
Choose Right Format
- MP4 (H.264): Best for general use
- WebM (VP9): Good for web-only
- Avoid uncompressed formats (AVI, MOV)
Consider File Size
Consider File Size
- Keep videos under 100 MB when possible
- Split longer videos into segments
- Use thumbnails effectively in galleries
Test Playback
Test Playback
- Verify on mobile and desktop
- Check loading times
- Ensure thumbnails load quickly
Troubleshooting
Thumbnail Not Generating
Possible causes:- Video codec not supported by FFmpeg
- Video file corrupted
- Video too short (< 1 second)
- Processing timeout (very large files)
Video Won’t Play
Possible causes:- Browser doesn’t support codec
- File size too large for device
- Network issues
Slow Loading
Possible causes:- Video not optimized (high bitrate)
- User on slow connection
- Cold start (not cached yet)
Get Started
Ready to upload videos?Upload Your First Video
Try video hosting with automatic thumbnails

