Render object

A render object is a set of instructions that describes which edits should be applied to your file.

Render

field

required

type

description

params

optional

RenderParams

Render parmeters such as dimensions ,background_color etc.

elements

required

[RenderElement]

Elements contained in the render such as video, image , audio etc.

Example Render Object
{
"params": {
"dimensions": {
"width": 1920,
"height": 1080,
},
"background_color": "#00000",
"duration": 20000
},
"elements": [
{
"type": "video",
"params": {
"source": {
"url": "https://cdn.veed.dev/380rreVE_9uhiksitOGIW.mp4"
},
"duration": {
"from": 0.0,
"to": 10.0
},
"position": {
"origin": "top left",
"x": 0,
"y": 0
}
}
},
{
"type": "image",
"params": {
"source": {
"asset_id": "28a510a8-6690-4cdc-b319-e0e02ebf1a2e"
},
"duration": {
"from": 0.0,
"to": 10.0
},
"position": {
"origin": "top left",
"x": 0,
"y": 0
}
}
}
]
}

RenderParams

field

required

type

description

dimensions

optional

object

width and height of resulting render

background_color

optional

string

hex color value for the background color default: #000000

duration

optional

string

duration of render in milisecondsdefaults to end of last element to be displayed

RenderParams
{
"dimensions": {
"width": 1920,
"height": 1080,
},
"background_color": "#00000",
"duration": 20000
}

RenderElement

field

required

type

description

type

required

string

One of video ,audio ,image ,progress_bar ,audio_wave

params

required

object

Provide necessary parameters for each element type

RenderElement
{
"type": "...",
"params": { ... }
}

Element types

Video

field

required

type

description

source

required

object

Either url or asset_id

trim

optional

object

from and to time values defaults to no trim

duration

optional

object

from and to time values defaults to { from: 0, to: video length }

crop

optional

object

x, y, width and height coordinate values defaults to no crop

dimensions

optional

object

width and 'height' pixel values defaults to source video width & height

position

optional

object

origin,xand y coordinates defaults to { origin: "top left", x: 0, y: 0 }

z_index

optional

integer

Overrides the element order defaults to index in elements array

rotation

optional

float

Video rotation in degrees min 0 max 360, defaults to 0

volume

optional

float

If video has audio, sets volume value inside rendermin 0 max 1, defaults to 1

playback_rate

optional

float

Used to speed up or slow down video default to 1

loop

optional

boolean

Loops video after playback finishesdefaults to false

filters

optional

object

brightness, contrast, saturation and exposure float values

effects

optional

enum

One of vhs, glitch, old

Video Element
{
"type": "video",
"params": {
"source": {
"asset_id": "28a510a8-6690-4cdc-b319-e0e02ebf1a2e"
},
"trim": {
"from": 0.0,
"to": 10.0
},
"duration": {
"from": 0.0,
"to": 10.0
},
"crop": {
"x": 0,
"y": 0,
"width": 1920,
"height": 1080
},
"dimensions": {
"width": 1920,
"height": 1080
},
"position": {
"origin": "top left",
"x": 0,
"y": 0
},
"z_index": 0,
"rotation": 0.0,
"volume": 1.0,
"playback_rate": 1.0,
"loop": false,
"filters": {
"brightness": 1.0,
"contrat": 1.0,
"saturation": 1.0,
"exposure": 0.0
},
"effect": "vhs",
}
}

Audio

field

required

type

description

source

required

object

Either url or asset_id

trim

optional

object

from and to time values defaults to no trim

duration

optional

object

from and to time values defaults to { from: 0, to: audio length }

volume

optional

float

If video has audio, sets volume value inside rendermin 0 max 1, defaults to 1

playback_rate

optional

float

Used to speed up or slow down video default to 1

loop

optional

boolean

Loops audio after playback finishes defaults to false

Audio Element
{
"type": "audio",
"params": {
"source": {
"asset_id": "dfa8b101-2587-45b6-ac83-fd6d9ce24dfa"
},
"trim": {
"from": 0.0,
"to": 10.0
},
"duration": {
"from": 0.0,
"to": 10.0
},
"volume": 1.0,
"playback_rate": 1.0,
"loop": false
}
}

Image

field

required

type

description

source

required

object

Either url or asset_id

duration

optional

object

from and to time values defaults to { from: 0, to: render length }

crop

optional

object

x, y, width and height coordinate values defaults to no crop

dimensions

optional

object

'width' and 'height' pixel values defaults to source image width & height

position

optional

object

origin,xand y coordinates defaults to { origin: "top left", x: 0, y: 0 }

z_index

optional

integer

Overrides the element order defaults to index in elements array

rotation

optional

float

Image rotation in degrees min 0 max 360, defaults to 0

Image Element
{
"type": "image",
"params": {
"source": {
"asset_id": "28a510a8-6690-4cdc-b319-e0e02ebf1a2e"
},
"duration": {
"from": 0.0,
"to": 10.0
},
"crop": {
"x": 0,
"y": 0,
"width": 1920,
"height": 1080
},
"dimensions": {
"width": 1920,
"height": 1080
},
"position": {
"origin": "top left",
"x": 0,
"y": 0
},
"z_index": 0,
"rotation": 0.0
}
}

Text

field

required

type

description

value

required

string

Text to display

style

optional

object

font, size, display, color, secondary_color, align, emphasis, wrap, wrap_width, line_height and letter_spacing

duration

optional

object

from and to time values defaults to { from: 0, to: video length }

position

optional

object

origin,xand y coordinates defaults to { origin: "top left", x: 0, y: 0 }

z_index

optional

integer

Overrides the element order defaults to index in elements array

rotation

optional

float

Video rotation in degrees min 0 max 360, defaults to 0

Text Element
{
"type": "text",
"params": {
"value": "New Text",
"style": {
"font": "Helvetica",
"size": 48.0,
"display": "normal",
"color": "#000000",
"secondary_color": "#ffffff",
"align": "left",
"wrap": "wrap",
"wrap_width": 0.5,
"line_height": 0.0,
"letter_spacing": 0.0
},
"duration": {
"from": 0.0,
"to": 10.0
},
"position": {
"origin": "top left",
"x": 0,
"y": 0
},
"z_index": 0,
"rotation": 0.0
}
}

Progress Bar

field

required

type

description

style

optional

object

color, secondary_color and type

duration

optional

object

from and to time values defaults to { from: 0, to: video length }

dimensions

optional

object

'width' and 'height' pixel values defaults to source video width & height

position

optional

object

origin,xand y coordinates defaults to { origin: "top left", x: 0, y: 0 }

z_index

optional

integer

Overrides the element order defaults to index in elements array

rotation

optional

float

Video rotation in degrees min 0 max 360, defaults to 0

Progress Bar Element
{
"type": "progress_bar",
"params": {
"style": {
"color": "#000000",
"secondary_color": "#ffffff",
"type": "normal"
},
"duration": {
"from": 0.0,
"to": 10.0
},
"dimensions": {
"width": 1920,
"height": 200
},
"position": {
"origin": "top left",
"x": 0,
"y": 0
},
"z_index": 0,
"rotation": 0.0
}
}

Audio Wave

field

required

type

description

style

optional

object

color, secondary_color and type

fft

optional

object

min_db and max_db

duration

optional

object

from and to time values defaults to { from: 0, to: video length }

dimensions

optional

object

'width' and 'height' pixel values defaults to source video width & height

position

optional

object

origin,xand y coordinates defaults to { origin: "top left", x: 0, y: 0 }

z_index

optional

integer

Overrides the element order defaults to index in elements array

rotation

optional

float

Video rotation in degrees min 0 max 360, defaults to 0

Audio Wave Element
{
"type": "audio_wave",
"params": {
"style": {
"color": "#000000",
"secondary_color": "#ffffff",
"type": "simi"
},
"fft": {
"min_db": -10,
"max_db": -120,
}
"duration": {
"from": 0.0,
"to": 10.0
},
"dimensions": {
"width": 1920,
"height": 200
},
"position": {
"origin": "top left",
"x": 0,
"y": 0
},
"z_index": 0,
"rotation": 0.0
}
}