Generate Videos With Subtitles Via API

Build automated image and video editing workflows and applications with Shotstack.

GET STARTED FOR FREE Example

The internet's most advanced image and video editing API

Shotstack is the most user friendly, powerful and reliable infrastructure solution to automatically generate videos with subtitles.

GET STARTED FOR FREE

The only thing you need is some JSON

{
"timeline": {
"background": "#000000",
"tracks": [
{
"clips": [
{
"asset": {
"type": "title",
"text": "Hi, Im Jeff the founder of Shotstack, the cloud video editing API.",
"style": "subtitle",
"color": "#ffffff",
"size": "small",
"background": "#000000",
"position": "bottom",
"offset": {
"y": -0.4
}
},
"start": 1.3,
"length": 3.67
},
{
"asset": {
"type": "title",
"text": "This is a quick demo video to show you just how easy",
"style": "subtitle",
"color": "#ffffff",
"size": "small",
"background": "#000000",
"position": "bottom",
"offset": {
"y": -0.4
}
},
"start": 5.07,
"length": 3.92
},
{
"asset": {
"type": "title",
"text": "and quick and simple it is to add captions onto your videos.",
"style": "subtitle",
"color": "#ffffff",
"size": "small",
"background": "#000000",
"position": "bottom",
"offset": {
"y": -0.4
}
},
"start": 9.09,
"length": 4
},
{
"asset": {
"type": "title",
"text": "So follow along with the example using Node, PHP or Ruby and within no time",
"style": "subtitle",
"color": "#ffffff",
"size": "small",
"background": "#000000",
"position": "bottom",
"offset": {
"y": -0.4
}
},
"start": 13.199,
"length": 5.4
},
{
"asset": {
"type": "title",
"text": "you should be adding captions to your own videos.",
"style": "subtitle",
"color": "#ffffff",
"size": "small",
"background": "#000000",
"position": "bottom",
"offset": {
"y": -0.4
}
},
"start": 18.699,
"length": 2.36
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/examples/captions-example.mp4",
"volume": 1
},
"start": 0,
"length": 21.08
}
]
}
]
},
"output": {
"format": "mp4",
"resolution": "sd"
}
}

Tutorials & Resources

Learn how to automatically generate videos with subtitles via API

An introduction to video captions and subtitles
An introduction to video captions and subtitles

Everything you need to know about captions and subtitles and why they are important for your users.

Read more

Convert an AWS transcription to an SRT file using Node.js
Convert an AWS transcription to an SRT file using Node.js

How to convert an AWS Transcription JSON file into an SRT subtitles file.

Read more

How to add captions to video using PHP
How to add captions to video using PHP

Automatically add captions or subtitles to a video using PHP. This guide show you how to render an SRT subtitles file and add it to a video.

Read more

Demo's & Code Examples

Automatically Generate videos with subtitles by using demo code

Picture in Picture Video Editor
Picture in Picture Video Editor

Overlay a small video over the top of a background video to create a picture in picture video effect

Go to demo

Pexels Video Maker
Pexels Video Maker

Search the Pexels stock footage video library and the Shotstack API will automatically compile an edit with music and a title

Go to demo

Watermark Video
Watermark Video

Add a watermark to a video using the Shotstack API. This free demo lets you upload a video and add a watermark

Go to demo