1c7 / vtt-test-file

.vtt file for testing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VTT Test File

Here is a bunch of .vtt file in the vtt files/ folder

All of .vtt file follow this specification:
WebVTT: The Web Video Text Tracks Format

Spec Screenshot

Purpose

Testing

Who can benefit from this?

  • Developer
  • Developer who needs to write a program to deal with .vtt file.

What kind of benefit?

Save time

How to use this?

If you are writing a program that parse .vtt file.
and you want to test if the program can handle all kind of variation of vtt file.
Just grab vtt file from the vtt files/ folder and use them for testing.

Why I created this

I built a Desktop app called Tern - Subtitle File Translator
It can read .srt .ass .vtt and translate them into another language.
(For example, French to English)
It's like a Google Translator Toolkit replacement

I have to parse .vtt file.
To make sure my program works with all kind of .vtt file.
I create/collected these.

I open-source it so everyone can save time.

Package: node-webvtt

I did a quick test on npm package: node-webvtt
You can run test with

git clone https://github.com/1c7/vtt-test-file.git
cd vtt-test-file/
npm install

node test-node-webvtt.js

Side note

If you are using youtube-dl, for example:

youtube-dl https://www.youtube.com/watch?v=T7Rv4tGRlfc --skip-download --sub-format vtt --write-sub

You would get a vtt file
The Future of Artificial Intelligence - Crash Course AI #20-T7Rv4tGRlfc.en.vtt

Which contain these text

WEBVTT
Kind: captions
Language: en

00:00:00.240 --> 00:00:05.410
Hey everyone, I’m Jabril and welcome to
the final episode of Crash Course AI.

Let's focus on this part

Kind: captions
Language: en

This Kind: and Language:
Is not in the WebVTT standard
(I am pretty sure about that, but if I am wrong, let me know)
I ask about that on youtube-dl Issue

Clearly it's from Youtube.
Youtube is not following WebVTT standard

Side note conclusion:

Just delete these manually

Kind: captions
Language: en

or ignore them in your program

Contribution

Any contribution is welcome!

If you want add new vtt file or have any other improvement for this repo,
Use Github issue or send a Pull Requests, Thanks in advance!

About

.vtt file for testing


Languages

Language:JavaScript 100.0%