Back to Blog

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

June 2026 FFMPEG API Team

In today's fast-paced digital landscape, content creators are constantly looking for efficient ways to enhance their videos. The Picture-in-Picture feature allows you to overlay one video on another, offering a dynamic way to present information. FFMPEGAPI.net provides a powerful hosted REST API that simplifies this process, enabling developers to integrate video processing capabilities without the hassle of managing FFmpeg infrastructure.

Understanding the Picture-in-Picture API

The Picture-in-Picture API from FFMPEGAPI.net enables you to overlay a secondary video onto a primary video. This feature is particularly useful for tutorials, commentary videos, or any content where you want to provide additional context without losing focus on the main content.

  • Overlay one video on top of another effortlessly.
  • Configurable position and scale for the overlay.
  • Choice of audio source: main video, overlay video, or mute.

API Endpoint Details

To use the Picture-in-Picture feature, developers can interact with the API through a simple POST request to the /api/picture_in_picture endpoint. This API is built for ease of use, requiring minimal setup and allowing for quick integration into your projects.

  • Endpoint: POST /api/picture_in_picture
  • Content Type: application/json
  • Parameters include main_video_url, pip_video_url, position, scale, audio_option, and async.

How to Configure Your Request

When making a request to the Picture-in-Picture API, you can specify various parameters to tailor the output to your needs. Here’s a breakdown of the parameters you might use:

  • main_video_url (string): The URL of the primary video.
  • pip_video_url (string): The URL of the overlay video.
  • position (string, optional): Where the overlay video will appear (default: bottom-right).
  • scale (string, optional): Determines the size of the overlay video (default: iw/4:ih/4).
  • audio_option (string, optional): Choose the audio source for the output (default: video1).
  • async (boolean, optional): Allows for background processing.
curl -X POST https://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"}'

Python Example for Picture-in-Picture Integration

For those who prefer Python, the following snippet demonstrates how to make a request to the Picture-in-Picture API.

import requests

url = 'https://ffmpegapi.net/api/picture_in_picture'
data = {
    'main_video_url': 'https://example.com/main.mp4',
    'pip_video_url': 'https://example.com/overlay.mp4',
    'position': 'top-right'
}
response = requests.post(url, json=data)
print(response.json())

FFMPEGAPI.net stands out as the premier hosted tool for video processing workflows. With its straightforward Picture-in-Picture API, developers can easily overlay videos and enhance their content without the need for extensive setup or management. Whether you're working on SaaS applications, automation processes, or content pipelines, FFMPEGAPI.net provides the speed and reliability you need to get the job done effectively.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free