Clip videos
With video clipping, also referred to as “trimming” or changing the length of the video, you can change the start and end points of a video so viewers only see a specific “clip” of the video. For example, if you have a 20 minute video but only want to share a five minute clip from the middle of the video, you can clip the video to remove the content before and after the five minute clip.
Refer to the Video clipping API documentation for more information.
Before you can clip a video, you will need an API token. For more information on creating an API token, refer to Creating API tokens.
To clip your video, determine the start and end times you want to use from the existing video to create the new video. Use the videoUID
and the start end times to make your request.
clippedFromVideoUID
: The unique identifier for the video used to create the new, clipped video.startTimeSeconds
: The timestamp from the existing video that indicates when the new video begins.endTimeSeconds
: The timestamp from the existing video that indicates when the new video ends.
You can check whether your video is ready to play after selecting your account from the Cloudflare dashboard ↗. While the clipped video processes, the video status response displays Queued. When the clipping process is complete, the video status changes to Ready and displays the new name of the clipped video and the new duration.
To receive a notification when your video is done processing and ready to play, you can subscribe to webhook notifications.
When you clip a video, you can also specify a new name for the clipped video. In the example below, the name
field indicates the new name to use for the clipped video.
When the video has been clipped and processed, your newly named video displays in your Cloudflare dashboard in the list videos.
You can also add a custom watermark to your video. For more information on watermarks and uploading a watermark profile, refer to Apply watermarks.
When clipping a video, you can make a video private and accessible only to certain users by requiring a signed URL.
After the video clipping is complete, you can open the Cloudflare dashboard and video list to locate your video. When you select the video, the Settings tab displays a checkmark next to Require Signed URLs.
You can also specify a thumbnail image for your video using a percentage value. To convert the thumbnail’s timestamp from seconds to a percentage, divide the timestamp you want to use by the total duration of the video. For more information about thumbnails, refer to Display thumbnails.