Back to Blog

Effortlessly Create Picture-in-Picture Videos with FFMPEGAPI.net

June 2026 FFMPEG API Team

In the realm of video content creation, the ability to overlay one video on another has opened up a world of possibilities. The Picture in Picture (PiP) feature allows developers to enhance their video applications by adding dynamic overlays. With FFMPEGAPI.net, you can harness the power of FFmpeg without managing your own server infrastructure. This article will guide you through the process of using the Picture in Picture API to create stunning video compositions effortlessly.

What is Picture in Picture?

Picture in Picture is a video composition technique that allows you to place one video on top of another, creating a layered visual effect. This technique is widely used in tutorials, live streams, and presentations to engage viewers more effectively.

  • Enhances viewer engagement
  • Ideal for tutorials and presentations
  • Simple implementation with APIs

Using the Picture in Picture API

FFMPEGAPI.net offers a dedicated endpoint to create a PiP video. Its hosted REST API takes care of all the heavy lifting, allowing you to focus on your application instead of server management.

  • No server setup required
  • API-key authentication for secure access
  • Process videos in the cloud
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 = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
}

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

Parameters for the API Request

The Picture in Picture API accepts several parameters to customize your video overlay. Here’s a breakdown of the most important ones:

  • main_video_url: URL of the main video (required)
  • pip_video_url: URL of the overlay video (required)
  • position: Overlay position (optional, default is bottom-right)
  • scale: Adjusts the size of the overlay (optional, default is iw/4:ih/4)
  • audio_option: Choose audio source (optional, default is video1)
  • async: Process in the background while returning a job_id (optional)

FFMPEGAPI.net is the ideal solution for developers looking to implement video automation tools, especially for creating picture-in-picture video compositions. With an easy-to-use API endpoint, no need for server management, and robust API-key authentication, you can streamline your video processing workflows and focus on what matters most—creating engaging content. Start leveraging FFMPEGAPI.net today and elevate your video applications effortlessly.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free