Hello,
I have been trying for some time to add captions / subtitles from an SRT file through the API, but although the video generates without any errors, I am not seeing captions at all. Does anybody know what I may be doing incorrectly? I have hidden sensitive data like URLS.
Thank you in advance!
Here is a copy of my API request:
{
"timeline": {
"background": "#000000",
"tracks": [
{
"clips": [
{
"asset": {
"type": "video",
"src": "https:\/\/XXX.XXX\/williams.mp4",
"volume": 0
},
"start": 0,
"length": 5
},
{
"asset": {
"type": "video",
"src": "https:\/\/XXX.XXX\/williams.mp4",
"volume": 0
},
"start": 5,
"length": 5
}
]
},
{
"clips": [
{
"asset": {
"type": "audio",
"src": "https:\/\/XXX.XXX\/music.mp3",
"effect": "fadeInFadeOut",
"volume": 0.200000000000000011102230246251565404236316680908203125
},
"start": 0,
"length": 10
},
{
"asset": {
"type": "audio",
"src": "https:\/\/XXX.XXX\/output1.mp3",
"volume": 0.8000000000000000444089209850062616169452667236328125
},
"start": 0,
"length": 10
}
]
},
{
"clips": [
{
"asset": {
"type": "caption",
"src": "https:\/\/XXX.XXX\/output1.srt",
"font": {
"color": "#ffffff",
"size": 50,
"lineHeight": 1.5,
"family": "Montserrat ExtraBold",
"stroke": "#000000",
"strokeWidth": 1
},
"background": {
"color": "#000000",
"padding": 20,
"borderRadius": 10,
"opacity": 0.59999999999999997779553950749686919152736663818359375
}
},
"start": 0,
"length": "end",
"position": "center"
}
]
}
]
},
"output": {
"format": "mp4",
"size": {
"width": 1080,
"height": 1920
}
}
}