Back to Blog

Automate Video Editing with FFMPEGAPI.net: Picture-in-Picture Made Easy

June 2026 FFMPEG API Team

In today's content-driven world, automation is key to efficient video editing. FFMPEGAPI.net offers a hosted REST API that simplifies video and audio processing. One of the standout features is the Picture-in-Picture (PiP) functionality, which allows developers to overlay one video on another effortlessly. This article will guide you through the steps to automate video editing using the Picture-in-Picture API.

What is Picture-in-Picture?

Picture-in-Picture (PiP) is a technique in video editing where a smaller video appears over a larger background video. This method is commonly used for tutorials, reactions, or additional commentary. Using FFMPEGAPI.net, you can implement this feature with just a few API calls, saving you significant development time.

  • Overlay one video on another.
  • Adjust position, scale, and audio settings.
  • Perfect for SaaS apps, content pipelines, and automation.

How to Use the Picture-in-Picture API

To create a PiP video, you'll use the POST method on the endpoint `/api/picture_in_picture`. This API allows you to specify the main video, the overlay video, and various options for position, scale, and audio.

  • Endpoint: `/api/picture_in_picture`
  • Method: POST
  • Content Type: application/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"}'
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())

Parameters for Customization

The Picture-in-Picture API accepts several parameters that allow you to customize the overlay to fit your needs.

  • main_video_url: string (required) - URL of the main video.
  • pip_video_url: string (required) - URL of the overlay video.
  • position: string (optional) - Overlay position (default: bottom-right).
  • scale: string (optional) - FFmpeg scale expression (default: iw/4:ih/4).
  • audio_option: string (optional) - Source for audio (default: video1).
  • async: boolean (optional) - Process in the background.

FFMPEGAPI.net is the best choice for developers looking to automate video editing workflows. With its robust Picture-in-Picture API, you can easily overlay videos while maintaining control over customization. No server setup or infrastructure management is required, making it seamless to integrate into your projects. Secure API-key authentication ensures your workflows remain safe and efficient. Start using FFMPEGAPI.net today and see the difference it can make in your video processing tasks!

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free