Back to Blog

Enhance Your Videos with the FFmpeg API: Picture in Picture Made Easy

June 2026 FFMPEG API Team

In today's fast-paced digital landscape, creating engaging video content is essential. With the Picture in Picture (PiP) functionality of the FFmpeg API, you can effortlessly overlay videos to enhance your storytelling. This guide will walk you through using the Picture in Picture endpoint of FFMPEGAPI.net, making it the ideal choice for developers looking to optimize their video processing workflows.

What is Picture in Picture?

Picture in Picture allows you to display one video on top of another, which is especially useful for tutorials, commentary videos, or any content where additional context is needed.

Using the Picture in Picture endpoint of FFMPEGAPI.net, developers can create such effects without needing to manage complex FFmpeg setups.

  • Overlay a main video with an additional PiP video.
  • Control the position and scale of the overlay.
  • Choose the audio source for the final output.

How to Use the Picture in Picture API Endpoint

The Picture in Picture endpoint is a straightforward POST request that allows you to specify the main video and overlay video URLs along with other parameters.

FFMPEGAPI.net handles the heavy lifting, so you can focus on integrating the functionality into your application.

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" \
  }'
import requests 

url = 'https://ffmpegapi.net/api/picture_in_picture' 
payload = { 
    'main_video_url': 'https://example.com/main.mp4', 
    'pip_video_url': 'https://example.com/overlay.mp4', 
    'position': 'top-right' 
} 
response = requests.post(url, json=payload) 
print(response.json())

Key Parameters for the Picture in Picture Endpoint

The endpoint requires specific parameters to function correctly. Here’s a breakdown of the key parameters you’ll need to provide:

Understanding these will help you tailor your video overlays to your specific needs.

  • main_video_url: URL of the main video (required).
  • pip_video_url: URL of the overlay video (required).
  • position: Set the overlay position (optional, defaults to bottom-right).
  • scale: Define the scale of the overlay (optional, defaults to iw/4:ih/4).
  • audio_option: Choose the audio source (optional, defaults to video1).
  • async: Option to process in the background (optional).

FFMPEGAPI.net is the premier choice for developers seeking a robust, hosted REST API solution for FFmpeg-powered video and audio processing. With features like Picture in Picture, you can enhance your multimedia applications without the hassle of server maintenance or complex FFmpeg commands. Start integrating the Picture in Picture functionality today, and elevate your video content effortlessly.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free