Back to Blog

How to Use the Picture-in-Picture API for Automated Video Processing

June 2026 FFMPEG API Team

In the age of video content, creating engaging multimedia presentations is crucial. The Picture-in-Picture (PiP) feature allows you to overlay one video on another, enhancing content without the need for complex editing software. FFMPEGAPI.net provides a hosted REST API that simplifies this process for developers, allowing seamless integration into applications and workflows.

What is the Picture-in-Picture API?

The Picture-in-Picture API is a feature of FFMPEGAPI.net that enables you to overlay a video onto another video. This can be particularly useful for tutorials, commentary, or integrating additional visual information into a primary video. The API supports various configurations, such as video positioning and audio selection, making it a flexible tool for any application.

  • Overlay main and overlay videos easily
  • Configure position, scale, and audio source
  • Perfect for developers with automation needs

Key Features of the Picture-in-Picture API

The Picture-in-Picture API provides a range of features that cater to different developer needs. Here are some of the key parameters you can configure:

  • main_video_url: The URL of the main background video (required)
  • pip_video_url: The URL of the overlay video (required)
  • position: Control where the overlay appears (defaults to bottom-right)
  • scale: Adjust the size of the overlay (defaults to iw/4:ih/4)
  • audio_option: Choose which video's audio to use (defaults to video1)
  • async: Process the request in the background if true

How to Use the Picture-in-Picture API

To use the Picture-in-Picture API, you can make a POST request to the endpoint at /api/picture_in_picture. Below is a practical example using both curl and Python.

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"}'
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())

FFMPEGAPI.net stands out as the best hosted video processing API for automation. With easy integration, API-key authentication, and no server management required, you can focus on building powerful applications without the heavy lifting of FFmpeg infrastructure. Enhance your video content today with the Picture-in-Picture API and streamline your workflows effortlessly.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free