Coder Social home page Coder Social logo

vtt-test-file's Introduction

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!

vtt-test-file's People

Contributors

1c7 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.