Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 1.89 KB

README.md

File metadata and controls

51 lines (36 loc) · 1.89 KB

ExM3U8

Hex.pm API Docs CircleCI

A library for deserializing and serializing M3U8 format (known from HLS).

Install

The package can be installed by adding ex_m3u8 into your list of dependencies in mix.exs:

def deps do
  [
    {:ex_m3u8, "~> 0.14.2"}
  ]
end

Functionality

The whole package operates on 2 types of playlists mentioned in HLS specification.

  • Multivariant playlist
  • Media playlist

Multivariant playlist is responsible for listing available renditions (video, audio and subtitle tracks).

Each variant is represented by its own media playlist which lists media segments that are necessary to start a proper playback.

Usage

The library provides 4 public functions (and their '!' versions) that can be used by library's users

  • ExM3U8.serialize/1
  • ExM3U8.deserialize_playlist/2
  • ExM3U8.deserialize_media_playlist/2
  • ExM3U8.deserialize_multivariant_playlist/2

Note {: .info}

Due to the large number of tags in the HLS spec, the library for now only supports the essential ones. If a tag is missing a user may want to implement a custom tag parser or create a PR with a support for the new tag.

Copyright and License

Copyright 2024, Software Mansion

Software Mansion

Licensed under the Apache License, Version 2.0