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

Video reshaping and rotating

Last updated: Jun-26-2026

Change the shape and orientation of your videos by rotating them or rounding their corners.

On this page:

Rotation

Rotate a video by any arbitrary angle in degrees with the angle parameter (a in URLs). A positive integer value rotates the video clockwise, and a negative integer value rotates the video counterclockwise. If the angle is not a multiple of 90 then a rectangular bounding box is added containing the rotated video and empty space.

Note
If either the width or height of a video exceeds 3000 pixels, the video is automatically downscaled first, and then rotated. This applies to the video that is the input to the rotation, be it the output of a chained transformation or the original video.

Other possible rotation values instead of an integer value include:

  • auto_right - Rotate the video 90 degrees clockwise only if the requested aspect ratio does not match the video's aspect ratio.
  • auto_left - Rotate the video 90 degrees counterclockwise only if the requested aspect ratio does not match the video's aspect ratio.
  • vflip - Vertical mirror flip of the video.
  • hflip - Horizontal mirror flip of the video.
  • ignore - By default, the video is automatically rotated according to the EXIF data stored by the camera when the video was taken. Set the rotation to 'ignore' if you do not want the video to be automatically rotated.

Note
To apply multiple values, separate each value with a dot (.). For example to horizontally flip the video and rotate it by 45 degrees: angle: hflip.45

Examples with the video with public ID: docs/hotel-slow-motion-waterfall:

  1. Rotate the video by 90 degrees:
  2. Rotate the video by -20 degrees (automatically adds a bounding box):
  3. Vertically mirror flip the video and rotate by 45 degrees (automatically adds a bounding box):
  4. Crop the video to a 1:1 aspect ratio circle, then rotate the video by 30 degrees (automatically adds a bounding box) and finally trim the extra whitespace that was added:


See full syntax: a (angle) in the Transformation Reference.

Try it out: Rotate.

Rounding

Transforming a video to a rounded version is done using the radius parameter (r in URLs) set to the number of pixels the radius of all four corners should be. For example, resizing the video to a width of 300 pixels and with rounded corners set to a radius of 30 pixels:

Cloudinary also supports cropping videos to the shape of an ellipse. Simply pass max as the value of the radius parameter. For example, resizing the video to a width of 300 pixels and with maximum radius cropping:

You can also change the background color of the video using the background parameter. If the width and height of the video are identical (i.e., the same value) then setting the radius parameter to max generates a circular video. For example, resizing the video to a width and height of 300 pixels, and with maximum radius cropping using a blue background:

The radius parameter is also used to round the corners of overlays, which are then also given a transparent background. For example, overlaying a man talking video with width and height set to 100 pixels, maximum radius cropping and north east gravity:


See full syntax: r (round corners) in the Transformation Reference.

Try it out: Round corners.

Related topics

✔️ Feedback sent!

Rate this page:

one star two stars three stars four stars five stars