Video element parameters allow you to dynamically control video content, playback settings, and trim points when rendering templates as video. You can pass custom video URLs and configure playback behavior at render time.
Video parameters only apply when rendering templates with video elements as MP4, WebM, or GIF formats.
When you add a video element to your template and set a parameter ID (e.g., bgVideo), you can override its properties using the format:
parameterID.property| Parameter | Type | Description |
|---|---|---|
{id} | string | Custom video URL to replace the template video |
{id}.trimStart | number | Start time in seconds |
{id}.trimEnd | number | End time in seconds |
{id}.muted | boolean | true to mute audio, false to include audio |
{id}.loop | boolean | true to loop the video |
Pass a custom video URL using the parameter ID:
{
"modifications": {
"bgVideo": "https://example.com/custom-video.mp4"
},
"response": {
"format": "mp4"
}
}Control which portion of the video to use:
{
"modifications": {
"bgVideo": "https://example.com/video.mp4",
"bgVideo.trimStart": 5,
"bgVideo.trimEnd": 15
},
"response": {
"format": "mp4"
}
}This extracts a 10-second clip from 5s to 15s of the source video.
Include or exclude audio from the video:
{
"modifications": {
"bgVideo": "https://example.com/video.mp4",
"bgVideo.muted": false
},
"response": {
"format": "mp4"
}
}GIF format does not support audio. The muted parameter is ignored for GIF
outputs.
Loop a short video to fill the duration:
{
"modifications": {
"bgVideo": "https://example.com/short-clip.mp4",
"bgVideo.loop": true
},
"response": {
"format": "mp4"
}
}Combine all video parameters:
{
"templateId": "your-template-id",
"modifications": {
"bgVideo": "https://example.com/product-demo.mp4",
"bgVideo.trimStart": 0,
"bgVideo.trimEnd": 10,
"bgVideo.muted": false,
"bgVideo.loop": false,
"title": "Product Launch",
"title.fontSize": "48px"
},
"response": {
"type": "url",
"format": "mp4"
}
}For templates with multiple pages containing videos, prefix with the page number:
{
"modifications": {
"page1@introVideo": "https://example.com/intro.mp4",
"page1@introVideo.trimEnd": 5,
"page2@demoVideo": "https://example.com/demo.mp4",
"page2@demoVideo.muted": true
},
"response": {
"format": "mp4"
}
}Video parameters work alongside other dynamic parameters:
{
"modifications": {
"bgVideo": "https://example.com/video.mp4",
"bgVideo.trimStart": 2,
"bgVideo.trimEnd": 12,
"overlayText": "Summer Collection",
"overlayText.fontSize": "64px",
"overlayText.color": "#ffffff",
"logo": "https://example.com/logo.png"
},
"response": {
"format": "mp4"
}
}curl -X POST https://api.orshot.com/v1/studio/render \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "video-template-id",
"modifications": {
"productVideo": "https://example.com/product.mp4",
"productVideo.trimStart": 0,
"productVideo.trimEnd": 15,
"productVideo.muted": false,
"headline": "New Arrival",
"headline.fontSize": "56px"
},
"response": {
"type": "url",
"format": "mp4"
}
}'The output video duration is determined by:
trimEnd - trimStart in secondsVideo generation is billed at 8 renders per second of output video. For example:
Orshot accepts the following video URL formats:
.mp4 (H.264 recommended).webm (VP9).movEnsure your video URLs are publicly accessible for Orshot to fetch and process them.
Issue: Output video shows static image instead of video
Solutions:
response.format is set to mp4, webm, or gifIssue: Output video has no audio
Solutions:
{videoId}.muted to falseresponse.format is not gifIssue: Video doesn't respect trim settings
Solutions:
trimStart is less than trimEnd