Free plan

Subtitle Convert

Convert subtitle files or shift their timing
POST
/v1/documents/subtitles

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

  1. Choose this tool.
  2. Add your subtitle file with Upload or drag and drop.
  3. Choose the type to make, and the time shift or speed change if needed.
  4. Press Generate.
  5. 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.
Open in the Studio
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;
FAQ

Frequently asked questions

Convert a subtitle file between SRT, WebVTT, ASS/SSA, SBV and LRC, or to plain text or JSON, with the times shifted or stretched for another frame rate.

Subtitle Convert works from text and settings, so no file is needed. Every input is optional.

Subtitle Convert is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/documents/subtitles with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.