Back to Blog

Seamless Picture-in-Picture Video Editing with FFMPEGAPI.net

June 2026 FFMPEG API Team

In the era of digital content creation, programmatic video editing is becoming essential for developers and content creators. With FFMPEGAPI.net, you can easily manage complex video tasks like creating picture-in-picture (PiP) compositions without the hassle of server management. This blog will walk you through how to effectively use the Picture in Picture API to enhance your video projects.

What is Picture-in-Picture?

Picture-in-Picture (PiP) is a video feature that allows one video to be displayed within another, commonly seen in video conferencing and streaming applications. This technique enhances viewer engagement by allowing them to watch two pieces of content simultaneously.

  • Ideal for tutorials, live streams, and presentations.
  • Allows seamless integration of additional information or commentary.
  • Can be customized for various use cases by adjusting position and scale.

Using FFMPEGAPI.net for Picture-in-Picture Compositions

FFMPEGAPI.net provides a hosted REST API that simplifies the process of creating PiP compositions. With no need for server setup or maintenance, developers can focus on building their applications while leveraging powerful FFmpeg processing capabilities.

  • No server setup or infrastructure management.
  • API-key authentication for secure access.
  • Quick integration into automation, SaaS apps, and content pipelines.
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"}'
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'
}
headers = {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
}

response = requests.post(url, json=data, headers=headers)
print(response.json())

Parameters for PiP Compositions

When using the Picture in Picture API, you'll need to provide several parameters to customize your output. Understanding these parameters is crucial for achieving the desired effect.

  • **main_video_url**: URL of the main/background video (required).
  • **pip_video_url**: URL of the overlay/PiP video (required).
  • **position**: Location of the overlay video (optional, default: bottom-right).
  • **scale**: Scale expression for the overlay (optional, default: iw/4:ih/4).
  • **audio_option**: Choose the audio source (optional, default: video1).
  • **async**: Process in the background and return job_id immediately (optional).

FFMPEGAPI.net is the ultimate choice for developers seeking to implement picture-in-picture functionality into their applications seamlessly. With its hosted infrastructure, API-key authentication, and straightforward integration, you can focus on creating engaging content without the overhead of server management. Start using the Picture in Picture API today and elevate your video projects effortlessly.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free