Adding subtitles to a video used to require a separate transcription and editing workflow. A video would be uploaded, an audio track would be transcribed, subtitle timings would be created, and the final subtitle file would then be attached to the video.
That workflow still works, but it creates additional processing steps.
AWS MediaConvert can be used with speech transcription workflows to generate subtitles as part of a managed video processing pipeline. This is useful when an application needs to process many uploaded videos and automatically produce subtitle tracks without manually editing every file.
The practical architecture usually combines Amazon S3, AWS Elemental MediaConvert, and a speech-to-text service such as Amazon Transcribe.
This article explains how to design that workflow, where MediaConvert fits, how subtitle files are handled, and what developers should consider before putting automated subtitle generation into production.
The Basic Architecture
A typical automated subtitle workflow looks like this:
Video Upload
|
v
Amazon S3
|
v
MediaConvert / Video Processing
|
v
Speech Transcription
|
v
Subtitle File
|
v
MediaConvert
|
v
Output Video + Subtitle Track
|
v
Amazon S3The exact orchestration can vary, but the responsibilities should remain clear.
The video processing service handles media conversion and packaging, while the transcription service produces the text and timing information required for subtitles.
Why Automate Subtitle Generation?
Manual subtitle creation becomes expensive when an application handles hundreds or thousands of videos.
Consider a training platform where users upload:
10 videos per day
50 videos per day
500 videos per dayA manual workflow quickly becomes a bottleneck.
Automation allows the application to process videos asynchronously.
User uploads video
|
v
Upload completes
|
v
Processing job created
|
v
Video processed
|
v
Speech transcribed
|
v
Subtitle generated
|
v
Final asset publishedThe user does not need to remain connected while the processing happens.
Store the Original Video in Amazon S3
The first step is usually uploading the source video to Amazon S3.
A simple object structure might look like:
s3://video-platform/
uploads/
course-1001/
lesson-01.mp4Keep the original object separate from generated files.
For example:
s3://video-platform/
uploads/
processed/
subtitles/This separation makes lifecycle management and troubleshooting easier.
It also prevents an application from accidentally overwriting the original source video.
Detecting a New Video
An application can trigger processing after a new video arrives in S3.
A common event-driven architecture is:
S3 Upload
|
v
S3 Event
|
v
AWS Lambda / EventBridge
|
v
Processing WorkflowThe trigger should create a processing job rather than trying to perform the entire video workflow synchronously.
For example:
Upload completed
|
v
Create job
|
v
Return response to userThe user interface can then display:
Uploaded
Processing
Transcribing
Generating subtitles
ReadyThis is much better than keeping an HTTP request open while a video is being processed.
Where AWS MediaConvert Fits
MediaConvert is a managed video processing service.
It can be used to:
Convert video formats
Create different resolutions
Process audio tracks
Generate output files
Package video content
Include subtitle tracks in output media
The important architectural point is that MediaConvert does not need to perform every step itself.
A subtitle pipeline may look like:
Source Video
|
v
Extract / Process Audio
|
v
Speech Transcription
|
v
Subtitle File
|
v
MediaConvert
|
v
Final VideoKeeping these responsibilities separate makes the pipeline easier to maintain.
Generate the Transcript
The speech recognition stage converts the audio into text with timing information.
For example, the resulting transcript may conceptually contain:
00:00:01.200 --> 00:00:04.000
Welcome to the course.
00:00:04.100 --> 00:00:07.500
In this lesson, we will build an API.The exact transcript format depends on the transcription service and workflow.
The important information is:
Text
Start time
End time
Speaker information when available
Confidence information when supported
Subtitle generation depends heavily on the timing data.
A transcript without useful timing information cannot produce a properly synchronized subtitle track.
Subtitle Formats
Different video workflows use different subtitle formats.
Common formats include:
WebVTT
SRT
TTML
Embedded subtitle tracks
The format should be selected based on how the video will be consumed.
For example, a browser-based video player may use WebVTT.
A downloadable subtitle file may use SRT.
An enterprise media workflow may require another format depending on the packaging and playback environment.
Do not choose the subtitle format only because it is easy to generate. Choose it based on the final playback requirements.
Example WebVTT Output
A simplified WebVTT file looks like this:
WEBVTT
00:00:01.200 --> 00:00:04.000
Welcome to the course.
00:00:04.100 --> 00:00:07.500
In this lesson, we will build an API.The timestamps determine when the text appears and disappears.
A subtitle generation service should therefore preserve timing information carefully.
Even small timing errors can make subtitles difficult to follow.
Configure the MediaConvert Job
Once the video and subtitle file are available, create a MediaConvert job that references the source media and subtitle input.
A typical workflow is:
Input Video
|
+-- Video Settings
+-- Audio Settings
+-- Subtitle Input
|
v
MediaConvert
|
v
Output Video
+
Subtitle TrackThe exact MediaConvert job configuration depends on the required output format, codec, packaging type, and subtitle delivery method.
For example, a web application may require an MP4 output plus a separate subtitle file, while another workflow may package the subtitles with the video stream.
Creating the Job From Code
A backend service can create MediaConvert jobs using the AWS SDK.
A simplified C# structure looks like this:
using Amazon.MediaConvert;
using Amazon.MediaConvert.Model;
var client = new AmazonMediaConvertClient();
var request = new CreateJobRequest
{
Role = mediaConvertRoleArn,
Settings = new JobSettings
{
// Configure input, output,
// audio, video, and subtitles here.
}
};
var response = await client.CreateJobAsync(request);The actual JobSettings configuration depends on the media workflow.
For production applications, avoid putting a large MediaConvert configuration directly inside application code.
A configuration object or template is usually easier to maintain.
Use Job Templates
A video platform may generate thousands of jobs with similar settings.
Instead of rebuilding every setting for every request, define reusable job templates.
For example:
Course Video Template
|
+-- H.264 output
+-- Standard resolution
+-- WebVTT subtitles
Mobile Video Template
|
+-- Mobile resolution
+-- Optimized bitrate
+-- Subtitle trackThe application then supplies only the values that change between jobs.
This reduces configuration errors and makes changes easier to manage.
Tracking Processing Status
Video processing is asynchronous.
The application should maintain a processing record such as:
Video ID
Source Location
MediaConvert Job ID
Transcript Status
Subtitle Status
Output Location
Processing Status
Error Message
Created At
Completed AtFor example:
video-1001
|
+-- Uploaded
+-- Transcription started
+-- Transcript ready
+-- Subtitle generated
+-- MediaConvert started
+-- Completed
Join the conversation! Your thoughts help the community grow.