FastPix lets you extract clips from existing on-demand assets for content repurposing and social sharing, pull highlights, promotional snippets, or chaptered segments without re-uploading the source video.
Clips are useful for promotional snippets, social cut-downs, chaptered highlights, and ad-supported segment extraction from longer HLS assets.
This guide explains how to create shorter video clips from media that’s already uploaded to FastPix. You can extract any segment from a video by specifying a start time and end time.
mediaId in the same workspace. A mediaId is the unique identifier FastPix assigns to every on-demand asset when you upload or create it.accessPolicy. The accessPolicy field controls who can play the resulting clip: public means anyone with the playbackId can stream it, and private restricts playback to signed URLs.FastPix treats every clip as a new on-demand asset derived from a parent mediaId. When you create a clip, FastPix transcodes the requested segment, generates its own HLS renditions, and assigns a fresh mediaId and playbackId. The playbackId is a separate, access-controlled identifier used to build the stream URL https://stream.fastpix.com/<playbackId>.m3u8.
Both the source and the clip must live in the same workspace. FastPix cuts on the nearest keyframe (GOP boundary) to your requested startTime and endTime, so the resulting duration can differ from the exact values you send by a few hundred milliseconds depending on the source GOP size.
A media ID looks like this: 5cfe8b2d-1c3a-4685-bd05-10fbc54c0015
POST to https://api.fastpix.com/v1/on-demand. In the inputs array, set type to video and url to fp_mediaId://{Media_ID}. Provide startTime and endTime in seconds. Omit them to clone the full source duration.Request body:
NOTE
In the request, replace{Media_ID}with your sourcemediaId.
Response:
FastPix returns the new mediaId, the sourceMediaId (your parent asset), and an array of playbackIds with their access configuration.
NOTE
You can create an unlimited number of clips from a single sourcemediaId. Each clip is a new on-demand asset, so on-demand video pricing applies for encoding, storage, and delivery.
readyClip encoding happens asynchronously. The clip’s status starts as "Created" and changes to "Ready" when it’s available for playback.
The most reliable way to detect when a clip is ready is with webhooks. Listen for the video.media ready event on your webhook endpoint. See Set up webhooks for instructions.
Alternatively, poll the Get media by ID endpoint and check the status field. Don’t poll more than once per second.
After the clip status is "Ready", create a playback URL using the playback ID from the response:
You can use this URL with any HLS-compatible player, including the FastPix player.
If you prefer a visual interface, you can create clips directly from the FastPix dashboard without writing any code.
To create a clip from the dashboard, you need to:


Click Create Clip. FastPix processes and encodes the segment.

The clip appears in your Media list as a new entry. Select it to view its Playback IDs and confirm its access settings.

Call the Get all clips of a media endpoint with the source mediaId to list every clip derived from that parent. The response returns each clip’s id, duration, status, thumbnail, and its playbackIds with accessPolicy.
Replace {ACCESS_TOKEN_ID} and {SECRET_KEY} with your actual values.
Request:
Response:
Are FastPix clips frame-accurate?
FastPix cuts on the nearest keyframe (GOP boundary) to the startTime and endTime you provide. The final clip duration can differ from the exact requested values by a few hundred milliseconds depending on the source GOP size. For tighter cuts, re-encode the source with a shorter GOP before clipping.
What happens to a clip if I delete the source media?
Each clip is an independent on-demand asset with its own mediaId, playbackId, and stored renditions. Deleting the source mediaId does not delete existing clips, and deleting a clip does not affect the source.
Can I create multiple clips from one source in a single request?
No. One POST to the create media endpoint produces one clip. To create clips in bulk, issue one request per segment — typically in parallel from your application code. Each clip is billed as a separate on-demand asset.
Does clipping work on live-to-VOD recordings?
Yes. Once a live stream has produced an on-demand recording with a mediaId, you can clip it the same way as any other source asset using fp_mediaId://<mediaId>.