Skip to main content

Video editable

{
"resources": {
"video_1": {
"source": {
"remote_url": "https://cdn.shakr.com/video_1.mp4"
},
"transform": {
"trim_strategy": "manual",
"trim_start_time": 0
}
}
}
}

How to customize source for video editable

Support remote_url only.

How to customize transform for video editable

Support trim_strategy for video editable. It only supports manual. Also, it requires trim_start_time to specify which part of the video to use. In case of video editable, crop will happening automatically based on frame of editable.

Image on a Video Editable

You can also put an image onto a video editable. In this case, a simple animation effect can be optionally applied. The first example, a mapping for video_1 editable, demonstrates placing an image onto a video editable, without applying an animation effect. The second one, a mapping for video_2 editable, illustrates how to apply an animation, with automatic image cropping.

{
"resources": {
"video_1": {
"source": {
"remote_url": "https://cdn.shakr.com/model.jpg"
},
"transform": {
"crop_x": 0,
"crop_y": 376,
"crop_width": 784,
"crop_height": 418,
"crop_strategy": "manual",
"animate_strategy": "none"
}
},
"video_2": {
"source": {
"remote_url": "https://cdn.shakr.com/product.png"
},
"transform": {
"crop_strategy": "cover",
"animate_strategy": "zoom-in",
"animate_speed": "moderate"
}
}
}
}

How to customize source for video editable

Provide remote_url with a URL which points to an image.

How to customize transform for video editable

Cropping an image

See Image editable for details. Please note that the manual crop strategy is not supported unless animate_strategy, which is described below, is set to none.

Animating an image

First, decide which animate_strategy to use. Currently the following strategies are supported:

  • none
  • slide-to-left
  • slide-to-right
  • slide-to-top
  • slide-to-bottom
  • zoom-in
  • zoom-out

If you decided not to animate your image, set it to none. Do not supply any other animation-related transform parameters.

Otherwise, you must also specify animate_speed. Possible values are slow, moderate, and fast.