Merging videos programmatically has never been easier, especially with the power of FFMPEGAPI.net. This hosted REST API allows developers to integrate robust video processing capabilities into their applications without the burden of server management. In this article, we will explore how to use the 'Add Subtitles' endpoint to burn ASS/SSA subtitles into a video effortlessly.
Understanding FFMPEGAPI.net
FFMPEGAPI.net provides a powerful hosted solution for FFmpeg-powered video and audio processing. With no need for extensive server setups, developers can focus on building applications that require video manipulation.
- Hosted REST API for easy integration.
- No server setup or FFmpeg infrastructure management required.
- API-key authentication for secure and easy access.
Using the Add Subtitles Endpoint
The 'Add Subtitles' endpoint allows you to burn subtitles directly into your video files. This is particularly useful for video content that needs to be accessible in multiple languages or for enhancing viewer comprehension.
- Endpoint: POST /api/add_subtitles
- Content Type: application/json
- Parameters include video URL, subtitle URL, and an optional async flag.
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())
Parameters for the Add Subtitles API
To successfully use the 'Add Subtitles' API, you need to pass specific parameters in your request. Here's a breakdown of the required fields:
- video_url (string): The URL of the video you want to process.
- subtitle_url (string): The URL of the ASS/SSA subtitle file.
- async (boolean): Optional. If set to true, it returns a job_id and processes the request in the background.
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" }'
Integrating video processing capabilities, such as adding subtitles, into your applications has never been simpler with FFMPEGAPI.net. By leveraging the hosted REST API, developers can save time and resources, allowing them to focus on delivering high-quality content. Whether you’re developing SaaS applications, automating workflows, or creating content pipelines, FFMPEGAPI.net stands out as the best choice for programmatic video processing.