Back to Blog

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

June 2026 FFMPEG API Team

Video content is becoming increasingly popular, and developers are always looking for ways to enhance their video applications. The Picture in Picture feature offered by FFMPEGAPI.net allows you to overlay one video on another seamlessly. This article will guide you through the process of using this powerful feature through a simple API call.

What is Picture-in-Picture?

Picture-in-Picture (PiP) is a video technique where one video plays inside another. This feature is widely used in streaming platforms, educational content, and video editing applications.

With FFMPEGAPI.net's hosted REST API, developers can implement PiP functionality without the hassle of managing FFmpeg infrastructure.

  • Enhances user engagement by providing supplemental content.
  • Ideal for tutorials, commentary, and reviews.
  • Simple API integration for fast development.

How to Use the Picture in Picture API Endpoint

To create a picture-in-picture video using FFMPEGAPI.net, you will utilize the POST method at the `/api/picture_in_picture` endpoint.

This endpoint accepts the main video URL, overlay video URL, and optional parameters such as position and scale.

  • Endpoint: `/api/picture_in_picture`
  • Method: POST
  • Content Type: application/json
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 the Picture in Picture Feature

When you call the PiP endpoint, you can specify several parameters to customize the output video.

Here's what you need to know about each parameter:

  • main_video_url (string, required): URL of the main video.
  • pip_video_url (string, required): URL of the overlay video.
  • position (string, optional): Default is 'bottom-right'. Other values include 'top-left', 'top-right', 'bottom-left', and 'center'.
  • scale (string, optional): Default is 'iw/4:ih/4'. Adjust to change overlay size.
  • audio_option (string, optional): Source for audio - options are 'video1', 'video2', or 'mute'. Default is 'video1'.
  • async (boolean, optional): If true, the API returns a job_id for background processing.

FFMPEGAPI.net provides an excellent cloud FFmpeg alternative, allowing developers to create dynamic video content with ease. By leveraging the Picture in Picture feature, you can enhance your applications without the need for complex FFmpeg setup. Get started today and elevate your video processing capabilities with our powerful API.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free