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. It is best suited for videos that are shorter than 5 minutes, such as video clips, GIFs, or background videos. Imgix Video is served through the .net subdomain, supports custom domains and is available instantly without transcoding.
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 supports videos up to 5 minutes in length. For most use cases — clips, GIFs, and background videos — this is sufficient.
For videos up to 30 minutes, extended length support is available as a beta feature. To enable it for your account, reach out to Support.
For videos over 30 minutes, Imgix Video will encode the video asynchronously on first request.
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 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
Cached video renders are free for the first 90 days after creation. To minimize credit usage, ensure your videos are re-requested within 90 days to keep them in the cache.