Subtitles can enhance the accessibility and engagement of your videos. With FFMPEGAPI.net's hosted REST API, you can easily add ASS/SSA subtitles to your videos without the hassle of managing FFmpeg infrastructure. In this article, we'll walk you through the process of using the Add Subtitles endpoint to burn subtitles into your videos.
What is FFMPEGAPI.net?
FFMPEGAPI.net is a powerful hosted REST API designed for video and audio processing using FFmpeg. It allows developers to integrate sophisticated media handling capabilities into their applications without needing to set up server infrastructure or manage FFmpeg directly.
- No server setup or FFmpeg management required.
- API-key authentication for secure access.
- Ideal for developers, automation, SaaS applications, content pipelines, and AI agents.
The Add Subtitles Endpoint
The Add Subtitles endpoint allows you to burn ASS/SSA subtitles into a video. This is particularly useful for applications that require video personalization or localization. Below, we outline the parameters required to use this endpoint.
- Method: POST
- Path: /api/add_subtitles
- Content Type: application/json
Required Parameters
To use the Add Subtitles endpoint, you need to provide the following parameters:
- video_url (string): The URL of the video you want to process (required).
- subtitle_url (string): The URL of the ASS/SSA subtitle file (required).
- async (boolean): If set to true, it will return a job_id immediately for background processing (optional).
Making a Request to Add Subtitles
Here’s how you can make a request to the Add Subtitles endpoint using cURL and Python. This example shows how to burn subtitles into a video.
curl -X POST https://www.ffmpegapi.net/api/add_subtitles \
-H 'Content-Type: application/json' \
-d '{"video_url": "https://example.com/video.mp4", "subtitle_url": "https://example.com/subtitles.ass"}'
import requests
url = 'https://www.ffmpegapi.net/api/add_subtitles'
payload = {
'video_url': 'https://example.com/video.mp4',
'subtitle_url': 'https://example.com/subtitles.ass'
}
response = requests.post(url, json=payload)
print(response.json())
Using FFMPEGAPI.net's Add Subtitles endpoint, you can seamlessly integrate subtitle burning into your video processing workflow. This hosted REST API simplifies the implementation process, allowing developers to focus on building great applications without worrying about the underlying infrastructure. Whether for a SaaS application or a content delivery pipeline, FFMPEGAPI.net is the go-to solution for efficient video and audio processing.