Back to Blog

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

June 2026 FFMPEG API Team

In the age of digital content, creating engaging videos is essential. With FFMPEGAPI.net, developers can easily implement video overlays, such as picture-in-picture effects, through a simple and effective API. This article will guide you through using the Picture-in-Picture endpoint to enhance your video projects without worrying about server setup.

What is Picture-in-Picture?

Picture-in-Picture (PiP) is a popular video technique where one video is overlaid on top of another, providing viewers with additional context or content. This technique is widely used in tutorials, streaming, and presentations.

  • Enhances viewer engagement.
  • Provides a more informative context.
  • Ideal for instructional content and live streams.

How to Use the Picture-in-Picture API Endpoint

FFMPEGAPI.net provides a straightforward REST API endpoint for creating picture-in-picture compositions. The endpoint accepts various parameters to customize the overlay according to your needs.

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

Parameters for Picture-in-Picture

The API allows you to customize the PiP effect with several optional parameters that help you control how the overlay appears in the video.

  • main_video_url: The URL of the main video.
  • pip_video_url: The URL of the overlay video.
  • position: Sets the overlay's position (default: bottom-right).
  • scale: Adjusts the size of the overlay (default: iw/4:ih/4).
  • audio_option: Selects the audio source (default: video1).
  • async: If set to true, processes the job in the background.

FFMPEGAPI.net simplifies the process of programmatic video editing, allowing developers to focus on creating compelling content without the overhead of managing servers or complex FFmpeg installations. With just a few API calls, you can easily implement advanced video features like picture-in-picture overlays, making FFMPEGAPI.net the ideal solution for your video processing needs.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free