Documentation Index

Fetch the complete documentation index at: https://cloudinary.com/documentation/llms.txt

Use this file to discover all available pages before exploring further.

Image & Video APIs

Transcoding videos to other formats

Last updated: Jun-03-2026

Videos (and audio files) can be uploaded to Cloudinary in various formats (upload formats). You can transcode these videos to other formats for displaying in your web site or application (delivery formats). Examples of situations where you might want to change the delivered video format:

  • Delivering a video where the original format is not supported for delivery by the browser. For example, you could deliver a 3PG (.3pg) video as an MPEG-4 (.mp4).
  • Delivering WebM if your users are on a Chrome browser or on a mobile app you control.

Tip
For video format optimization guidelines, see How to optimize video format.

Delivering in a different format

You can transcode and deliver videos in a different format by specifying the required format as the file extension of the delivery URL. You can also convert a video to an audio file by specifying a supported audio format.

When using an SDK to build the URL, you can either append the extension of the new format to the asset's public ID or use the format parameter.

For example, the following example transcodes the uploaded mp4 video with the public ID of hotel_pool to WebM format by changing the file extension to .webm:

As a URL:

Via our SDKs:

 

Another way to transcode the format of an uploaded video is to use the fetch_format transformation parameter (f for URLs). For example, transcoding the uploaded mp4 video named hotel_pool to WebM with a parameter:

Notes
  • If the file extension is omitted in a delivery URL, the file is delivered in the originally uploaded format unless a specific format (or the auto format is requested using the fetch_format (f_) transformation parameter).
  • SDK major versions with initial release later than January 2020 have a format transformation parameter, instead of the fetch_format parameter. See f (format) in the transformation reference.

f_auto

You can take advantage of Cloudinary's automatic format selection (f_auto) transformation to automatically deliver videos in the most optimized format that's supported by the requesting browser.

For example, if you deliver an MP4 video with f_auto, Cloudinary might generate and deliver the video as a VP9-encoded WebM, an HEVC-encoded MP4, or an H.264-encoded MP4, depending on the requesting browser and your account setup.

For details, see Automatic format_selection (f_auto).

Video codec settings

The video_codec parameter (vc in URLs) is used to determine the video codec, video profile and level to use e.g. vc_h264:baseline:3.1 or vc_h264 or vc_h264:high. You can set this parameter to auto instead, to normalize and optimize the video for web (including audio settings).

By default, any transformation applied to the video (e.g., resizing) implicitly also uses the auto settings when delivering the transformed video, so using the auto codec setting is only needed when delivering the same format as originally uploaded but without any additional transformations. See vc (video_codec) in the Transformation URL API Reference for the default settings for each format.

Examples with the uploaded mp4 video named blue_sports_car:

  1. Setting the video codec to h264, the profile to baseline and the level to 3.1:

  2. Normalizing the video for web with the default settings:

  3. Setting the video codec to av1 for improved optimization:

Notes
  • Supported for: vp9, prores, h264 or h265. Only the h264 codec (mp4) has profile or level parameters, with profile: baseline, main or high and level: 3.0,3.1,4.0,4.1, 4.2, 5.0, 5.1 or 5.2.
  • The prores parameter value delivers videos encoded with the Apple ProRes 422HQ codec.
  • Client libraries can optionally enter the parameter as a structure. For example, in Ruby: video_codec: { codec: 'h264', profile: 'baseline', level: '3.1' }

HDR video transformations

High Dynamic Range (HDR) video provides expanded color gamut and luminance range, delivering more vivid and lifelike content compared to Standard Dynamic Range (SDR) video. Cloudinary supports HDR10 video transformation and delivery, allowing you to deliver your HDR10/HLG content while preserving the original color-grading and HDR metadata, or properly tone-map HDR to SDR on non-HDR devices. This ensures your original visual intent gets preserved in full HDR or gracefully mapped to SDR.

Requesting HDR output

To request HDR output of an HDR source video, you must use both the dynamic_range parameter set to high (dr_high in URLs) and the video_codec parameter set to h265 (vc_h265 in URLs).

Important
Cloudinary currently supports HDR10 and HLG formats only. When delivering these videos, Cloudinary performs direct transcoding, preserving the color-grading and HDR metadata from the source video. Other HDR formats (such as Dolby Vision and HDR10+) aren't supported directly unless they're compatible with HLG or HDR10, otherwise they're output as SDR.

Examples with an HDR video named docs/hdr_turtle:

  1. Request HDR output:

  2. Request HDR output with trimming and resizing:

Supported transformations

When delivering HDR videos, the following transformations are supported:

  • Trimming (so, eo, du)
  • Scaling (c_scale, w, h)
  • Cropping (c_crop, c_fill)
  • Text overlays (l_text)
  • Subtitles (l_subtitles)
  • Audio transformations (e_volume, codec, frequency, bitrate)

HDR and SDR output behavior

Understanding when Cloudinary delivers your videos as HDR versus SDR helps you optimize content for different viewing scenarios.

HDR output requirements

To deliver HDR video, you must meet all of the following conditions:

  • Compatible HDR input: The input video must be HLG or HDR10 compatible HDR with proper metadata tagging
  • Request HDR explicitly: You must explicitly request HDR output using the dr_high parameter
  • Set HEVC codec: You must set the video codec to HEVC (H.265) using vc_h265
  • High-quality source: The input must be a high-quality, progressive master

SDR output scenarios

Cloudinary delivers your video as SDR in the following cases:

  • SDR input: Standard dynamic range videos always output as SDR
  • HDR without explicit parameters: Cloudinary automatically tone-maps HLG/HDR10 compatible HDR input to SDR when you don't specify dr_high and vc_h265
  • Unsupported HDR formats: Cloudinary converts Dolby Vision and HDR10+ content to SDR (unless also compatible with HLG or HDR10)
  • Invalid or missing metadata: Improperly tagged or partially HDR content defaults to SDR processing
  • Incompatible transformations: If the requested transformation combination can't preserve HDR, Cloudinary returns an error and you need to adjust the transformation parameters to explicitly request SDR output.

Notes
  • Cloudinary processes HDR transformations asynchronously. The first request for an HDR derivative returns a 423 status code while Cloudinary generates the video. Subsequent requests return the processed HDR video once generation completes. To ensure that even the first customer request returns your HDR video, we recommend generating your HDR video transformations eagerly
  • Most modern displays and devices support HDR playback, but SDR fallback ensures compatibility with all devices.
  • If you're using the Cloudinary Video Player, you can enable HDR video delivery to automatically detect HDR-capable devices and apply the appropriate transformations.

Important
For HDR transformation pricing details, see HDR videos in How are transformations counted?.

Supported video formats

The table below summarizes the supported video formats.

Format Extensions Supported for Upload1 Supported for Delivery Default Codec
3G2 3g2 Yes
3GP (3rd Generation Partnership) 3gp Yes
AVI (Audio Video Interleave) avi Yes
FLV (Flash Video) flv Yes No 2
HLS adaptive streaming m3u8 Yes (as raw file only) Yes 3 Defined by streaming profile
MPEG-2 Transport Stream ts, m2ts, mts Yes Yes Defined by streaming profile
MOV mov Yes Yes h264
MKV (Matroska Multimedia Container) mkv Yes Yes
MP4 mp4 Yes Yes h264
MPEG-2 mpeg Yes
MPEG-DASH adaptive streaming mpd Yes (as raw file only) Yes 3 Defined by streaming profile
MXF (Material eXchange Format) mxf Yes
OGV (Ogg Video) ogv Yes Yes
WebM webm Yes Yes VP9 4
WMV (Windows Media Video) wmv Yes No

Footnotes
  1. If a format is only supported for upload, then the delivery URL enables a user to download the original file in its original format, but you cannot apply transformation parameters. If you want to apply transformations, you can transcode the video to a different format for delivery.
  2. The FLV format has been deprecated by Adobe, however you can deliver existing FLV files as other formats.
  3. For adaptive streaming manifest files (m3u8 and mpd), only those generated using Cloudinary can be used for delivery. See Adaptive Bitrate streaming for more information.
  4. The default codec for WebM is VP9. For older accounts the default is VP8. Submit a support request to change this default.

See also: supported audio formats.

✔️ Feedback sent!

Rate this page:

one star two stars three stars four stars five stars