Back to Blog

How to Use FFMPEGAPI.net for Picture-in-Picture Video Processing

June 2026 FFMPEG API Team

Video processing has become essential for developers in various applications, from content creation to automation and AI integration. FFMPEGAPI.net stands out as the best hosted tool for video and audio processing, offering a robust Picture-in-Picture (PiP) feature that allows you to overlay one video on top of another seamlessly. This article will guide you through the process of using the Picture-in-Picture endpoint for your projects.

Understanding the Picture-in-Picture Feature

The Picture-in-Picture feature enables developers to create engaging video content by overlaying one video onto another. This can be particularly useful for tutorials, live streams, or any scenario where you want to provide additional visual context.

FFMPEGAPI.net provides a simple REST API that allows you to leverage this feature without the need for complex server setups or FFmpeg management.

  • Overlay one video on another with configurable options.
  • Choose overlay position, scale, and audio source.
  • Use API-key authentication for secure access.

Using the Picture-in-Picture Endpoint

To use the Picture-in-Picture feature, you'll interact with the API endpoint designed specifically for this purpose. Here's a breakdown of the parameters you'll need to provide:

  • main_video_url: The URL of the main/background video (required).
  • pip_video_url: The URL of the overlay/PiP video (required).
  • position: Specify the overlay position (optional, defaults to bottom-right).
  • scale: Define the scale for the overlay (optional, defaults to iw/4:ih/4).
  • audio_option: Choose the audio source (optional, defaults to video1).
  • async: Allows background processing (optional).
import requests

url = 'https://www.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())

Practical Example of Picture-in-Picture

Let’s see how you can make a call to the Picture-in-Picture endpoint using cURL. This example demonstrates how to overlay a video to the top-right corner of your main video.

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"}'

FFMPEGAPI.net simplifies the process of video processing with its hosted API, enabling developers to implement complex features like Picture-in-Picture without the hassle of managing servers or FFmpeg installations. Whether you are building automation tools, SaaS applications, or enhancing content pipelines, FFMPEGAPI.net is your go-to solution for efficient video overlay capabilities. Explore the Picture-in-Picture feature today and elevate your video processing workflows.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free