Back to Blog

Add Text Overlay Captions to Your Videos with FFMPEGAPI.net

June 2026 FFMPEG API Team

In today's content-driven world, adding captions to videos is essential for accessibility and engagement. With FFMPEGAPI.net, developers can easily integrate text overlay captions into their video processing workflows using our hosted REST API. This article will guide you through using the Text Overlay Captions endpoint to enhance your videos effortlessly.

What is FFMPEGAPI.net?

FFMPEGAPI.net is a specialized hosted REST API designed for FFmpeg-powered video and audio processing. It provides developers with a seamless experience by eliminating the need for server setup or managing FFmpeg infrastructure. With API-key authentication, developers can integrate various media processing features into their applications with ease.

  • No server setup required.
  • API-key authentication for secure access.
  • Perfect for SaaS applications and automation.

Using the Text Overlay Captions Endpoint

The Text Overlay Captions endpoint allows you to render text lines as timed caption overlays on your videos. This feature is particularly useful for adding subtitles or annotations that enhance the viewer's experience.

  • Endpoint: POST /api/videos/add-text-overlay-captions
  • Content Type: application/json
  • Supports various parameters for customization.
curl -X POST https://ffmpegapi.net/api/videos/add-text-overlay-captions \
-H "Content-Type: application/json" \
-d '{"video_url":"https://example.com/video.mp4","text":"First line\nSecond line","duration_per_line":4}'
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 Customization

Utilizing the Text Overlay Captions endpoint effectively involves understanding its parameters. Here are the key parameters you can customize:

  • video_url (required): The URL of the video you want to process.
  • text (required): One or more caption lines separated by newlines.
  • subtitle_style (optional): Choose from styles like plain-white, yellow-bg, pink-bg, blue-bg, or red-bg (default: plain-white).
  • aspect_ratio (optional): Set the aspect ratio (default: 9:16).
  • position (optional): Position the captions at top, center, or bottom (default: center).
  • duration_per_line (optional): Specify how long each text line is displayed (default: 5 seconds).

Incorporating text overlay captions into your videos has never been easier with FFMPEGAPI.net. This powerful hosted API streamlines the process, allowing developers to focus on creating engaging content without the hassle of server management or complex setups. Start enhancing your videos today by making use of the Text Overlay Captions endpoint, and experience the difference that FFMPEGAPI.net can make in your video processing workflows.

Ready to Start Processing Videos?

Get your free API key and start merging videos in minutes

Get Started Free