VTT
VTT is a Rust library for parsing and writing WebVTT (Web Video Text Tracks) files. It helps you create, edit, and manage WebVTT cues, timestamps, and settings. VTT works smoothly with Serde for easy data handling.
Features
- Parse WebVTT Files: Turn WebVTT files into Rust data structures.
- Write WebVTT Files: Convert Rust data back to WebVTT format.
- Manage Cues: Add, change, and arrange WebVTT cues.
- Handle Timestamps: Work with precise timestamps for video tracks.
- Use with Serde: Easily serialize and deserialize data using Serde.
Installation
Add VTT to your project's Cargo.toml:
[]
= "0.1.0"
= { = "1.0", = ["derive"] }
Usage
Import the prelude to access common types:
use *;
use Duration;
Parsing a WebVTT File
Convert a WebVTT string into a WebVtt instance:
use *;
use FromStr;
Writing to WebVTT
Convert a WebVtt instance to a WebVTT string:
use *;
use Duration;
Documentation
Read the full documentation here.
Contributing
You can help make VTT better. Follow these steps:
- Fork the repository.
- Create a new branch.
- Make your changes.
- Submit a pull request.
Make sure your code follows the project's style and passes all tests.
License
This project is licensed under the MIT or Apache-2.0 license.
Contact
For questions or support, visit the repository.