I tried to use Elemental MediaConvert to generate a video with burned-in caption using TTML file as the source of the caption. But when I set Pass style information to ENABLED under the Output -> Captions tab in the console, the caption did not appear in the output video. I could not figure out why this happened. The format for the TTML file follows the guideline in https://docs.aws.amazon.com/mediaconvert/latest/ug/ttml-style-formatting.html.
Below is the JSON request body used for the job:
{
"Settings": {
"TimecodeConfig": {
"Source": "ZEROBASED"
},
"OutputGroups": [
{
"CustomName": "MP4",
"Name": "File Group",
"Outputs": [
{
"ContainerSettings": {
"Container": "MP4",
"Mp4Settings": {}
},
"VideoDescription": {
"CodecSettings": {
"Codec": "H_264",
"H264Settings": {
"MaxBitrate": 1000000,
"RateControlMode": "QVBR",
"SceneChangeDetect": "TRANSITION_DETECTION"
}
}
},
"AudioDescriptions": [
{
"CodecSettings": {
"Codec": "AAC",
"AacSettings": {
"Bitrate": 96000,
"CodingMode": "CODING_MODE_2_0",
"SampleRate": 48000
}
}
}
],
"NameModifier": "_hardsub_en",
"CaptionDescriptions": [
{
"CaptionSelectorName": "Captions Selector 1",
"DestinationSettings": {
"DestinationType": "BURN_IN",
"BurninDestinationSettings": {
"ShadowXOffset": 0,
"TeletextSpacing": "AUTO",
"Alignment": "CENTERED",
"ShadowColor": "NONE",
"FontOpacity": 255,
"FontSize": 20,
"FallbackFont": "PROPORTIONAL_SANSSERIF",
"FontColor": "WHITE",
"FontResolution": 96,
"ShadowYOffset": 0,
"StylePassthrough": "ENABLED"
}
},
"LanguageCode": "ENG"
}
]
}
],
"OutputGroupSettings": {
"Type": "FILE_GROUP_SETTINGS",
"FileGroupSettings": {
"Destination": "s3://destBucket/"
}
}
}
],
"Inputs": [
{
"AudioSelectors": {
"Audio Selector 1": {
"DefaultSelection": "DEFAULT"
}
},
"VideoSelector": {},
"TimecodeSource": "ZEROBASED",
"CaptionSelectors": {
"Captions Selector 1": {
"SourceSettings": {
"SourceType": "TTML",
"FileSourceSettings": {
"SourceFile": "s3://sourceBucket/test video_en.ttml"
}
}
}
},
"FileInput": "s3://sourceBucket/test video.mp4"
}
]
},
"AccelerationSettings": {
"Mode": "DISABLED"
},
"StatusUpdateInterval": "SECONDS_60",
"Priority": 0
}
This is a sample of the TTML file:
<?xml version="1.0" encoding="utf-8"?>
<tt xmlns="http://www.w3.org/ns/ttml" xmlns:ttp="http://www.w3.org/ns/ttml#parameter" ttp:timeBase="media" xmlns:tts="http://www.w3.org/ns/ttml#style" xml:lang="en" xmlns:ttm="http://www.w3.org/ns/ttml#metadata">
<head>
<metadata>
<ttm:title></ttm:title>
</metadata>
<styling>
<style xml:id="s0" tts:backgroundColor="black" tts:fontStyle="normal" tts:fontSize="20" tts:fontFamily="proportionalSansSerif" tts:color="white" />
I have tried to do some research and tried different inputs but I cannot figure out what was wrong, so I would like to ask for help in figuring out what was wrong with this and how should I make it work. Thank you in advance for the help.