Create clip
Create an instant clip from on-going live stream. Instant clips are applicable in cases where there is no time to wait for the broadcast to be completed and recorded. For example, for quickly cutting highlights in sport events, or cutting an important moment in the news or live performance.
Instant clip becomes available for viewing in the following formats:
- HLS .m3u8,
- MP4,
- VOD in video hosting with a permanent link to watch video.
Clip lifetime: Instant clips are a copy of the stream, created from a live stream. They are stored in memory for a limited time, after which the clip ceases to exist and you will receive a 404 on the link. Limits that you should keep in mind:
- The clip’s lifespan is controlled by
expiration
parameter. - The default expiration value is 1 hour. The value can be set from 1 minute to 4 hours.
- If you want a video for longer or permanent viewing, then create a regular VOD based on the clip. This way you can use the clip’s link for the first time, and immediately after the transcoded version is ready, you can change by yourself it to a permanent link of VOD.
- The clip becomes available only after it is completely copied from the live stream. So the clip will be available after
start + duration
exact time. If you try to request it before this time, the response will be error code 425 “Too Early”.
Cutting a clip from a source:
In order to use clips recording feature, DVR must be enabled for a stream: “dvr_enabled
: true”.
The DVR serves as a source for creating clips:
- By default live stream DVR is set to 1 hour (3600 seconds). You can create an instant clip using any segment of this time period by specifying the desired start time and duration.
- If you create a clip, but the DVR expires, the clip will still exist for the specified time as a copy of the stream.
Getting permanent VOD:
To get permanent VOD version of a live clip use this parameter when making a request to create a clip: vod_required: true
.
Later, when the clip is ready, grab video_id
value from the response and query the video by regular GET /video/ method.
Authorizations
API key for authentication.
Path Parameters
Stream ID
Body
Response
Successful
The response is of type object
.