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.
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:
- 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
autoformat is requested using thefetch_format(f_) transformation parameter). - SDK major versions with initial release later than January 2020 have a
formattransformation parameter, instead of thefetch_formatparameter. 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:
-
Setting the video codec to h264, the profile to baseline and the level to 3.1:
-
Normalizing the video for web with the default settings:
-
Setting the video codec to av1 for improved optimization:
- Supported for:
vp9,prores,h264orh265. Only theh264codec (mp4) has profile or level parameters, with profile:baseline,mainorhighand level:3.0,3.1,4.0,4.1,4.2,5.0,5.1or5.2. - The
proresparameter 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).
Examples with an HDR video named docs/hdr_turtle:
-
Request HDR output:
-
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_highparameter -
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_highandvc_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.
- Cloudinary processes HDR transformations asynchronously. The first request for an HDR derivative returns a
423status 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.
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 |
- 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.
- The FLV format has been deprecated by Adobe, however you can deliver existing FLV files as other formats.
- 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.
- 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.