API & Integration -> RenderScript

Top-level properties in RenderScript

These are the top-level properties that make up a RenderScript JSON file.

Output format

The file format for the rendered output. Use 'mp4' for videos, 'jpg' or 'png' for static images, and 'gif' for animated images.

Example

"output_format": "mp4",

Default

"output_format": "jpg",

Render dimensions

The width and height in pixels for the rendered output. When omitted, uses the dimensions of the first input media file.

Example

"width": 1280, "height": 720,

Defaults

"width": null, "height": null,

Frame rate

Frame rate in fps for video output, at most 60. Defaults to the highest frame rate among input videos, or 60 fps if no videos are present. A GIF is rendered at 15 fps at most.

Example

"frame_rate": 25,

Default

"frame_rate": null,

Duration

Duration of the output video in seconds. When omitted, automatically calculated based on element timing and content.

Example

"duration": 10,

Default

"duration": null,

Background

The color behind all elements. The default is black. A gradient uses the same fill_mode, fill_x0, fill_y0, fill_x1, fill_y1 and fill_radius properties as a shape, with fill_color as an array of color stops.

Example

"fill_color": "#ffffff",

Default

"fill_color": "#000000",

GIF settings

For a GIF output. loop plays the animation again and again; false plays it once. gif_quality 'best' builds a color palette for the GIF, which looks better and takes longer; 'fast' or null skips it. gif_compression, from 0 to 200, shrinks the file with lossy optimization; 0 or null leaves it as encoded.

Example

"loop": true, "gif_quality": "best", "gif_compression": 80,

Defaults

"loop": false, "gif_quality": null, "gif_compression": null,

Fonts

Custom fonts for the text elements, one entry per font file: 'family' is the name text elements refer to, 'weight' (default 400) and 'style' ('normal' or 'italic') the variant the file holds, and 'source' the file's URL or the ID of an uploaded file. OTF, TTF and WOFF are supported. See Use a custom font.

Example

"fonts": [   {     "family": "Coolvetica Rg",     "weight": 400,     "style": "normal",     "source": "https://cdn.creatomate.com/demo/coolvetica-rg.otf"   } ],

Default

"fonts": [],

Snapshot settings

Controls where a preview image is created from the video. 'snapshot_time' specifies the time in seconds within the video to capture the image. By default, the snapshot image is exported alongside the video output as a JPEG file, but 'snapshot_location' can be used to replace either the first frame ('start') or last frame ('end') of the video instead.

Example

"snapshot_time": 5.5, "snapshot_location": "start",

Defaults

"snapshot_time": null, "snapshot_location": null,

Emoji style

Sets the emoji design style used throughout the render. Available options are 'facebook', 'google', 'twitter', or 'apple'.

Example

"emoji_style": "apple",

Default

"emoji_style": "facebook",

Elements

An array of elements that make up this video or image.

Example

"elements": [   {     "type": "text",     "text": "Hello, world!",     "fill_color": "#ffffff"   } ],

Default

"elements": [],