xmltovtt 1.0.51 copy "xmltovtt: ^1.0.51" to clipboard
xmltovtt: ^1.0.51 copied to clipboard

A Dart console app to convert subtitle files from xml to vtt.

XML to VTT subtitles Converter #

License Build Deploy Release GitHub code size

A dart console application to convert and generate vtt files from a specific xml subtitle files.

Usage #

The example files are located in the data folder, used also for testings.

This command will genarate vtt files from all xml files located in the specified folder, the current folder by default.

  • The command: xmltovtt -d <folder path>.
  • Ex:
    • xmltovtt: Executed in the current folder.
    • xmltovtt -d data: Executed in the data folder.

How it works #

The xml files format:

<xml>
  <dia>
    <st>15330</st>
    <et>15870</et>
    <sub><![CDATA[The 1st subtitle.]]></sub>
    <style name="style" version="2">
      <position alignment="BottomCenter" horizontal-margin="50%" vertical-margin="86%" />
    </style>
  </dia>
  <dia>
    <st>49250</st>
    <et>51250</et>
    <sub><![CDATA[The second subtitle.]]></sub>
    <style name="style" version="2">
      <position alignment="BottomCenter" horizontal-margin="50%" vertical-margin="86%" />
    </style>
  </dia>
</xml>
copied to clipboard
Time xml ms vtt Description
st: start time 15330 00:00:15.330 Converted from ms to hh:mm:ss.xxx (xxx: milliseconds)
et: end time 15870 00:00:15.870 Converted from ms to hh:mm:ss.xxx (xxx: milliseconds)
  • sub: the subtitle is marked as <sub><![CDATA[The sub title]]></sub>.

The converted vtt files format:

WEBVTT


00:00:15.330 --> 0:00:15.870
Look at Sword Point.

00:00:49.250 --> 0:00:51.250
to protect you.
copied to clipboard
1
likes
160
points
43
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.21 - 2025.04.05

A Dart console app to convert subtitle files from xml to vtt.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

args

More

Packages that depend on xmltovtt