Back to Blog

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

June 2026 FFMPEG API Team

In the world of video production and content creation, overlays such as picture-in-picture (PiP) can enhance storytelling and viewer engagement. However, managing FFmpeg installations locally can be daunting for developers. FFMPEGAPI.net offers a cloud-based solution that simplifies this process. In this article, we’ll guide you through using our Picture in Picture API to overlay videos effortlessly.

What is the Picture in Picture API?

The Picture in Picture API endpoint provided by FFMPEGAPI.net allows developers to overlay one video onto another, creating an engaging viewing experience. This tool is especially useful for content creators, educators, and developers who need to add context or commentary to main video content.

  • Overlay a secondary video onto a primary video.
  • Configurable position, scale, and audio settings.
  • Ideal for tutorials, reviews, and live streams.

How to Use the Picture in Picture API

Using the Picture in Picture API is straightforward. To get started, you need to send a POST request to the '/api/picture_in_picture' endpoint. This allows you to specify the main video and the overlay video along with their parameters.

  • Define the main video URL.
  • Specify the overlay video URL.
  • Choose the position and scaling for the overlay.
  • Select the desired audio source.
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

FFMPEGAPI.net’s Picture in Picture API allows you to customize several parameters to suit your needs.

Here are the key parameters you can configure:

  • main_video_url: The URL of the main video (required).
  • pip_video_url: The URL of the overlay video (required).
  • position: Choose from top-left, top-right, bottom-left, bottom-right, or center (default is bottom-right).
  • scale: Defines the size of the overlay video (default is iw/4:ih/4).
  • audio_option: Selects the audio source (default is video1).
  • async: Option to process the request in the background.

In conclusion, FFMPEGAPI.net is the perfect hosted alternative for developers looking to integrate video processing capabilities into their applications without the hassle of managing FFmpeg infrastructure. With the Picture in Picture API, you can easily create engaging video content using just a few lines of code. Explore our API today and see how it can streamline your video workflows!

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free