mediastream-rs

Crates.iomediastream-rs
lib.rsmediastream-rs
version0.1.2
created_at2025-07-26 11:19:54.52211+00
updated_at2025-07-29 08:53:42.839468+00
descriptionA library for parsing and generating m3u8 file
homepagehttps://github.com/Klrohias/swiftstream/tree/main/mediastream-rs
repositoryhttps://github.com/Klrohias/swiftstream
max_upload_size
id1769089
size19,128
CheeseQingyi (qingyiwebt)

documentation

README

mediastream-rs

A library for parsing and generating m3u8 file.

Installation

cargo add mediastream-rs

or,

mediastream-rs = "*"

Usage

use mediastream_rs::Parser;
use std::io::Cursor;

// 1. Parse
let mut parser = Parser::new(Cursor::new(r#"
#EXTM3U x-tvg-url="test"
#EXTINF:1 tvg-id="a" provider-type="iptv",A
http://example.com/A.m3u8"#));
parser.parse().unwrap();
let result = parser.get_playlist();
// Do your works with result...

// 2. Generate
println!("{}", result.to_string());

Why make new wheels?

The existing crates do not meet my needs; they can either only parse m3u8 from a certain path (online or local) or cannot output the parsed m3u8 file back to m3u8.

License

MIT

Commit count: 0

cargo fmt