Output Format

fm

The output format to convert the video file to.

The Video API currently supports two options: hls and mp4.

When no fm value is specified, the default output will be fm=hls.

Video formats

hls

The HLS format is an adaptive bitrate streaming video protocol that delivers visual and audio media to viewers via the internet. HLS allows for several interactions with a client that is not normally available to other video formats, such as adapting the video bitrate depending on the user’s connection.

The HLS protocol is not supported natively by all modern browsers and, in many cases, will require an external library or video player to manage playback. For more information about how to use HLS videos on the web, see our tutorial for creating a user friendly video player.

HLS is the default format used for the Video API when no fm parameter is supplied, and will be used unless a different value is specified for fm (such as fm=mp4).

For example, both of these URLs will output a video in HLS format:

  • https://{SUBDOMAIN}.imgix.video/{ORIGIN_PATH}
  • https://{SUBDOMAIN}.imgix.video/{ORIGIN_PATH}?fm=hls

mp4

The MP4 format is a commonly used video format, and is supported natively by all modern browsers, with or without a specialized video player.

The resolution of a video served with fm=mp4 can be controlled with the res parameter. An example of the parameter fm=mp4 combined with the res parameter looks like the following:

  • https://{SUBDOMAIN}.imgix.video/{ORIGIN_PATH}?fm=mp4&res=high

See the res parameter for more information.