About this tool
Subtitle files hold the words shown on a video and the time each appears. This tool changes a subtitle file to another type, such as SRT, WebVTT or plain text. It can also move all the times earlier or later, or stretch them to fit a different video speed. It can remove style tags.
For example, your subtitles appear 2 seconds early, so you move them all 2 seconds later.
How to use it
- Choose this tool.
- Add your subtitle file with Upload or drag and drop.
- Choose the type to make, and the time shift or speed change if needed.
- Press Generate.
- Download the new subtitle file.
What you get back
You get a new subtitle file in the type you chose, with the times adjusted, ready to download.
GOOD TO KNOW
One subtitle file in, one file out. Counts as one document.
TEST IT LIVE
Try Subtitle Convert in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
Documents
Plan
Free
Method
POST
Endpoint
/v1/documents/subtitles
Tool ID
documents.subtitles
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Documents
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/documents/subtitles" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'file=@document.pdf' \
-F 'to=srt' \
-F 'from=auto' \
-F 'encoding=windows-1256'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.documents.subtitles({
"file": 'document.pdf',
"to": "srt",
"from": "auto",
"encoding": "windows-1256"
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->documents()->subtitles([
'file' => 'document.pdf',
'to' => 'srt',
'from' => 'auto',
'encoding' => 'windows-1256',
]);
echo $result->requestId;More in Documents
