Expand description
§rsubs-lib
This crate provides a simple way for parsing, modifying or converting
subtitle files such as .srt
,.ssa
,.ass
and .vtt
.
Example usage :
In this example we read a .srt file and add 1s(1000ms) to each line Afterwards we print the result to stdout.
use std::str::FromStr;
let mut srt: rsubs_lib::srt::SRTFile = rsubs_lib::Subtitle::from_str("test.srt").expect("failed parsing").into();
for line in srt.lines.iter_mut() {
line.line_end += 1000;
line.line_start += 1000;
}
println!("{}", srt);
Modules§
- Implements helpers for
.srt
. - Implements helpers for
.ass
and.ssa
. - Helper module that provides color and timestamp structs and functions for modifying subtitles.
- Implements helpers for
.vtt
.