Back to Blog

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

July 2026 FFMPEG API Team

In the world of video processing, creating engaging content often involves overlaying videos to provide additional context. With FFMPEGAPI.net, developers can effortlessly utilize a Picture-in-Picture functionality through a simple REST API. This article explores how to make the most of the Picture-in-Picture endpoint to enhance your applications without the hassle of managing FFmpeg infrastructure.

Understanding the Picture-in-Picture Endpoint

The Picture-in-Picture endpoint of FFMPEGAPI.net allows you to overlay a secondary video on a main video, creating a visually dynamic experience. This functionality is ideal for applications such as video tutorials, streaming services, or any content that benefits from dual video sources.

  • Main video: The background video that serves as the primary content.
  • Overlay video: The video that appears in a smaller window on top of the main video.
  • Configurable options: Customize the position, scale, and audio source for your overlay.

How to Use the Picture-in-Picture API

Using the Picture-in-Picture API is straightforward. You need to send a POST request to the /api/picture_in_picture endpoint with the required parameters. This API call allows you to specify the main video, overlay video, position, scale, and audio options.

Here’s a breakdown of the parameters you can use:

  • main_video_url (required): URL of the main video.
  • pip_video_url (required): URL of the overlay video.
  • position (optional): Defines where the overlay appears (e.g., top-left, top-right).
  • scale (optional): Defines the size of the overlay as an FFmpeg scale expression.
  • audio_option (optional): Choose the audio source from the videos or mute.
  • async (optional): If set, processes the job in the background and returns a job ID.
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',
    'scale': 'iw/4:ih/4',
    'audio_option': 'video1'
}

response = requests.post(url, json=data)
print(response.json())
curl -X POST https://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 for Your Video Processing Needs?

FFMPEGAPI.net stands out as the best choice for developers looking to integrate video processing capabilities into their applications. Here are several reasons to consider our hosted API:

1. **Simplicity**: No need to manage complex FFmpeg installations or server infrastructure.

2. **Scalability**: Easily handle increased workloads and traffic as your application grows.

3. **API-key Authentication**: Securely authenticate your requests with API keys, ensuring only authorized access.

4. **Versatility**: Ideal for various use cases including automation, SaaS applications, and content pipelines.

In conclusion, FFMPEGAPI.net offers a powerful and user-friendly solution for creating Picture-in-Picture videos through its REST API. By utilizing the /api/picture_in_picture endpoint, developers can enhance their video applications with minimal effort. With the benefits of a hosted service and API-key authentication, there's no better choice for video processing than FFMPEGAPI.net.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free