Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User hooks for HLS Parser plugin #1983

Closed
anuragkalia opened this issue Jun 10, 2019 · 7 comments
Closed

User hooks for HLS Parser plugin #1983

anuragkalia opened this issue Jun 10, 2019 · 7 comments
Labels
component: HLS The issue involves Apple's HLS manifest format priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: enhancement New feature or request

Comments

@anuragkalia
Copy link

anuragkalia commented Jun 10, 2019

Right now, the interface provided by shaka player smooths over HLS and DASH differences using manifest parser plugins. But what we want is event hooks into that parsing process itself. We have some SCTE-35 ad markers in the HLS stream which we want to read as soon as they are parsed. They look like these:

#EXT-X-CUE-OUT:201.467
#EXT-X-CUE-IN

Right now, there is no clean way to do it other than re-writing the HLS manifest parser itself. What is the closest approximation to achieve what I want as it stands? Is it possible to have some manifest parser events that an outside user can use?

@anuragkalia anuragkalia added the type: question A question from the community label Jun 10, 2019
@joeyparrish
Copy link
Member

Yes, definitely possible. We just need to discuss your requirements and work on the design.

As an example, the DASH manifest parser has a configurable callback for extracting information from custom <ContentProtection> elements. So it is definitely possible to offer hooks into the parsing process.

We're planning some cleanup and refactoring of the HLS parser, so we can work this into the plan.

Would a callback for SCTE-35 data work? Do you just need access to it the tags? Do you need to return something that would influence the parsed manifest somehow?

@anuragkalia
Copy link
Author

Thanks for the quick response!

Do you just need access to it the tags?

Yes. That is the most suitable. A callback when the fragment is parsed, along with the stream id to differentiate from parsed fragments of other streams, should work best.

Let me also take a look at the DASH parser that you mentioned. Where can I see the refactoring plans of HLS parser? I observed that HLS parser was needlessly downloading segments of all the streams rather than the currently active one, so I hope that is also one of the design goals.

@theodab theodab added type: enhancement New feature or request and removed type: question A question from the community labels Jun 10, 2019
@shaka-bot shaka-bot added this to the Backlog milestone Jun 10, 2019
@joeyparrish
Copy link
Member

We don't have a published plan for the HLS refactor at this time, but we are aware that our fetching of segment headers to extract start times is not great. It's high latency, and could be avoided in many cases, and it's something we hope to improve soon.

@thecuriousdev
Copy link

This will add a lot of flexibility. I am also facing a similar issue, needs to access the tags. I'm glad that this is being considered and happy to contribute as well. What is your recommendation to achieve this with the current limitations?

anuragkalia pushed a commit to anuragkalia/shaka-player that referenced this issue Jun 11, 2019
@ismena
Copy link
Contributor

ismena commented Jun 20, 2019

@joeyparrish
Joey, could you either schedule this for the team or discuss the pull request design with the interested contributors!

Thanks <3

@ismena ismena added the component: HLS The issue involves Apple's HLS manifest format label Aug 1, 2019
@joeyparrish joeyparrish modified the milestones: Backlog, Backlog 2 Jan 28, 2020
@derekdowling
Copy link

I have filed an issue with a similar use case in mind: #3523.

@joeyparrish joeyparrish added the priority: P3 Useful but not urgent label Oct 4, 2021
@avelad
Copy link
Member

avelad commented Apr 8, 2024

Duplicate of #3523

@avelad avelad marked this as a duplicate of #3523 Apr 8, 2024
@avelad avelad closed this as completed Apr 8, 2024
@avelad avelad removed this from the Backlog milestone Apr 8, 2024
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Jun 7, 2024
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Jun 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: HLS The issue involves Apple's HLS manifest format priority: P3 Useful but not urgent status: archived Archived and locked; will not be updated type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants