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. Defaults to the highest frame rate among input videos, or 60 fps if no videos are present.

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,

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": [],