Video Options
Configure render-level video output with fps, quality, trim, subtitles, and multi-page combine transitions.
The videoOptions object controls render-level behavior when response.format is set to "mp4", "webm", or "gif".
For element-level video parameters (like {id}.trimStart, {id}.muted, and {id}.loop), see Video Elements.
All Options#
{
"videoOptions": {
"fps": 30,
"quality": 80,
"trimStart": 0,
"trimEnd": 20,
"duration": 8,
"muted": true,
"subtitleSource": "https://example.com/subtitles.srt",
"subtitleFontSize": "30px",
"subtitleColor": "#ffffff",
"subtitleBackground": "rgba(0,0,0,0.5)",
"subtitleFontFamily": "Inter, sans-serif",
"subtitleBottom": "50px",
"combinePages": true,
"pageTransition": "fade",
"pageTransitionDuration": 0.5
}
}Performance and Quality#
FPS#
videoOptions.fps- Type:
number - Range:
1to30 - Controls output frame rate.
Quality#
videoOptions.quality- Type:
number - Range:
1to100 - Higher values produce better visual quality with larger file size.
Trimming and Duration#
Trim Range#
videoOptions.trimStartvideoOptions.trimEnd- Type:
number(seconds)
When both are provided, output duration is calculated as trimEnd - trimStart.
For global output trim, provide both trimStart and trimEnd together.
Duration Fallback#
videoOptions.duration- Type:
number(seconds) - Used as a fallback duration when a trim range is not provided.
Audio#
Muted#
videoOptions.muted- Type:
boolean true: force mute output audiofalse: allow audio from available video elements
Subtitles#
Subtitle Source#
videoOptions.subtitleSource- Supported forms:
string: single source URL for single-page rendersarray: per-page source mapping for multi-page renders
Per-page format:
{
"videoOptions": {
"subtitleSource": [
{ "page": 1, "url": "https://example.com/intro.mp3" },
{ "page": 2, "url": "https://example.com/chapter-2.srt" }
]
}
}Subtitle Styling#
| Option | Type | Description |
|---|---|---|
subtitleFontSize | string | CSS size, e.g. "30px" |
subtitleColor | string | Subtitle text color |
subtitleBackground | string | Subtitle background color |
subtitleFontFamily | string | Subtitle font family |
subtitleBottom | string | Bottom offset, e.g. "50px" |
Multi-Page Combine Options#
Combine Pages#
videoOptions.combinePages- Type:
boolean - Combines multi-page video renders into one final video.
Page Transition#
videoOptions.pageTransition- Type:
string - Supported values:
fadefadeblackfadewhitedissolvewipeleftwiperightwipeupwipedownslideleftsliderightslideupslidedowncircleopencircleclosepixelize
- Omit or use
"none"for hard cuts.
Page Transition Duration#
videoOptions.pageTransitionDuration- Type:
number - Range:
0.1to2(seconds)
combinePages is supported only for multi-page mp4 and webm renders. GIF
renders always return per-page outputs.
Complete Request Example#
await fetch("https://api.orshot.com/v1/studio/render", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <YOUR_API_KEY>",
},
body: JSON.stringify({
templateId: "<YOUR_TEMPLATE_ID>",
modifications: {
"page1@title": "Intro",
"page2@title": "Features",
"page3@title": "CTA",
},
response: {
format: "webm",
type: "url",
includePages: [1, 2, 3],
},
videoOptions: {
fps: 30,
quality: 80,
muted: true,
combinePages: true,
pageTransition: "fade",
pageTransitionDuration: 0.5,
subtitleSource: [
{ page: 1, url: "https://example.com/intro.mp3" },
{ page: 2, url: "https://example.com/chapter2.mp3" },
],
subtitleFontSize: "30px",
subtitleColor: "#ffffff",
subtitleBackground: "rgba(0,0,0,0.5)",
},
}),
});
All Set? Let's Start Automating
- Image, PDF and Video Generation via API
- Canva like editor with AI and smart features
- No-Code Integrations (Zapier, Make, n8n etc.)
- Embed Orshot Studio in your app
- Start Free. No credit card required. Cancel anytime.