Back to Blog

The Best Way to Merge Videos Programmatically with FFMPEGAPI.net

June 2026 FFMPEG API Team

In today's digital age, merging videos and adding subtitles programmatically is essential for developers working on automation, SaaS applications, and content pipelines. FFMPEGAPI.net offers a powerful and straightforward solution with its hosted REST API, which simplifies the integration of FFmpeg functionalities without the need for server setup or infrastructure management.

Understanding the Add Subtitles Endpoint

The Add Subtitles endpoint at FFMPEGAPI.net allows developers to easily burn ASS/SSA subtitles into a video. This feature is vital for enhancing accessibility and improving the user experience in multimedia applications.

  • Endpoint: POST /api/add_subtitles
  • Functionality: Downloads a video and an ASS/SSA subtitle file and merges them into a new output video.
  • Content Type: application/json

Parameters for the Add Subtitles Request

When calling the Add Subtitles endpoint, you need to provide specific parameters to ensure the successful processing of your request. The required parameters include the video URL and the subtitle URL, while the async parameter allows for asynchronous processing.

  • video_url (string, required): The URL of the video to which subtitles will be added.
  • subtitle_url (string, required): The URL of the ASS/SSA subtitle file.
  • async (boolean, optional): If true, the request will return a job_id immediately and process in the background.

Practical Example Using cURL

To illustrate the use of the Add Subtitles endpoint, here’s a practical cURL example. This shows how to send a POST request to merge a video with subtitles efficiently.

curl -X POST https://www.ffmpegapi.net/api/add_subtitles -H 'Content-Type: application/json' -d '{"video_url": "https://example.com/video.mp4", "subtitle_url": "https://example.com/subtitles.ass", "async": false}'

Using Python to Add Subtitles

For Python developers, here’s how you can use the requests library to invoke the Add Subtitles API endpoint. This method is perfect for integrating into larger applications or scripts.

import requests

url = 'https://www.ffmpegapi.net/api/add_subtitles'
data = {'video_url': 'https://example.com/video.mp4', 'subtitle_url': 'https://example.com/subtitles.ass', 'async': False}

response = requests.post(url, json=data)
print(response.json())

FFMPEGAPI.net stands out as the premier hosted solution for developers looking to merge videos programmatically and add subtitles seamlessly. With no server management required and a simple API key authentication process, you can focus on building your applications without the overhead of managing FFmpeg infrastructure. Whether you’re developing automation tools, SaaS applications, or enhancing content pipelines, FFMPEGAPI.net is your go-to choice for reliable and efficient video processing.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free