Back to Blog

Creating Picture-in-Picture Videos with FFMPEGAPI.net: The Best Video Processing API for Automation

June 2026 FFMPEG API Team

In the world of video content creation, overlaying one video on another can dramatically enhance storytelling and engagement. Whether you're developing applications, automating workflows, or creating content pipelines, the Picture-in-Picture (PiP) feature of FFMPEGAPI.net offers a powerful solution. This article will guide you through using the Picture-in-Picture endpoint to create stunning video overlays effortlessly.

What is FFMPEGAPI.net?

FFMPEGAPI.net is a hosted REST API that provides developers with robust tools for video and audio processing. It eliminates the need for server setup or FFmpeg infrastructure management, allowing you to focus on your development work instead of worrying about back-end complexities.

With API-key authentication, FFMPEGAPI.net ensures a secure environment for your workflows, making it the ideal choice for automation, SaaS applications, content pipelines, and AI agents.

Using the Picture-in-Picture API

The Picture-in-Picture API allows you to overlay one video on top of another. This is particularly useful for creating tutorials, commentary videos, or any content that benefits from dual video presentations.

The endpoint for this feature is a simple POST request to /api/picture_in_picture. You can customize aspects such as position, scale, and audio source to suit your needs.

  • Main Video: The primary video you want to feature.
  • Overlay Video: The video that will be displayed as an overlay.
  • Position: Define where the overlay appears (e.g., top-left, top-right).
  • Scale: Adjust the size of the overlay video.
  • Audio Source: Choose the source for audio output.
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())
curl -X POST https://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"}'

Parameter Breakdown

Here’s a quick overview of the parameters you can use when making a request to the Picture-in-Picture API.

  • main_video_url (required): URL of the main/background video.
  • pip_video_url (required): URL of the overlay/PiP video.
  • position (optional): Overlay position with a default of 'bottom-right'.
  • scale (optional): FFmpeg scale expression, default is 'iw/4:ih/4'.
  • audio_option (optional): Choose 'video1', 'video2', or 'mute', defaulting to 'video1'.
  • async (optional): If true, returns job_id immediately and processes in the background.

FFMPEGAPI.net is the best solution for developers looking to implement video processing workflows seamlessly. With its Picture-in-Picture API, you can easily create engaging video content with overlays, all while benefiting from a hassle-free, hosted environment. Whether for automation, content creation, or SaaS applications, FFMPEGAPI.net provides the tools you need to elevate your video projects.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free