https://github.com/abhishekkr/gowebvtt
WebVTT Parser, parsing main parts of Web Video Text Tracks Format
https://github.com/abhishekkr/gowebvtt
go golang parser parser-library subtitles subtitles-parsing webvtt webvtt-parser
Last synced: 10 months ago
JSON representation
WebVTT Parser, parsing main parts of Web Video Text Tracks Format
- Host: GitHub
- URL: https://github.com/abhishekkr/gowebvtt
- Owner: abhishekkr
- Created: 2023-02-02T12:03:41.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-24T21:47:21.000Z (almost 3 years ago)
- Last Synced: 2025-01-12T13:15:33.218Z (over 1 year ago)
- Topics: go, golang, parser, parser-library, subtitles, subtitles-parsing, webvtt, webvtt-parser
- Language: Go
- Homepage:
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## gowebvtt
> a Go package to parse **WebVTT subtitles** (Web Video Text Tracks Format) content
* This package currently supports main features i.e. Time Marker, Subtitles & same-line Notes.
* To parse use `gowebvtt.ParseFile(..)`
* Example usage with Options
```
package main
import (
"github.com/abhishekkr/gowebvtt"
)
func main() {
vttOpts := gowebvtt.VttOptions{Enabled: true, MaxLinesPerScene: 2}
vtt, err := gowebvtt.ParseFileWithOptions("sample.vtt", vttOpts)
if errVtt != nil {
panic(errVtt)
}
gowebvtt.Println(vtt)
}
```
---
### ToDo
> [source: VTT Mozilla doc](https://developer.mozilla.org/en-US/docs/Web/API/WebVTT_API)
* add support for multi-line NOTE
* add support for Style & Cue blocks
---