I am trying to create auto captions for short from content (tiktok/instagram shots/youtube reels) but I cant choose the position for them.
It is best to put them in the lower portion of the video but not too low unless they will be blocked by the username and caption.
Please is there any way to do with shotstack and if not can it be added to the feature requests list.
Hi @nielonielsen,
Currently, the Studio has limitations on precise caption positioning, but you can achieve exact placement using the JSON payload. Adjust the caption asset’s width
and height
along with the clip’s offset
property to position captions within the viewport.
Here’s an example demonstrating these properties in action:
{
"timeline": {
"background": "#FFFFFF",
"tracks": [
{
"clips": [
{
"length": "end",
"asset": {
"type": "caption",
"src": "https://shotstack-assets.s3.amazonaws.com/captions/transcript.srt",
"width": 500,
"font": {
"family": "Montserrat ExtraBold",
"size": "50",
"lineHeight": 1
},
"alignment": {
"horizontal": "left"
}
},
"offset": {
"x": 0.1,
"y": 0.1
},
"start": 0,
"position": "left"
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://github.com/shotstack/test-media/raw/main/captioning/scott-ko.mp4"
},
"start": 0,
"length": "auto"
}
]
}
]
},
"output": {
"format": "mp4",
"size": {
"width": 1280,
"height": 720
}
}
}