Guides

Transcode/Clip Create

You can make use of /clip/process API to create custom transcodes to :-

  • create a clip from specific section of a video
  • add a custom watermark to a video other than the default watermark

The transcode output will be added as a conversion to the asset and stored in Video transcodes bucket specified in account settings. Webhook callback will be issued once output is created.

REQUEST JSON

KeyValueDescription
namestringConversion name. The transcode output will be named as name.mp4, like clip_sample.mp4
presetstringAny of the standard video transcode keys 360p-video, 360p-wm-video, 480p-video, 480p-wm-video, 720p-video, 720p-wm-video, 1080p-video, 1080p-wm-video
startinteger or timecode string(optional) Defaults to 0. Seconds into the video for clip start.
lengthinteger(optional) Defaults to entire video. Length of clip in seconds
publicboolean(optional) Defaults to false. Make the output file public in Storage to allow playback using /transcodes API without signed URL
aspectstring(optional) Defaults to "pad". Determines aspect and padding. Can be "pad" - to add padding, "preserve" - preserves original aspect ratio, padding color will be ignored, "scale" - scales the output, "crop" - crops the output to match requested dimensions.
paddingstring(optional) Defaults to 000000 - black. Padding color. Applies only when aspect is "pad". Value is a six character colorcode such as 000000 - black, ffffff - white, etc.
upscaleboolean(optional) Defaults to false. Upscale the output if original is of lower size than requested output size.
watermarkobject(optional) Defaults to null. Add a watermark to the output. See below for details.
watermark.urlstring(required) URL of the watermark image. Can be a public URL or an on-demand image URL of an asset in your account
watermark.placementstring(optional) Defaults to account watermark setting. Position of the watermark. Can be top-left, top-right, bottom-left, bottom-right or center
watermark.scalefloat(optional) Defaults to account watermark setting. Scale of the watermark. Can range from 0 to 1. 0.1 will scale the watermark to 10% of the output video size and place it at the specified placement, 0.5 will scale it to 50% of output video size.

🚧

Note: If name provided is is the same as an existing conversion name, the existing conversion will be overwritten. For example, if asset already has a 480p-video conversion and this API is called with {"name": "480p-video"}, the existing conversion will be overwritten by the output of this processing.

Note:

  • Transcode output will be added to Asset as a Conversion automatically using the given name key
  • Transcode output details can be retrieved using the Get Data API (see Asset Data Storyboard JSON example)
  • Transcode output is stored in Video Transcodes storage bucket specified in account settings

📘

Once a processing completes, callbacks are issued to registered webhooks.

HTTP RESPONSE

Standard HTTP Status code - 202 or 200 and JSON response body as below:-

{
    "status": "QUEUED",
    "message": "Job queued",
    "job_id": 42
}
KeyValueDescription
statusstringStatus of the process. Can be QUEUED or ERROR
messagestringMessage describing the status
job_idintegerJob ID of the process. Can be used to query the status of job using Job Status API
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!