gohlslib icon indicating copy to clipboard operation
gohlslib copied to clipboard

findSegmentWithInvPosition() method in gohlslib, clientLiveInitialDistance is too small

Open zapotah opened this issue 2 years ago • 1 comments

          Hi, I found where the problem is, findSegmentWithInvPosition() method in gohlslib, clientLiveInitialDistance is too small, in another request findSegmentWithID tries to get segments which don't exist in playlist. findSegmentWithInvPosition should start from the beginning or should be configurable. It works on web browsers cause hls.min.js makes request until gets those segments, other players can't do that. I have made some changes and works like a charm.

Originally posted by @JohnnyMclain12 in https://github.com/bluenviron/mediamtx/issues/1720#issuecomment-1713648546

zapotah avatar Sep 19 '23 19:09 zapotah

Take a look at this: zephyr The LiveStartIndex is configurable. It's simple, but it works.

Lysander66 avatar Dec 17 '24 02:12 Lysander66

@Lysander66 there's no need to take some gohlslib code and rename it into zephyr (without giving credits) for exposing the playlist start index, it would have been enough to send a pull request to this repository.

aler9 avatar Jun 03 '25 19:06 aler9

@aler9 Thanks for the feedback.

My initial goal was to quickly test configurability in a standalone setup, which led to Zephyr. But I definitely agree contributing upstream is the better approach.

I imported gohlslib via go.mod, and my previous comment was just meant to demonstrate one possible way to configure LiveStartIndex — purely as part of the discussion, with no other intention.

Also, I’ve credited bluenviron/gohlslib and other dependencies in Zephyr’s README.

Lysander66 avatar Jun 07 '25 03:06 Lysander66