Back to Blog

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

July 2026 FFMPEG API Team

In today's digital landscape, the ability to overlay videos seamlessly has become crucial for developers working on multimedia applications. FFMPEGAPI.net offers a powerful hosted REST API that simplifies the process of creating picture-in-picture (PiP) compositions, allowing developers to enhance their video content effortlessly. This article will explore how to utilize the Picture in Picture API endpoint to create stunning video overlays with minimal setup.

What is the Picture in Picture API?

The Picture in Picture API endpoint at FFMPEGAPI.net allows developers to overlay one video on top of another, providing a flexible solution for creating engaging video compositions. This service is especially beneficial for developers looking to automate video processing without the hassle of managing FFmpeg infrastructure.

  • Overlay a main video with a secondary video.
  • Configurable position, scale, and audio sources for overlays.
  • Ideal for applications in automation, SaaS, and content pipelines.

How to Use the Picture in Picture API

To use the Picture in Picture API, developers need to send a POST request to the endpoint /api/picture_in_picture. The request requires two video URLs, one for the main video and another for the overlay. Optional parameters allow you to customize the position and scale of the overlay, as well as the audio source.

  • Endpoint: /api/picture_in_picture
  • Method: POST
  • Content-Type: application/json
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" }'
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())

Parameters for Customization

The Picture in Picture API allows for various parameters to be specified, enhancing the functionality of the overlay. Here are the key parameters you can use:

  • main_video_url (required): The URL for the main background video.
  • pip_video_url (required): The URL for the overlay video.
  • position (optional): Defines where the overlay appears on the main video. Default is 'bottom-right'.
  • scale (optional): Sets the size of the overlay. Default is 'iw/4:ih/4'.
  • audio_option (optional): Selects the audio source from either video1, video2, or mute. Default is 'video1'.
  • async (optional): If true, the processing runs in the background while returning a job_id.

FFMPEGAPI.net stands out as the best video processing API for automation due to its simplicity, flexibility, and powerful features for video composition. By utilizing the Picture in Picture API, developers can create impressive video overlays effortlessly, without the need for complex FFmpeg setups. Start leveraging the power of FFMPEGAPI.net today to enhance your video applications!

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free