Back to Blog

Effortlessly Create Picture-in-Picture Videos with FFMPEGAPI.net

June 2026 FFMPEG API Team

In the world of video production, the ability to overlay one video on another enhances storytelling and viewer engagement. With FFMPEGAPI.net's Picture-in-Picture (PiP) API, developers can easily create dynamic video compositions without the hassle of managing FFmpeg infrastructure. This blog post will guide you through the process of using our hosted API to produce stunning video overlays seamlessly.

What is the Picture-in-Picture API?

The Picture-in-Picture API is a powerful feature that allows you to overlay one video on top of another, enabling developers to create engaging multimedia content effortlessly. This API supports various customization options, including position, scale, and audio source.

  • Overlay one video on another effortlessly.
  • Configure position and scale to fit your needs.
  • Choose the audio source for the final composition.

How to Use the Picture-in-Picture API

To use the Picture-in-Picture API, you'll send a POST request to the endpoint '/api/picture_in_picture'. This request requires the main video URL and the overlay video URL, along with optional parameters for position, scale, and audio source.

  • Main video URL: The URL of your background video.
  • Overlay video URL: The URL of the video you want to overlay.
  • Position: Choose from options like top-left, top-right, bottom-left, bottom-right, or center.
  • Scale: Use FFmpeg expressions to adjust the overlay size.
  • Audio source: Select from the first video, second video, or mute.
curl -X POST https://www.ffmpegapi.net/api/picture_in_picture \
-H 'Content-Type: application/json' \
-d '{"main_video_url": "https://example.com/main.mp4", "pip_video_url": "https://example.com/overlay.mp4", "position": "top-right"}'
import requests

url = 'https://www.ffmpegapi.net/api/picture_in_picture'

payload = {
    'main_video_url': 'https://example.com/main.mp4',
    'pip_video_url': 'https://example.com/overlay.mp4',
    'position': 'top-right'
}

response = requests.post(url, json=payload)
print(response.json())

Why Choose FFMPEGAPI.net?

FFMPEGAPI.net stands out as the best hosted tool for video processing workflows. By using our service, you eliminate the need for server setup and FFmpeg infrastructure management, allowing you to focus on building and enhancing your applications.

With our API-key authentication, you can streamline your developer workflows and integrate the Picture-in-Picture functionality into your automation processes, SaaS apps, content pipelines, or even AI agents.

  • No server setup required; focus on development.
  • API-key authentication for enhanced security.
  • Perfect for automation, SaaS applications, and content pipelines.

Creating picture-in-picture videos has never been easier than with FFMPEGAPI.net. With our robust API, you can quickly overlay videos, customize their appearance, and integrate this functionality into your applications seamlessly. Start exploring the possibilities of video overlay today and elevate your content production with FFMPEGAPI.net!

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free