Video trimming
Last updated: Sep-06-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.
video asset type in Cloudinary, because an audio file is essentially a video file without a visual element. Many of the transformations described on this page work on audio files as well, and you can combine audio and video assets in the same URL. For a summary of which transformations apply to audio, see Which video transformations apply to audio.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(soin URLs) specifies the start. -
end_offset(eoin URLs) specifies the end. -
duration(duin 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
pappended e.g.35p(0p is the first frame and 100p is the last frame). The client libraries also support appending a%instead of ap.
Examples:
-
Trimming the video to the section that starts at 6.5 seconds and ends at 10 seconds:
-
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):
#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:
Trimming audio
Trim audio files with the same three parameters used for trimming videos, start_offset (so), end_offset (eo), and duration (du), in seconds or as a percentage of the track's length. For example, to keep the section of the docs/franck/audio/piano_low track that starts at 2 seconds and ends at 8 seconds:
To join trimmed audio files together, see Concatenate audio files.
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.