#hls #m3u #parse #parser #extm3u

hls-playlist

A library for serializing and deserializing HLS playlists (aka extended M3U playlists)

1 unstable release

0.1.0 May 21, 2024

#802 in Parser implementations

Download history 147/week @ 2024-05-18 7/week @ 2024-05-25

154 downloads per month

Apache-2.0

120KB
2K SLoC

HLS Playlist

A library for serializing and deserializing HLS playlists (aka extended M3U playlists).

As specified by this updated version of RFC 8216.

Usage

use hls_playlist::tags::Tag;

let mut output = vec![];

Tag::M3u.serialize(&mut output).unwrap();
Tag::XStart { offset_seconds: 10.0, is_precise: false }.serialize(&mut output).unwrap();

assert_eq!(String::from_utf8(output).unwrap(), "\
#EXTM3U
#EXT-X-START:TIME-OFFSET=10
");

Roadmap

This library is 100% finished and feature-complete as far as serializing tags goes, but I'd like to eventually implement a serializer for the higher level playlist representation, and also deserialization.

  • Serialize steering manifest
  • Serialize tags
  • Serialize playlist
  • Deserialize steering manifest
  • Deserialize tags
  • Deserialize playlist

Dependencies

~1–1.5MB
~24K SLoC