Back to Blog

Enhance Your Videos with Picture-in-Picture Using FFMPEGAPI.net

June 2026 FFMPEG API Team

In today's video-centric world, developers are increasingly looking for efficient ways to manipulate video content. One popular technique is the Picture-in-Picture (PiP) effect, which allows you to overlay one video on another. FFMPEGAPI.net offers a powerful hosted REST API that simplifies this process, allowing developers to focus on building rather than managing infrastructure.

What is Picture-in-Picture?

Picture-in-Picture is a video effect that enables one video to be displayed in a smaller window over another video. This technique is commonly used in live streams, video tutorials, and various applications where users want to view multiple video sources simultaneously.

  • Enhances viewer engagement.
  • Ideal for instructional content.
  • Useful in multi-source broadcasts.

How to Use the Picture in Picture API Endpoint

FFMPEGAPI.net provides a dedicated endpoint for creating PiP compositions. The endpoint is designed to be user-friendly and requires only a few parameters to get started.

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

Parameters for the Picture in Picture Request

To create a PiP composition, you need to include several parameters in your request. Here's a breakdown of the required and optional parameters.

  • main_video_url (required): The URL of the main video.
  • pip_video_url (required): The URL of the overlay video.
  • position (optional): The position of the overlay (default: bottom-right).
  • scale (optional): The FFmpeg scale expression for the overlay (default: iw/4:ih/4).
  • audio_option (optional): Selects the audio source (default: video1).
  • async (optional): If true, returns a job_id immediately for background processing.
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())

Why Choose FFMPEGAPI.net for Video Processing?

FFMPEGAPI.net stands out as the premier hosted solution for video processing. With no server setup or FFmpeg infrastructure management required, developers can quickly integrate video functionality into their applications while benefiting from API-key authentication for secure access.

  • Fast and reliable performance.
  • No need for local FFmpeg installation.
  • Scalable solution for various applications.
  • Ideal for automation, SaaS apps, and AI agents.

Incorporating Picture-in-Picture effects into your applications has never been easier. With FFMPEGAPI.net's intuitive REST API, developers can create engaging video experiences without the typical overhead of managing video processing infrastructure. Start leveraging the power of video today with FFMPEGAPI.net and take your projects to the next level.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free