Back to Blog

Effortless Picture-in-Picture Video Compositions with FFMPEGAPI.net

June 2026 FFMPEG API Team

In today's digital world, creating engaging video content is crucial for businesses and developers alike. The Picture-in-Picture feature is an exciting way to display multiple video feeds in a single screen. Using FFMPEGAPI.net's hosted REST API, you can integrate this functionality into your applications without the hassle of managing FFmpeg infrastructure.

Understanding the Picture-in-Picture Feature

Picture-in-Picture (PiP) allows users to watch a main video while an overlay video plays simultaneously, enhancing viewer engagement. This feature is particularly beneficial for video tutorials, live streams, and presentations.

  • Display multiple video streams in a single interface.
  • Enhanced viewer experience and engagement.
  • Ideal for SaaS applications and content pipelines.

How to Use the Picture-in-Picture Endpoint

FFMPEGAPI.net provides a straightforward API endpoint to create picture-in-picture compositions. Here’s how you can achieve this effortlessly.

The endpoint you will use is POST /api/picture_in_picture, which accepts JSON input to configure your video composition.

  • Easily overlay one video on another.
  • Customize position and scale of the overlay.
  • Choose audio source options between videos.
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())

Key Parameters for the Picture-in-Picture API

To effectively use the Picture-in-Picture API, you need to understand the key parameters:

Each parameter allows you to customize the behavior of the video composition.

  • main_video_url: Required - the URL of the main video.
  • pip_video_url: Required - the URL of the overlay video.
  • position: Optional - where to place the overlay on the screen (default: bottom-right).
  • scale: Optional - adjust the size of the overlay video (default: iw/4:ih/4).
  • audio_option: Optional - choose the audio source (default: video1).
  • async: Optional - run the process in the background.

FFMPEGAPI.net simplifies the process of video composition with its hosted REST API. Whether you're developing a SaaS application, automating media processing, or integrating video features into your projects, our Picture-in-Picture API provides the necessary tools without the need for extensive FFmpeg infrastructure management. Start creating captivating video compositions today!

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free