Back to Blog

Automate Video Editing with FFMPEGAPI.net: Adding Text Overlay Captions

June 2026 FFMPEG API Team

In today's digital world, video content is everywhere, and enhancing it with captions can significantly improve viewer engagement. Automating video editing tasks like adding text overlay captions is now easier than ever using FFMPEGAPI.net. This article will guide developers on how to utilize the Text Overlay Captions feature of our hosted REST API to streamline their video processing workflows.

What is FFMPEGAPI.net?

FFMPEGAPI.net is a hosted REST API designed for effortless video and audio processing. With no server setup or FFmpeg infrastructure management required, developers can focus on building applications without the hassle of maintaining backend services.

  • API-key authentication ensures secure and streamlined 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 caption overlays on videos. This feature is essential for creating accessible content or enhancing the viewer experience.

To get started, developers can send a POST request to the following endpoint:

{'endpoint': '/api/videos/add-text-overlay-captions'}

  • Method: POST
  • Content-Type: application/json
  • Required Parameters: video_url, text
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

When using the Text Overlay Captions feature, several parameters can be customized to fit your requirements.

Here are the key parameters you can utilize:

  • video_url (string, required): The URL of the video to which you want to add captions.
  • text (string, required): Caption lines separated by newlines.
  • subtitle_style (string, optional): Choose the style of the subtitle (plain-white, yellow-bg, pink-bg, blue-bg, red-bg). Default is plain-white.
  • aspect_ratio (string, optional): Set the aspect ratio of the video (16:9, 9:16, 4:3, 3:4). Default is 9:16.
  • position (string, optional): Position of the text on the video (top, center, bottom). Default is center.
  • duration_per_line (integer, optional): Display duration for each text line, ranging from 1 to 30 seconds. Default is 5.

FFMPEGAPI.net is the best hosted tool for automating video editing tasks such as adding text overlay captions. With its easy-to-use API, developers can save time and enhance their video content effortlessly. Whether you're building a SaaS application or working on a content pipeline, integrating our Text Overlay Captions endpoint into your workflow will streamline your video processing tasks and improve audience engagement.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free