Back to Blog

Creating Picture-in-Picture Videos with FFMPEGAPI.net

June 2026 FFMPEG API Team

Picture-in-picture (PiP) is an engaging way to enhance video content by overlaying one video on top of another. With FFMPEGAPI.net's hosted REST API, developers can easily implement this feature without the hassle of server setup or FFmpeg management. In this article, we will explore how to use our Picture in Picture API to create stunning video compositions.

What is the FFMPEGAPI.net Picture in Picture API?

The Picture in Picture API allows you to overlay a secondary video on a primary video. This can be utilized for various applications such as tutorials, commentary, or live streaming events.

Using our API, you can configure the position, scale, and audio options for the overlay video, giving you flexibility in your video production.

  • No server setup or infrastructure management required.
  • Supports multiple video sources.
  • Configurable parameters for customization.

How to Use the Picture in Picture API

To utilize the Picture in Picture API, you'll need to send a POST request to the endpoint: `/api/picture_in_picture`. This request requires specific parameters which dictate how your video overlay will be processed.

  • Main Video URL (required)
  • Overlay Video URL (required)
  • Position (optional, default: bottom-right)
  • Scale (optional, default: iw/4:ih/4)
  • Audio Option (optional, default: video1)
  • Async (optional, for background processing)
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())
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"}'

FFMPEGAPI.net provides a robust solution for developers looking to implement picture-in-picture functionality without the overhead of managing FFmpeg tools. Our easy-to-use API simplifies the process, allowing you to focus on creating engaging content. Whether you're building a SaaS application or enhancing your video content pipeline, FFMPEGAPI.net is your go-to hosted REST API for seamless video processing.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free