Skip to main content

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

Thumbnails are cached for 90 days on the CDN for instant loading in galleries.

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:
MP4 with H.264 has the best compatibility across all devices and browsers.

Mobile Optimization

Special handling for mobile devices:
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:
Video files count toward your storage limit. A single 4K video can use as much space as thousands of images.

Compression Recommendations

Unlike images, Imperial doesn’t compress videos automatically. Compress before uploading:
  • -crf 23: Quality (18-28, lower = better)
  • -preset slow: Slower encoding, better compression
  • scale=1280:720: Resize to 720p
Desktop application for easy video compression:
  1. Load your video
  2. Select “Web” preset
  3. Choose quality (RF 20-24)
  4. Click “Start”
Download: https://handbrake.fr
Web-based video converter:
  1. Upload video
  2. Convert to MP4
  3. Set quality/resolution
  4. Download result
Visit: https://cloudconvert.com

API Integration

Upload Video

Response with Thumbnail

Embed in HTML

Performance Metrics

Thumbnail Generation Time

Thumbnail generation happens asynchronously. The video is immediately available even if thumbnail generation is still processing.

CDN Delivery Performance

First load (uncached):
Subsequent loads (cached):

Limitations

Current Limitations:
  • No transcoding (upload optimized videos)
  • No adaptive bitrate streaming
  • No live streaming support
  • Maximum file size limited by storage tier

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

  • 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)
  • MP4 (H.264): Best for general use
  • WebM (VP9): Good for web-only
  • Avoid uncompressed formats (AVI, MOV)
  • Keep videos under 100 MB when possible
  • Split longer videos into segments
  • Use thumbnails effectively in galleries
  • 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)
Solution: Re-upload or try a different format (MP4 with H.264).

Video Won’t Play

Possible causes:
  • Browser doesn’t support codec
  • File size too large for device
  • Network issues
Solution: Use MP4 with H.264 for best compatibility.

Slow Loading

Possible causes:
  • Video not optimized (high bitrate)
  • User on slow connection
  • Cold start (not cached yet)
Solution: Compress video before upload, or wait for CDN cache to warm up.

Get Started

Ready to upload videos?

Upload Your First Video

Try video hosting with automatic thumbnails