https://github.com/membraneframework/ex_m3u8
Elixir package for serializing and deserializing M3U8 manifests.
https://github.com/membraneframework/ex_m3u8
Last synced: 7 months ago
JSON representation
Elixir package for serializing and deserializing M3U8 manifests.
- Host: GitHub
- URL: https://github.com/membraneframework/ex_m3u8
- Owner: membraneframework
- License: apache-2.0
- Created: 2023-04-25T16:34:08.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-15T11:10:21.000Z (about 2 years ago)
- Last Synced: 2024-04-23T12:57:20.290Z (about 2 years ago)
- Language: Elixir
- Size: 68.4 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ExM3U8
[](https://hex.pm/packages/ex_m3u8)
[](https://hexdocs.pm/ex_m3u8/)
[](https://circleci.com/gh/membraneframework/ex_m3u8)
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`:
```elixir
def deps do
[
{:ex_m3u8, "~> 0.15.4"}
]
end
```
## Functionality
The whole package operates on 2 types of playlists mentioned in [HLS specification](https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis).
* 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](https://swmansion.com/?utm_source=git&utm_medium=readme&utm_campaign=membrane)
[](https://swmansion.com/?utm_source=git&utm_medium=readme&utm_campaign=membrane)
Licensed under the [Apache License, Version 2.0](LICENSE)