Video API
The Imgix Video API allows you to optimize and serve video to your users. Using our URL-based API, you can generate thumbnails, and apply various transformations to your video content. The Video API is ideal for quick playback on your website or app, and works especially well for short-form content such as video clips, GIFs, and background videos. Videos up to two minutes are rendered on the fly and available instantly; longer videos are supported through asynchronous background processing. Imgix Video is served through the .net subdomain, supports custom domains, and requires no separate transcoding step.
Video Features
- Thumbnail generation
- Instant availability
- Bitrate selection
- Codec selection
- Signing
- Video Resizing
- Clipping
- Serve through
.net - Supports custom domains
Supported Video Length
Imgix Video works with both short and long videos. How a video is processed depends on its duration:
- Two minutes or shorter: The video is rendered synchronously, on the fly, and is available instantly.
- Longer than two minutes: The video is processed asynchronously in the background. The first request returns a
423status while the render is prepared, and subsequent requests serve the finished video from cache.
For most use cases, such as clips, GIFs, and background videos, synchronous rendering means your video is available immediately with no separate transcoding or preprocessing step.
Processing Time
Video encoding can sometimes be a time-sensitive process. First-time requests may return 423 for a few minutes until the video is fully processed. Either poll the URL until you receive a video response, or check again after a few minutes.
Automatic Bitrate Selection
By default, when fm=mp4 is used without the video-bitrate and video-codec parameters, Imgix Video encodes using the widely-supported H.264 codec and automatically selects an appropriate bitrate. The encoder uses a variable bitrate, analyzing video content to balance quality and file size rather than targeting a fixed output.
We recommend using unencoded video with Imgix Video through fm=mp4. Pre-encoding your video before delivery may occasionally result in an output file size that is larger than the source due to Imgix Video’s automatic bitrate selection behavior. For predictable, controlled output, use the video-bitrate and video-codec parameters.
Optimizing Imgix Video
Compared to images, where resizing is the most common optimization operation, video optimization is more complex. The most impactful optimization operations are:
video-bitrate: This parameter allows you to specify the video’s bitrate, which can significantly affect the quality and size of the video. A higher bitrate generally results in better quality but larger file size. The recommended range is between1Mand5M.video-codec: This parameter allows you to specify the codec of the video. Some codecs are more efficient than others, though all browsers may not support them.video-aq: This parameter controls the quality analysis mode used when encoding video. Settingvideo-aq=enhancedruns a deep VMAF-based analysis before encoding, producing significantly smaller files while maintaining perceptual quality. Expected bandwidth savings are 40–60% for low-complexity content and 15–25% for standard film content.
Quality Control: q vs. video-aq
Imgix Video offers two quality-related parameters that serve different purposes:
qcontrols the output quality level directly. Use it when you want explicit control over the trade-off between file size and visual quality.q=75is the default; lower values reduce file size at the cost of quality, higher values increase quality at the cost of larger files.video-aqcontrols the quality analysis mode used during encoding. Rather than setting a fixed quality level,video-aq=enhanceduses VMAF analysis to automatically find the optimal bitrate for each specific video, delivering the smallest possible file while holding a target perceptual quality (VMAF 93 by default).
In most cases, video-aq=enhanced is the recommended approach for optimizing bandwidth efficiency without manually tuning quality levels.
Video Credits
Imgix Video uses a credit-based pricing model. Credits are consumed based on the type of operation performed.
| Category | Operations | Credits |
|---|---|---|
| Standard | Video Encoding: Bitrate, Codec, Clip, Scale, Quality, Crop, Watermark, Subtitles, Spritesheets, Audio Waveforms, HLS/DASH | 2 per minute of MP4 output; 6 per minute of HLS/DASH output. Credits are calculated per second. |
| Advanced | Smart Cropping, Automated Previews, Enhanced Auto Quality (VMAF) | 1 per minute of input for previews; 1 per minute of output for Smart Cropping and VMAF. Credits are calculated per second and added to any Standard credits used. |
| Premium | Playback Speed & Frame Interpolation | 10 per minute of output. Credits are calculated per second and added to any Standard credits used. |
| Specialized | Image-to-video | 25 per request. Credits are calculated per request and added to any other credits used. |
| Cache Layer | Cache storage of derivative video renders | Free for 90 days after creation; 1 credit per GB per month after 90 days. |
Free Caching
Rendered video is cached and stored free for its first 90 days. If a render stays cached beyond that, storage is billed at 1 credit per GB per month starting on day 91. Because repeat requests for the same URL are served from this cache, reusing canonical URLs is what minimizes credits: it avoids paying to re-render the same output.