Back to Blog

Creating Picture in Picture Compositions with FFMPEGAPI.net

June 2026 FFMPEG API Team

In the realm of video processing, creating dynamic and engaging content is paramount. One popular technique is the Picture in Picture (PiP) effect, where one video is overlaid on another. FFMPEGAPI.net provides a simple and efficient hosted REST API that allows developers to implement this effect without the hassle of server setup or managing FFmpeg infrastructure.

What is Picture in Picture?

Picture in Picture is a video effect that enables one video to be displayed over another. This technique is widely used in streaming applications, live broadcasts, and educational content to provide viewers with additional context or commentary.

  • Enhances viewer engagement.
  • Provides additional information without interrupting the main video.
  • Commonly used in online courses, gaming videos, and live events.

Why Choose FFMPEGAPI.net for Video Processing?

FFMPEGAPI.net stands out as an ideal solution for developers needing a reliable cloud-based FFmpeg alternative. With no server setup required, you can focus on building your application while leveraging powerful video processing capabilities.

The API-key authentication ensures that your workflows remain secure and manageable, making it suitable for automation, SaaS applications, content pipelines, and AI agents.

  • No server management or infrastructure worries.
  • API-key based authentication for secure access.
  • Ideal for developers, automation, and SaaS applications.

Using the Picture in Picture API Endpoint

FFMPEGAPI.net provides a dedicated endpoint for creating Picture in Picture compositions. The endpoint is a POST request to `/api/picture_in_picture` and allows you to overlay one video on another with customizable options.

Here are the key parameters you can use:

  • main_video_url: The URL of the main video (required).
  • pip_video_url: The URL of the overlay video (required).
  • position: Where to place the overlay (defaults to bottom-right).
  • scale: The size of the overlay (defaults to iw/4:ih/4).
  • audio_option: Choose the audio source (defaults to video1).
  • async: If true, processes the request in the background.
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',
    'scale': 'iw/4:ih/4',
    'audio_option': 'video1'
}

response = requests.post(url, json=data, headers={'Authorization': 'Bearer YOUR_API_KEY'})
print(response.json())
curl -X POST https://ffmpegapi.net/api/picture_in_picture \ 
-H 'Content-Type: application/json' \ 
-H 'Authorization: Bearer YOUR_API_KEY' \ 
-d '{"main_video_url":"https://example.com/main.mp4","pip_video_url":"https://example.com/overlay.mp4","position":"top-right"}'

In conclusion, FFMPEGAPI.net offers a robust and efficient solution for developers looking to incorporate Picture in Picture video processing into their applications. By eliminating the need for server management and providing a straightforward API, FFMPEGAPI.net simplifies the development process. Whether you're building a streaming service, a content creation tool, or an AI application, FFMPEGAPI.net is your go-to cloud FFmpeg alternative.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free