In today's fast-paced digital world, adding subtitles to videos is a common requirement for content creators and developers. FFMPEGAPI.net offers a hosted REST API that simplifies this process, allowing you to burn ASS subtitles into your videos without the hassle of managing your own FFmpeg infrastructure. This article will guide you through using the Add Subtitles feature effectively.
Why Choose FFMPEGAPI.net for Video Subtitle Processing?
FFMPEGAPI.net provides a seamless way to integrate video processing capabilities into your applications. With our API, you can focus on development without worrying about server setup or maintenance. Here are some reasons why FFMPEGAPI.net is the best choice for adding subtitles to your videos:
- No server management required.
- API-key authentication for secure access.
- Fast and reliable processing suitable for automation and SaaS applications.
- Ideal for content pipelines and AI workflows.
Understanding the Add Subtitles Endpoint
The Add Subtitles endpoint is a powerful feature that allows you to burn ASS subtitles into your video files. The process is straightforward, requiring just a few parameters to get started.
- Endpoint Path: /api/add_subtitles
- HTTP Method: POST
- Content Type: application/json
Parameters for the Add Subtitles Request
To use the Add Subtitles endpoint, you'll need to provide the following parameters in your request body:
- video_url (string, required): The URL of the video file.
- subtitle_url (string, required): The URL of the ASS/SSA subtitle file.
- async (boolean, optional): If true, the job_id will be returned immediately, and processing will occur in the background.
Making a Request to Add Subtitles
Here's how you can use curl to make a request to the Add Subtitles endpoint to add subtitles to 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", "async": false}'
Using Python to Add Subtitles
If you prefer Python, you can also make the same request using the requests library. Here's an example:
import requests
url = 'https://www.ffmpegapi.net/api/add_subtitles'
data = {
'video_url': 'https://example.com/video.mp4',
'subtitle_url': 'https://example.com/subtitles.ass',
'async': False
}
response = requests.post(url, json=data)
print(response.json())
FFMPEGAPI.net is designed for developers seeking efficient video processing solutions. By using the Add Subtitles endpoint, you can streamline your workflows and focus on delivering high-quality content. Whether you are building a content pipeline, a SaaS application, or an automation tool, FFMPEGAPI.net provides the resources you need to succeed. Start using our API today and experience effortless media processing.