Video Elements

Control video playback, trimming, audio, and looping using dynamic parameters when generating videos.

Video element parameters let you control how video content behaves within your template — replace video sources, trim clips, control audio, and enable looping. These work through the same modifications system used for text and images.

Supported Parameters#

ParameterTypeDescription
{id}stringReplace the video URL
{id}.trimStartnumberStart time in seconds
{id}.trimEndnumberEnd time in seconds
{id}.mutedbooleantrue to mute, false to include audio
{id}.loopbooleantrue to loop the video

Where {id} is the parameter name of the video element in your template.

Replacing Video Sources#

Pass a new URL to swap the video content:

{
  "modifications": {
    "bgVideo": "https://example.com/new-video.mp4"
  },
  "response": {
    "format": "mp4",
    "type": "url"
  }
}

Supported Video Formats#

  • .mp4 (H.264 recommended)
  • .webm (VP9)
  • .mov

Trimming Video#

Extract a specific portion of a video by setting start and end times in seconds:

{
  "modifications": {
    "bgVideo": "https://example.com/long-video.mp4",
    "bgVideo.trimStart": 5,
    "bgVideo.trimEnd": 15
  },
  "response": {
    "format": "mp4"
  }
}

This extracts a 10-second clip from the 5-second mark to the 15-second mark.

Trim from the Start#

{
  "modifications": {
    "bgVideo.trimEnd": 10
  }
}

Takes the first 10 seconds of the video.

Trim from the End#

{
  "modifications": {
    "bgVideo.trimStart": 30
  }
}

Starts from the 30-second mark and plays to the end.

Audio Control#

Mute or include audio from video elements:

Mute Audio#

{
  "modifications": {
    "bgVideo": "https://example.com/video-with-audio.mp4",
    "bgVideo.muted": true
  }
}

Useful when you want to use the video as a visual background with separate voiceover or subtitles.

Keep Audio#

{
  "modifications": {
    "bgVideo": "https://example.com/interview.mp4",
    "bgVideo.muted": false
  }
}

Looping#

Enable looping for short clips that need to fill a longer duration:

{
  "modifications": {
    "bgVideo": "https://example.com/short-loop.mp4",
    "bgVideo.loop": true
  }
}

The video will repeat until the total render duration is reached.

Multi-Page Video Elements#

For multi-page templates rendered as video, control video elements on each page independently:

{
  "modifications": {
    "page1@introVideo": "https://example.com/intro.mp4",
    "page1@introVideo.trimEnd": 5,
    "page1@introVideo.muted": true,

    "page2@demoVideo": "https://example.com/demo.mp4",
    "page2@demoVideo.trimStart": 10,
    "page2@demoVideo.trimEnd": 25,
    "page2@demoVideo.muted": false,

    "page3@outroVideo": "https://example.com/outro.mp4",
    "page3@outroVideo.loop": true
  },
  "response": {
    "format": "mp4"
  }
}

Combining Parameters#

Use all video parameters together for full control:

{
  "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",
    "title.color": "#ffffff"
  },
  "response": {
    "format": "mp4",
    "type": "url"
  }
}

Example: Promo Video with Trimmed Clips#

const response = 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: "<PROMO_TEMPLATE>",
    modifications: {
      // Background video — trimmed to best 8 seconds
      bgVideo: "https://example.com/raw-footage.mp4",
      "bgVideo.trimStart": 12,
      "bgVideo.trimEnd": 20,
      "bgVideo.muted": true,

      // Overlay content
      headline: "Summer Sale — 50% Off",
      "headline.fontSize": "64px",
      "headline.color": "#ffffff",
      subtext: "Limited time only",
    },
    response: {
      format: "mp4",
      type: "url",
    },
    videoOptions: {
      subtitleSource: "https://example.com/voiceover.mp3",
      subtitleColor: "#ffffff",
      subtitleBackground: "rgba(0,0,0,0.5)",
    },
  }),
});

Render Costs#

Video rendering costs scale with the duration of the output video. Trimming a video reduces its duration and therefore its render cost — a shorter clip always uses fewer renders than a longer one.

Check your workspace usage dashboard for current render consumption and limits.

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.