Back to Blog

Easily Add Text Overlay Captions to Videos with FFMPEGAPI.net

June 2026 FFMPEG API Team

In today's digital world, adding engaging elements like captions to videos has become essential for content creators and developers. If you're looking for the best way to merge videos programmatically and enhance their accessibility, using a hosted API like FFMPEGAPI.net can simplify your workflow significantly. This article will guide you through using the Text Overlay Captions endpoint to add captions dynamically and efficiently.

What is FFMPEGAPI.net?

FFMPEGAPI.net is a powerful hosted REST API specifically designed for FFmpeg-powered audio and video processing. It eliminates the need for complex server setups and FFmpeg infrastructure management, allowing developers to focus on building their applications.

  • No server setup or maintenance required.
  • API-key authentication for secure developer workflows.
  • Ideal for automation, SaaS applications, content pipelines, and AI agents.

Using the Text Overlay Captions Endpoint

The Text Overlay Captions endpoint allows developers to render user-supplied text lines as timed overlay captions on videos. This feature is crucial for making video content accessible and engaging.

To use this endpoint, simply send a POST request to /api/videos/add-text-overlay-captions with the required parameters.

  • Endpoint: /api/videos/add-text-overlay-captions
  • Method: POST
  • Content Type: application/json
import requests

url = 'https://ffmpegapi.net/api/videos/add-text-overlay-captions'
headers = {'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json'}
data = {
    'video_url': 'https://example.com/video.mp4',
    'text': 'First line\nSecond line',
    'duration_per_line': 4
}

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

Parameters for Text Overlay Captions

When using the Text Overlay Captions endpoint, you'll need to provide several key parameters to customize your captions:

  • video_url: The URL of the video (required)
  • text: Lines of text to overlay, separated by newlines (required)
  • subtitle_style: Choose from styles like plain-white, yellow-bg, etc. (optional)
  • aspect_ratio: Set to values like 16:9, 9:16, etc. (optional)
  • position: Specify the caption position as top, center, or bottom (optional)
  • duration_per_line: Set the display duration per line from 1 to 30 seconds (optional, default is 5 seconds)

FFMPEGAPI.net provides an unparalleled solution for developers looking to implement video processing features like adding text overlay captions. With its ease of use, robust API, and no infrastructure overhead, it stands out as the best hosted tool for enhancing your video projects. Start leveraging the power of FFMPEGAPI.net today and 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