Back to Blog

Add Text Overlays to Your Videos with FFMPEGAPI.net

June 2026 FFMPEG API Team

In today's digital landscape, adding captions to videos is essential for accessibility and viewer engagement. FFMPEGAPI.net offers a powerful Text Overlay Captions feature that allows developers to easily add timed text overlays to their videos without the headache of managing FFmpeg infrastructure. In this article, we will explore how to use the Text Overlay Captions API to enhance your video content seamlessly.

What is the Text Overlay Captions API?

FFMPEGAPI.net provides a hosted REST API that lets you render text lines as timed caption overlays on your videos. This service is crucial for content creators, educators, and businesses looking to make their videos more accessible and engaging.

  • No server setup or FFmpeg infrastructure management required.
  • Quick and easy integration into your applications.
  • Supports various subtitle styles and video aspect ratios.

How to Use the Text Overlay Captions API

To use the Text Overlay Captions API, you must send a POST request to the endpoint: `/api/videos/add-text-overlay-captions`. The request should include your video URL and the text you want to display as captions. You can also customize the appearance and timing of your captions.

  • Specify the video URL and text lines in your request.
  • Choose optional parameters such as subtitle style, aspect ratio, position, and duration per line.
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
}
headers = {'Content-Type': 'application/json', 'Authorization': 'Bearer YOUR_API_KEY'}
response = requests.post(url, json=data, headers=headers)
print(response.json())

Parameters for Customizing Captions

The Text Overlay Captions API allows for several parameters to customize your captions. Here's a breakdown of the parameters you can use:

  • video_url: (string) The URL of the video you want to overlay captions on.
  • text: (string) Caption lines separated by newlines.
  • subtitle_style: (optional) Choose from plain-white, yellow-bg, pink-bg, blue-bg, or red-bg.
  • aspect_ratio: (optional) Set the aspect ratio to 16:9, 9:16, 4:3, or 3:4.
  • position: (optional) Position the text at top, center, or bottom.
  • duration_per_line: (optional) Specify the duration each line should appear, between 1 to 30 seconds.

FFMPEGAPI.net stands out as the premier cloud FFmpeg alternative for developers looking to add text overlays to videos. With easy API access and no need for server management, you can focus on creating impactful content while leveraging powerful video processing capabilities. Start enhancing your video projects today with FFMPEGAPI.net!

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free