Instant live clipping for live streams
Learn how to generate instant video highlights from live streams by defining start and end times for real-time clipping.
What is instant live clipping?
Instant live clipping is the process of capturing and creating short video clips from a live stream as it happens. You define a start and end time on a FastPix playback URL, and FastPix returns a playable clip immediately. FastPix performs HLS (HTTP Live Streaming) manifest clipping without re-encoding, so clips are available in real time and keep the original video quality.
-
Live clipping is the process of capturing and creating short video clips from a live stream as it happens.
-
FastPix instant live clipping uses URL parameters and does not require re-encoding.
-
The maximum duration for a clip is 20 minutes.
Use cases
-
Highlight clip generation: Publish live stream highlight clips for quick recaps or sideline moments while the event is still broadcasting.
-
Pre-live content gating: Hide pre-roll dead air by starting playback at the first action once the stream has begun.
-
Post-live trimming: Create a clean VOD (video on demand) version by trimming pre-roll and post-roll segments without re-encoding.
-
Social media content creation: Generate short, shareable clips in seconds for social posts and stories.
How instant live clipping works
FastPix performs HLS manifest clipping, not video re-encoding. When you add start and end times to a FastPix playback URL:
-
FastPix trims the HLS manifest to the requested time range and references existing media segments.
-
Clipping operates with segment-level accuracy. If your requested times do not align with segment boundaries, FastPix snaps the start down to the nearest segment boundary and the end up to the nearest segment boundary. This preserves stream integrity and keeps playback smooth.
-
Because FastPix does not re-encode, clips are available instantly and keep the original bitrate ladder and codecs.
-
In DVR (digital video recording) mode, FastPix clips within the active DVR window only. If you request a time range outside the DVR window, the API returns a time range error.
Prerequisites
-
An active FastPix live stream or an existing VOD media
-
The playback ID for the stream or media
-
An HLS-compatible player
-
Optional: Signed playback enabled if you need restricted access
Set up a live stream
-
Create a live stream in the FastPix dashboard or by using the create stream API.
-
Start broadcasting to the FastPix ingest endpoint.
-
Use the playback ID to construct the Stream URL.
Your Stream URL looks like this:
https://stream.fastpix.io/><playbackId>.m3u8Generate a clip using URL parameters
You can create an instant clip by appending start and end query parameters (in seconds) to your Stream URL. Times are relative to the start of the live stream or to 0 for VOD medias.
Example:
https://stream.fastpix.io/{playbackId}.m3u8?start=10s&end=70sThis URL extracts a 60-second clip from second 10 through second 70.
-
The maximum duration for a clip is 20 minutes. If the requested duration exceeds 20 minutes, FastPix trims the clip to 20 minutes.
-
If you request an end time that is greater than the current live duration or outside the DVR window, FastPix returns a time range error.
Additional examples:
- Clip the first 30 seconds:
https://stream.fastpix.io/{playbackId}.m3u8?start=0&end=30
- Clip a 45-second moment later in the broadcast:
https://stream.fastpix.io/{playbackId}.m3u8?start=965&end=1010
Control clip access policy
Control the access policy of the generated on-demand clip by adding the clipAccess parameter to the same URL where you set start and end.
https://stream.fastpix.io/{PLAYBACK_ID}.m3u8?start=10&end=70&clipAccess=private-
If
clipAccess=private,only authorized users can play the generated clip. -
If
clipAccess=public, anyone with the playback URL can play the clip. -
If you omit
clipAccess, FastPix inherits the live stream’s access policy.
Recommendation:
Provide start, end, and clipAccess together in one request to avoid creating multiple clips for the same time range.
Retrieve and play back clips
When you generate a clip, FastPix stores it as on-demand media with its own playback ID. You can list previously generated clips by streamId using the list clips API.
-
Use the list clips API to retrieve all clips for a live stream.
-
Use the returned playbackId to construct a playback URL for any player.
Use the playbackId in a Stream URL:
https://stream.fastpix.io/{PLAYBACK_ID}.m3u8Share a browser-friendly playback page using the same playbackId:
https://play.fastpix.io/?playbackId={PLAYBACK_ID}Player integration
FastPix instant clip URLs work in any HLS-compatible player. Pass the full URL, including start, end, and optional clipAccess or token parameters.
- Safari and iOS (native HLS):
- Assign the URL directly to the video src:
<video controls src="https://stream.fastpix.io/{playbackId}.m3u8?start=10&end=70"></video>
- Assign the URL directly to the video src:
- hls.js:
- Load the URL as you would any HLS manifest:
const hls = new Hls(); hls.loadSource('https://stream.fastpix.io/{playbackId}.m3u8?start=10&end=70'); hls.attachMedia(videoElement);
- Load the URL as you would any HLS manifest:
- Video.js with HTTP Streaming:
- Configure the source URL with query parameters:
player.src({ src: 'https://stream.fastpix.io/{playbackId}.m3u8?start=10&end=70', type: 'application/x-mpegURL' });
- Configure the source URL with query parameters:
NOTE:
If you use signed playback, keep the token on the URL when you pass it to the player.
Security considerations
-
Signed URLs: Use signed playback for private clips. Append a token query parameter that encodes playback authorization and optional clip constraints:
https://stream.fastpix.io/{playbackId}.m3u8?start=10&end=70&clipAccess=private&token=eyJhbGciOi... -
JWT (JSON Web Token) claims for clipping: You can restrict clip time ranges at the token level. Supported claims include:
-
clip.start: Minimum allowed start time in seconds
-
clip.end: Maximum allowed end time in seconds
-
exp: Token expiration time
-
-
Risk without signing: Anyone who can see a public URL can modify start and end parameters. Use signed URLs or
clipAccess=privatefor sensitive content. -
Origin restrictions: Combine signed URLs with referer or domain restrictions for embedded players.
Clip time parameter guidelines
Follow these rules to avoid errors:
-
Use positive values only: start and end must be positive integers representing seconds on the timeline.
-
Valid time range:
-
For live streams: The requested range must fall within the content already broadcast and, if DVR is enabled, within the active DVR window.
-
For VOD medias: The requested range must be within the media duration.
-
-
Segment-level behavior:
-
FastPix snaps start down to the nearest segment boundary, and end up to the nearest boundary.
-
The displayed duration may be slightly longer than requested because of segment alignment.
-
-
Maximum duration: 20 minutes per clip request.
Limitations and constraints
-
Segment-level accuracy: Clips align to HLS segment boundaries, not video frames.
-
Maximum clip duration: 20 minutes per request.
-
DVR window: In DVR mode, you can clip only within the current DVR window.
-
Live edge: You cannot set end beyond the current broadcast position.
-
Concurrent requests: Very high clip request rates for the same stream can be rate-limited.
-
Formats: Instant clipping supports HLS only.
-
No re-encoding: You cannot change codecs, resolution, or bitrate ladder with instant clipping. Use media-based workflows if you need those changes.
Troubleshooting
-
400 invalid_time_range
- Cause: start or end is missing, negative, or start >= end.
- Fix: Provide positive integers and ensure start < end.
-
422 time_range_unavailable
- Cause: Requested time range exceeds the live duration or lies outside the DVR window.
- Fix: Query a smaller range within the available window or wait until more of the stream has been broadcast.
-
403 unauthorized
- Cause:
clipAccess=privatewithout authorization, or invalid/expired token. - Fix: Provide a valid signed token or set an appropriate access policy.
- Cause:
-
404 stream_or_media_not_found
- Cause: playbackId or streamId is invalid or deleted.
- Fix: Verify identifiers before requesting a clip.
-
Clip start looks offset by a few seconds
- Cause: Segment-level accuracy.
- Fix: Adjust start backward by one segment if you need earlier context.
FAQs
Does FastPix instant clipping require re-encoding?
No. FastPix performs HLS manifest clipping without re-encoding. This makes clips available immediately and preserves original quality.
How accurate are instant live clips?
Clips use segment-level accuracy. FastPix snaps start down to the nearest segment boundary and end up to the next boundary. This can add a small buffer around the requested times.
Can I clip a live stream while it is still broadcasting?
Yes. You can create an instant clip from a live stream as soon as the requested segment data exists in the HLS manifest.
What is the maximum clip duration?
The maximum duration for a clip is 60 seconds.
How do I make a clip private?
Add clipAccess=private to the URL or use signed playback tokens. For strict control, combine both.
Can I generate thumbnails from a clip time range?
Yes. Use the thumbnail and storyboard endpoints to request images for any time within the clip’s range.
What is the difference between instant clipping and media-based clipping?
Instant clipping uses HLS manifest trimming with no re-encoding and returns clips immediately. Media-based clipping renders new media files, supports frame-accurate edits and format changes, and takes longer to process.
Can I use instant clipping with a video player?
Yes. Pass the full FastPix HLS URL, including start and end, to any HLS-compatible player such as Safari, hls.js, or Video.js.
What happens to my clip after the live stream ends?
FastPix stores the clip as on-demand media with its own playbackId. You can list and play it at any time, subject to its access policy.
Can instant clipping be used before a live stream starts?
No. You cannot clip content before the stream has broadcast any segments. You can gate pre-roll by starting at a later time once the stream begins.
How does DVR mode affect clipping?
You can only clip content within the configured DVR window. Requests outside the window return a time range error.
What happens if the specified time exceeds the live stream duration?
FastPix returns a time range error. Reduce the end time or wait for more of the stream to be broadcast.
Updated about 2 months ago