Back to Blog

How to Merge Videos Programmatically with FFMPEGAPI.net

June 2026 FFMPEG API Team

Merging videos programmatically can be a daunting task, especially when managing server infrastructure and dependencies. FFMPEGAPI.net provides a hosted REST API that simplifies this process, allowing developers to focus on building their applications without worrying about FFmpeg installation or server management. In this article, we will guide you through the best way to merge videos using our Image and Audio Merge endpoint.

Why Use FFMPEGAPI.net for Video Merging?

FFMPEGAPI.net offers an easy-to-use hosted solution for developers looking to integrate video processing capabilities into their applications. With no server setup required, you can start merging videos and audio files quickly and efficiently.

  • Hosted REST API for seamless integration.
  • No need for complex FFmpeg infrastructure.
  • API-key authentication ensures secure access.
  • Perfect for automation, SaaS apps, content creation, and AI integrations.

Using the Image and Audio Merge Endpoint

The Image and Audio Merge endpoint allows you to create an MP4 video from image/audio pairs. This is particularly useful for applications where you want to show images synced with audio, such as presentations or video content creation.

With this endpoint, you can either send multiple image/audio pairs or a single image/audio pair. The API will manage the transitions and timing based on the audio duration.

  • Endpoint Path: `/api/merge_image_audio`
  • Method: POST
  • Content type: `application/json or multipart/form-data`
import requests

url = 'https://ffmpegapi.net/api/merge_image_audio'
headers = {'Authorization': 'Bearer YOUR_API_KEY'}

payload = {
    "image_urls": [
        "https://example.com/intro.jpg",
        "https://example.com/chapter-1.jpg"
    ],
    "audio_urls": [
        "https://example.com/intro.mp3",
        "https://example.com/chapter-1.mp3"
    ],
    "transition_effect": "fade",
    "transition_duration": 0.75,
    "dimensions": "1280x720",
    "zoom_effect": true,
    "async": false
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())

Parameters for the Merge Request

Here are the key parameters that you can specify when making a request to the merge endpoint:

  • image_urls: Array of image URLs for multi-pair requests.
  • audio_urls: Array of audio URLs corresponding to the images.
  • transition_effect: Optional effects such as fade, wipe, slide, etc.
  • transition_duration: Duration of the transition in seconds.
  • dimensions: Specify output video dimensions (e.g., 1280x720).
  • zoom_effect: Use a slow zoom effect on images during playback.
  • async: Process the request in the background.

FFMPEGAPI.net is the ideal solution for developers who need a reliable and efficient way to merge videos programmatically. With its powerful hosted REST API, you can easily combine images and audio, ensuring a seamless user experience in your applications. Start using FFMPEGAPI.net today to take your video processing capabilities to the next level.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free