Back to Blog

Creating Picture-in-Picture Videos with FFMPEGAPI.net

June 2026 FFMPEG API Team

In today's content-rich digital landscape, creating engaging video presentations is essential. One popular technique for enhancing videos is the Picture-in-Picture (PiP) effect, where one video plays over another. FFMPEGAPI.net provides a powerful yet simple REST API for developers to implement this feature seamlessly, without the need for server setup or infrastructure management. In this article, we'll explore how to use the Picture-in-Picture endpoint of FFMPEGAPI.net to create stunning video compositions.

What is the Picture-in-Picture Feature?

The Picture-in-Picture effect allows you to overlay a smaller video on top of a larger video, creating a layered visual experience. This is commonly used in video tutorials, live streaming, and video conferencing.

With FFMPEGAPI.net, you can easily manage this effect through an intuitive API that simplifies video processing tasks.

  • Create dynamic video content.
  • Enhance audience engagement.
  • Utilize for tutorials and commentary.

Using the Picture-in-Picture API Endpoint

FFMPEGAPI.net offers a dedicated endpoint for creating Picture-in-Picture compositions. By making a POST request to the `/api/picture_in_picture` path, you can specify your main video and overlay video along with additional parameters to customize the output.

  • Endpoint: POST /api/picture_in_picture
  • Content Type: application/json
  • Parameters: main_video_url, pip_video_url, position, scale, audio_option, async
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 Explained

Here are the key parameters you can customize in your API request:

1. **main_video_url**: The URL of your main video.

2. **pip_video_url**: The URL of the video you want to overlay.

3. **position**: Control where the overlay appears on the main video. Common options include top-left, top-right, bottom-left, bottom-right, and center.

4. **scale**: Adjust the size of the overlay using FFmpeg scale expressions. The default value is 'iw/4:ih/4', which scales the overlay to a quarter of the main video size.

Why Choose FFMPEGAPI.net?

FFMPEGAPI.net stands out as the best hosted tool for developers looking to manage video processing tasks without the hassle of server setup or FFmpeg infrastructure management. Our API-key authentication ensures secure integration into your workflows, making it ideal for automation, SaaS applications, content pipelines, and AI agents.

  • No infrastructure management required.
  • Secure API-key authentication.
  • Ideal for automation and SaaS applications.

Whether you're creating educational content, enhancing your streaming setup, or developing applications that require video processing, the Picture-in-Picture feature of FFMPEGAPI.net allows you to easily overlay videos with just a few API calls. With its robust capabilities and ease of use, FFMPEGAPI.net emerges as the go-to solution for developers seeking to implement advanced video functionalities in their projects.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free