How do I overlay videos as picture-in-picture?

Use the Overlay Video tool to layer one video on top of another as picture-in-picture.

In-app method

  1. Click Tools on the left panel
  2. Select Overlay Video
  3. In the Input Files field, upload or paste your Base Video URL (bottom layer) and Overlay Video URL (top layer)
  4. Define your styling parameters like position (top video), margin, etc
  5. Hit Send Request

Note: The Position presets and X/Y options must not be used together. Use either, not both.

API method

Send a POST request to the /v5/tools/overlay_video  endpoint with a string of your "base_video_url"  and "overlay_video_url"  for layering.

var data = {
  "base_video_url": "https://cdn.bannerbear.com/sample_videos/base.mp4",
  "overlay_video_url": "https://cdn.bannerbear.com/sample_videos/pip.mp4",
  "x": 40,
  "y": 40,
  "scale": 0.3,
  "start": 1.0
}
fetch('https://api.bannerbear.com/v5/tools/overlay_video', {
  method: 'POST',
  body: JSON.stringify(data),
  headers: {
    'Content-Type' : 'application/json',
    'Authorization' : `Bearer ${API_KEY}`
  }
})

Start a Free Trial

Start a free trial with 30 API credits, no credit card required

Resize Video
Add Intro Animation
Add Subtitles

Get Started for Free