Comcast / mamba

Mamba is a Swift iOS, tvOS and macOS framework to parse, validate and write HTTP Live Streaming (HLS) data.
Apache License 2.0
182 stars 40 forks source link

LHLS Support - Low-Latency HLS #77

Open bijanmmarkes opened 5 years ago

bijanmmarkes commented 5 years ago

Feature Request

It doesn't seem that Mamba currently supports Low-Latency HLS, is this in the plan, or did I miss something? It claims that this writes HLS playlists, does this mean I can hook up my AV Inputs to this library to write the streams and publish them to an HLS server? I cannot seem to find sufficient information on this. More than happy to contribute to this project as I am looking for a good solution, I'm just having trouble determining exactly what this library is capable of based on the documentation and lack of examples.

Tasks

References

Open Questions

  1. Did I miss something, or does this plugin provide any type of LHLS support? (Low-Latency HLS).
  2. Great work, perhaps it's because this is mostly for streaming video that is not reliant on live-streaming, but I hope I can utilize this for my new LHLS library.
dcoufal commented 5 years ago

@bijanmmarkes Thanks for your feature request.

mamba is a library for parsing HLS into a editable object, which you can edit live in your tvOS/iOS/macOs app, and then output your edited HLS for playback.

So, there is no "player". It's expected that the user would be intercepting HLS before it gets to your player (likely AVFoundation), parsing and editing it and outputting new HLS to feed into the player.

It can parse all forms of HLS (Live, VOD and Event, and in fact, has some special handling for Event playlists to improve performance)

Given that, you are correct that we do not have LLHLS support, but it would be fairly simple to add this support. If you look at the PantosTag enum, that is a list of all the "official" HLS tags that mamba knows how to parse natively. So, one could add the new tags to that enum and I think that might be all that's required.

If you wanted to read data out of those tags, you might need to add entries to PantosValue as well.

It might also be that the new Delta update would break our parsing (I'm not certain). In which case, there might need to be bug fixes for that.