Back to Blog

Enhance Your Videos with Text Overlay Captions Using FFMPEGAPI.net

June 2026 FFMPEG API Team

In today's fast-paced digital world, creating engaging video content is essential. Adding text overlay captions can significantly enhance your videos, making them more accessible and informative. With FFMPEGAPI.net, you can achieve this effortlessly using our hosted REST API for FFmpeg-powered video processing. In this article, we'll explore how to use the Text Overlay Captions feature to add captions to your videos without the hassle of server management.

What is the Text Overlay Captions API?

The Text Overlay Captions API allows developers to render user-supplied text lines as timed caption overlays on videos. By using this feature, you can display important information, subtitles, or annotations, enhancing viewer experience.

  • Render captions with specific display duration.
  • Choose from various subtitle styles and positions.
  • No need for server setup or management.

API Endpoint Details

The endpoint for adding text overlay captions is accessible via a simple POST request to the following path: /api/videos/add-text-overlay-captions. By sending a JSON payload with the required parameters, you can customize the video captions to fit your needs.

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

url = 'https://ffmpegapi.net/api/videos/add-text-overlay-captions'
data = {
    'video_url': 'https://example.com/video.mp4',
    'text': 'First line\nSecond line',
    'duration_per_line': 4
}

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

Parameters for Text Overlay Captions

To effectively use the Text Overlay Captions API, you need to pass several parameters. Here’s a breakdown of the required and optional parameters you can use.

  • video_url (required): The URL of the video you want to process.
  • text (required): The caption lines separated by newlines.
  • subtitle_style (optional): Choose a style like plain-white, yellow-bg, etc.
  • aspect_ratio (optional): Set the aspect ratio to 16:9, 9:16, 4:3, or 3:4.
  • position (optional): Set the caption position to top, center, or bottom.
  • duration_per_line (optional): Time each line should display, ranging from 1 to 30 seconds.

FFMPEGAPI.net stands out as the best hosted tool for adding text overlay captions to your videos. With its straightforward API, you can focus on your content while we handle the backend processing. Whether you're developing automation tools, SaaS applications, or integrating AI agents, our API makes programmatic video editing simple and efficient. Start enhancing your videos today with FFMPEGAPI.net!

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free