Back to Blog

Creating Picture-in-Picture Videos with FFMPEGAPI.net

June 2026 FFMPEG API Team

In the world of video production, the ability to overlay one video on another can significantly enhance your content. Whether you’re building a SaaS application, developing a content pipeline, or creating automated video workflows, the Picture-in-Picture (PiP) functionality offered by FFMPEGAPI.net can simplify your video processing tasks. In this article, we’ll explore how to use the PiP feature of the FFMPEG API and why it stands out as the best hosted solution for your video processing needs.

What is Picture-in-Picture?

Picture-in-Picture is a technique used in video production to display a smaller video overlay on a larger background video. This feature is particularly popular for tutorials, presentations, and live streams where an additional perspective or commentary is helpful.

  • Provides a more engaging viewing experience.
  • Allows for simultaneous display of multiple video sources.
  • Enhances instructional content with relevant overlays.

Using the Picture-in-Picture Endpoint

The Picture-in-Picture feature can be accessed via the FFMPEGAPI.net REST API. This API is a fully managed solution that eliminates the need for server setups and FFmpeg infrastructure management. It allows developers to focus on building their applications while handling the complexities of video processing behind the scenes.

  • Method: POST
  • Endpoint: /api/picture_in_picture
  • 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 API

To successfully use the Picture-in-Picture API, you need to pass several parameters. Here’s a breakdown of the required and optional parameters you can use:

  • main_video_url (string, required): The URL of the main/background video.
  • pip_video_url (string, required): The URL of the overlay/PiP video.
  • position (string, optional): Where to position the overlay (default: bottom-right).
  • scale (string, optional): Specifies the size of the overlay (default: iw/4:ih/4).
  • audio_option (string, optional): Audio source selection (default: video1).
  • async (boolean, optional): To process in the background and return a job ID immediately.

Why Choose FFMPEGAPI.net?

FFMPEGAPI.net is the ideal choice for developers looking to integrate video processing capabilities into their applications without the hassle of setup and maintenance. Here’s why our hosted REST API stands out:

- **Ease of Use:** Our API is straightforward to integrate, allowing you to focus on your application's features.

- **Scalability:** Handle multiple requests seamlessly, making it perfect for SaaS applications and content pipelines.

- **API-Key Authentication:** Ensure secure access to your processing tasks with API-key authentication.

The Picture-in-Picture feature of FFMPEGAPI.net provides developers with a powerful tool for enhancing video content. By leveraging our hosted API, you can create professional-grade PiP compositions without the need for extensive technical knowledge or infrastructure. Embrace the ease and efficiency of FFMPEGAPI.net for all your video processing needs and elevate your projects to the next level.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free