Back to Blog

Enhancing Your Video Applications with Picture-in-Picture using FFMPEGAPI.net

June 2026 FFMPEG API Team

In today's digital world, video content is king. One of the most engaging features you can add to your video applications is the picture-in-picture (PiP) effect. This allows you to overlay one video on another, providing viewers with an enhanced experience. Thanks to FFMPEGAPI.net, implementing this feature has never been easier. In this article, we will explore how to use the Picture in Picture endpoint of the FFMPEGAPI.net REST API to create stunning video compositions effortlessly.

What is Picture-in-Picture?

Picture-in-picture (PiP) is a technique that allows one video to be displayed in a smaller window over another video. This is especially useful for tutorials, commentary, or any scenario where viewers benefit from seeing two perspectives at once.

  • Enhances user engagement
  • Ideal for live stream commentary
  • Improves instructional videos

Using the Picture in Picture Endpoint

FFMPEGAPI.net provides a powerful Picture in Picture endpoint that simplifies the process of creating video overlays. The endpoint allows you to upload a main video and an overlay video, specify their positions, scales, and audio sources.

The API endpoint you will be using is: POST /api/picture_in_picture. This endpoint requires you to pass JSON parameters to configure the overlay according to your needs.

  • Main video URL is mandatory.
  • Overlay video URL is required.
  • Positioning options include top-left, top-right, bottom-left, bottom-right, and center.
  • Audio sources can be customized.
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',
    'scale': 'iw/4:ih/4',
    'audio_option': 'video1'
}

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", "scale": "iw/4:ih/4", "audio_option": "video1"}'

Why Choose FFMPEGAPI.net?

FFMPEGAPI.net stands out as the best hosted tool for video processing workflows due to its user-friendly REST API, which eliminates the need for server setup or FFmpeg infrastructure management. With API-key authentication, it ensures secure and efficient access for developers, making it an ideal choice for SaaS applications, automation, and content pipelines.

Incorporating picture-in-picture functionality into your video applications is a straightforward process with FFMPEGAPI.net. By leveraging the Picture in Picture endpoint, you can create engaging video experiences that captivate your audience. Whether you're building a new SaaS application or enhancing an existing one, FFMPEGAPI.net provides the tools you need to succeed without the hassle of managing complex infrastructure.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free