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 trimming

Last updated: Jun-08-2026

Use Cloudinary's video trimming options to keep a specific part of a video or audio clip. To join assets after trimming, see Video concatenation.

Trimming videos

Trim a video (and discard the rest) by using a combination of the following 3 parameters to specify the section of video to keep after trimming:

  • start_offset (so in URLs) specifies the start.
  • end_offset (eo in URLs) specifies the end.
  • duration (du in URLs) specifies the duration.

Possible values:

  • A float representing the time in seconds e.g. 5.44 (5 seconds and 440 milliseconds).
  • A string representing the percentage of the video length. This string consists of a number with a p appended e.g. 35p (0p is the first frame and 100p is the last frame). The client libraries also support appending a % instead of a p.

Examples:

  1. Trimming the video to the section that starts at 6.5 seconds and ends at 10 seconds:

  2. Trimming the video to the section that starts 10 percent into the original video and then lasts a duration of 30 percent (effectively from the 10 percent mark to the 40 percent mark):

Tip
If you want a video to play at a certain position but not trim the rest of the video out, use the HTML5 #t parameter in the video source.

For example, this URL starts playback of the docs/bathroom video at 4.5 seconds and stops it again at 10 seconds:

Try it out: Video trimming.

Video tutorial: Trim videos using the Node.js SDK

Watch this video tutorial to learn how to trim your videos using the Node.js SDK:

This video is brought to you by Cloudinary's video player - embed your own!
Use the controls to set the playback speed, navigate to chapters of interest and select subtitles in your preferred language.

Related topics

✔️ Feedback sent!

Rate this page:

one star two stars three stars four stars five stars