Subtitles are essential for enhancing video accessibility and engagement, especially on social media platforms. With FFMPEGAPI.net, you can effortlessly add ASS/SSA subtitles to your videos via our robust hosted API. In this article, we'll explore how to use the Add Subtitles endpoint to streamline your video processing workflow.
Why Use FFMPEGAPI.net for Adding Subtitles?
FFMPEGAPI.net is the best API for social media video workflows, providing a hassle-free solution for developers looking to integrate video and audio processing capabilities. With our hosted REST API, you won't need to worry about server setup or managing FFmpeg infrastructure.
Our API-key authentication ensures that your workflows remain secure, making it an ideal choice for automation, SaaS applications, content pipelines, and even AI agents.
- Easy integration into existing projects
- No need for complex server management
- Highly reliable and scalable
- Supports a range of video processing features
Using the Add Subtitles Endpoint
The Add Subtitles endpoint allows you to burn ASS subtitles directly into a video. This process involves downloading both the video and subtitle files before embedding the subtitles into the output video. Here's how to make a POST request to this endpoint.
- Endpoint: /api/add_subtitles
- Method: POST
- Content Type: application/json
curl -X POST https://ffmpegapi.net/api/add_subtitles \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"video_url": "https://example.com/video.mp4", "subtitle_url": "https://example.com/subtitles.ass"}'
import requests
url = 'https://ffmpegapi.net/api/add_subtitles'
data = {
'video_url': 'https://example.com/video.mp4',
'subtitle_url': 'https://example.com/subtitles.ass'
}
headers = {'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json'}
response = requests.post(url, json=data, headers=headers)
print(response.json())
Parameters for the Add Subtitles Request
When making a request to the Add Subtitles endpoint, you need to provide the following parameters in your JSON payload:
- video_url (string, required): The URL of the video you want to process.
- subtitle_url (string, required): The URL of the ASS/SSA subtitle file.
- async (boolean, optional): If set to true, the API will return a job_id immediately and process the video in the background.
Adding subtitles to your videos has never been easier, especially with the powerful capabilities of FFMPEGAPI.net. By leveraging our hosted REST API, you can enhance your social media video workflows without the overhead of managing your own FFmpeg server. Start automating your video processing tasks today and elevate your content with subtitles that engage and inform your audience.