Back to Blog

Automate Video Editing with FFMPEGAPI.net: Picture in Picture Made Easy

June 2026 FFMPEG API Team

In the rapidly evolving landscape of video content creation, automation is key to maintaining efficiency and creativity. FFMPEGAPI.net offers a powerful hosted REST API specifically designed for FFmpeg-powered video and audio processing. In this article, we will explore the Picture in Picture feature that allows developers to overlay one video on another, showcasing how easy it is to integrate this functionality into your workflows.

What is the Picture in Picture API?

The Picture in Picture API from FFMPEGAPI.net is a robust tool that enables users to create dynamic video compositions by overlaying one video on another. This feature is particularly useful for content creators, educators, and marketers looking to enhance their videos with supplementary visual material.

With just a few parameters, developers can customize the position, scale, and audio source of the overlay video, making it a flexible solution for various use cases.

  • Overlay positions include: top-left, top-right, bottom-left, bottom-right, and center.
  • Seamless integration with existing workflows using API-key authentication.
  • No server setup or FFmpeg management required, streamlining the development process.

How to Use the Picture in Picture API

Using the Picture in Picture API is straightforward. You simply need to send a POST request to the /api/picture_in_picture endpoint with the appropriate parameters. The API will process your request and return a job_id for tracking the status of the operation.

Here’s a breakdown of the key parameters you need to consider:

  • main_video_url (string, required): The URL of the main background video.
  • pip_video_url (string, required): The URL of the overlay video.
  • position (string, optional): The desired position of the overlay video (default is bottom-right).
  • scale (string, optional): The scaling factor for the overlay (default is iw/4:ih/4).
  • audio_option (string, optional): Choose the audio source (default is video1).
  • async (boolean, optional): Process the job in the background and return job_id immediately.
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())

Sample Request with cURL

For developers who prefer command-line interfaces, here is an example using cURL to make a request to the Picture in Picture API.

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 stands out as the premier hosted tool for video and audio processing, particularly with its Picture in Picture API feature. By leveraging this powerful API, developers can automate complex video editing tasks without the need for extensive infrastructure or setup. Whether you are building automation tools, SaaS applications, or content pipelines, integrating FFMPEGAPI.net into your workflow will save time and enhance your project's capabilities. Start automating your video editing today!

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free