| Crates.io | mediastream-rs |
| lib.rs | mediastream-rs |
| version | 0.1.2 |
| created_at | 2025-07-26 11:19:54.52211+00 |
| updated_at | 2025-07-29 08:53:42.839468+00 |
| description | A library for parsing and generating m3u8 file |
| homepage | https://github.com/Klrohias/swiftstream/tree/main/mediastream-rs |
| repository | https://github.com/Klrohias/swiftstream |
| max_upload_size | |
| id | 1769089 |
| size | 19,128 |
mediastream-rsA library for parsing and generating m3u8 file.
cargo add mediastream-rs
or,
mediastream-rs = "*"
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());
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.
MIT