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".

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: 1 to 30
  • Controls output frame rate.

Quality#

  • videoOptions.quality
  • Type: number
  • Range: 1 to 100
  • Higher values produce better visual quality with larger file size.

Trimming and Duration#

Trim Range#

  • videoOptions.trimStart
  • videoOptions.trimEnd
  • Type: number (seconds)

When both are provided, output duration is calculated as trimEnd - trimStart.

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 audio
  • false: allow audio from available video elements

Subtitles#

Subtitle Source#

  • videoOptions.subtitleSource
  • Supported forms:
    • string: single source URL for single-page renders
    • array: 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#

OptionTypeDescription
subtitleFontSizestringCSS size, e.g. "30px"
subtitleColorstringSubtitle text color
subtitleBackgroundstringSubtitle background color
subtitleFontFamilystringSubtitle font family
subtitleBottomstringBottom 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:
    • fade
    • fadeblack
    • fadewhite
    • dissolve
    • wipeleft
    • wiperight
    • wipeup
    • wipedown
    • slideleft
    • slideright
    • slideup
    • slidedown
    • circleopen
    • circleclose
    • pixelize
  • Omit or use "none" for hard cuts.

Page Transition Duration#

  • videoOptions.pageTransitionDuration
  • Type: number
  • Range: 0.1 to 2 (seconds)

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

Get Your API Key →
  • 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.