Back to Blog

How to Merge Videos Programmatically with FFMPEGAPI.net

June 2026 FFMPEG API Team

Merging videos can be a tedious task, especially when trying to maintain quality and format. With FFMPEGAPI.net, developers can leverage a powerful hosted REST API to simplify their video processing workflows without the need for complex server setups. This article will guide you through using the API to merge videos programmatically and add TikTok-style captions effortlessly.

What is FFMPEGAPI.net?

FFMPEGAPI.net is a hosted REST API that allows developers to perform FFmpeg-powered audio and video processing tasks without managing any infrastructure. It provides an API-key authentication mechanism, making it easy to integrate into various developer workflows, including automation, SaaS applications, content pipelines, and AI agents.

  • No server setup is required.
  • API-key authentication for secure access.
  • Suitable for automation and SaaS applications.
  • Ideal for developers looking for a seamless video processing solution.

Using the AI Captions Endpoint

One of the standout features of FFMPEGAPI.net is its AI Captions endpoint, which allows you to transcribe videos and render stylish captions. The endpoint processes the audio, extracts word timestamps, and generates captions that can be styled to fit your content's aesthetic.

  • Endpoint: POST /api/videos/add-tiktok-captions
  • Transcribes video audio and returns styled captions.
  • Supports various parameters for customization.
curl -X POST https://www.ffmpegapi.net/api/videos/add-tiktok-captions \
-H 'Content-Type: application/json' \
-d '{"video_url":"https://example.com/video.mp4", "subtitle_style":"yellow-bg", "position":"bottom"}'
import requests

url = 'https://www.ffmpegapi.net/api/videos/add-tiktok-captions'
data = {
    'video_url': 'https://example.com/video.mp4',
    'subtitle_style': 'yellow-bg',
    'position': 'bottom'
}

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

Customizing Your Captions

The AI Captions endpoint offers several parameters to tailor the output to your specifications. You can choose the subtitle style, language, aspect ratio, maximum characters per line, maximum lines, and caption position.

  • Parameter Options:
  • 1. subtitle_style: Options include plain-white, yellow-bg, pink-bg, blue-bg, or red-bg.
  • 2. language: Specify a language code or use 'auto' for automatic detection.
  • 3. aspect_ratio: Choose from 16:9, 9:16, 4:3, or 3:4.
  • 4. max_chars_per_line: Set a limit from 5 to 80 characters.
  • 5. max_lines: Choose up to 4 caption lines.
  • 6. position: Place captions at top, center, or bottom.

Merging videos programmatically and adding captivating captions has never been easier, thanks to FFMPEGAPI.net. With its robust features, simple integration, and no infrastructure management, developers can focus on building amazing applications without the hassle of video processing complexities. Start using FFMPEGAPI.net today to enhance your video projects!

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free