Comment on page
Automatic video format conversion
With multiple video formats to choose from, it often becomes a difficult task to ensure that the videos on a website are delivered in the right format. Also, it is not easy to encode videos in different codecs. ImageKit's automatic format conversion solves this problem.
Format Optimization is the process of delivering the best video format to the end-user while taking into account various factors such as requesting device capabilities, browser support for certain video formats, and your preferences. Ensuring the right format helps you reduce the size of the video and subsequently the playback time.
Today, the most common video codec is H.264. A typical
.mp4video is usually encoded using H.264 encoder. Almost every device in existence supports this protocol and it’s common for use with online video. However, there are several other codecs available, including MPEG-2, HEVC, VP9, Quicktime, and WMV.
VP9 is an open and royalty-free video coding format developed by Google. It provides excellent compression and is supported by major browsers.
VP9 support - https://caniuse.com/
AV1 (AOMedia Video 1) is a royalty-free video format by the Alliance for Open Media, meant to succeed its predecessor VP9 and compete with the HEVC/H.265 format. Read more about AV1 support across different browsers here.
ImageKit chooses between H.264, VP9, and AV1 codecs and automatically delivers the video in the appropriate format based on browser support.
Note that the automatic usage of the AV1 codec for output videos is disabled by default. However, you can force the output video to use the AV1 codec by adding
vc-av1in the transformation string. You can reach out to [email protected] to get this enabled.
The video URL remains the same, but the file is modified. This behavior is transparent for your users. The end result is a small video file and a faster playback time.
Beta feature The AV1 codec for output videos is currently in beta.
Automatic video format selection and AV1 video codec output are enabled by default for new signups as of October 17, 2023. You can enable or disable automatic format conversion and select allowed output video codecs for your account under video settings in your dashboard.
Select settings from the left main menu. Inside Videos, under optimization, toggle "Use best format for video delivery" option to enable or disable this feature.
If you disabled automatic format conversion in the global settings, you can still choose to use this feature for a particular request using
You can use the
fparameter to override the format for a particular video request. The format that you specify in the
fparameter will take precedence over any global settings.