Prompt
How do I burn subtitles into a video through an API?
Latest observation
Nov 1, 2026
OpenAI APIWeb search: off
To burn subtitles into a video through an API, you usually use a video processing service that supports subtitle embedding / hardcoding. The exact steps depend on the API provider, but the workflow is generally the same:
Typical workflow
- Upload the video to the API or provide a video URL.
- Upload the subtitle file (usually
.srt,.vtt, or.ass) or provide subtitle text/URL. - Create a processing job that tells the service to:
- overlay the subtitles on the video
- optionally choose font, size, color, position
- Poll job status or use a webhook callback.
- Download the processed video once complete.
Common API approaches
1) FFmpeg-based API
Some services expose a job that is effectively equivalent to:
ffmpeg -i input.mp4 -vf "subtitles=subtitles.srt" -c:a copy output.mp4
That is what “burning in” means: the subtitles are rendered into the pixels of the video.
2) Cloud video processing APIs
Examples:
- AWS MediaConvert
- Mux
- Cloudinary
- Shotstack
- Dalet / Brightcove / Wowza-type systems
They usually accept a JSON payload like:
- input video URL
- subtitle asset URL or file
- output settings
- burn/hardcode flag
Example API pattern
A generic request might look like:
{
"input_video_url": "https://example.com/video.mp4",
"subtitle_url": "https://example.com/subtitles.srt",
"burn_subtitles": true,
"output_format": "mp4"
}
And the response might return a job ID:
{
"job_id": "abc123",
"status": "queued"
}
Then you check:
GET /jobs/abc123
Until it returns:
{
"status": "completed",
"output_url": "https://example.com/output.mp4"
}
Important notes
- Burned-in subtitles cannot be turned off later.
- If you want subtitles to remain optional, use soft subtitles instead of burning them in.
- For SRT/VTT subtitles, make sure the character encoding is UTF-8.
- If your subtitles need styling, ASS/SSA is often better than SRT.
If you’re using your own API
If you control the backend, you can:
- receive video + subtitle file uploads
- run FFmpeg on a server/container
- return the processed file
Example FFmpeg command:
ffmpeg -i input.mp4 -vf "subtitles=subtitles.srt" -c:a copy output.mp4
Or with ASS styling:
ffmpeg -i input.mp4 -vf "ass=subtitles.ass" -c:a copy output.mp4
If you want, I can help with:
- a specific API provider (AWS, Cloudinary, Mux, Shotstack, etc.)
- a Node.js/Python example
- a design for your own video-processing API