-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
stream.dash: respect the manifest's minBufferTime #5610
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
stream.dash: respect the manifest's minBufferTime #5610
Conversation
Make `MPDParsers.duration()` return a callable which always transforms `isodate.Duration` objects (year or month durations) to `datetime.timedelta` objects by using a `datetime.datetime` anchor. Use the manifest's `publishTime` as anchor if it's set, otherwise use the current time.
Don't allow the manifest's `suggestedPresentationDelay` to be lower than the `minBufferTime` value.
@michaelarnauts You can give this branch a try and provide feedback if you want. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved pending confirmation from issue reporter.
It actually still freezes for a second after playing a segment even with this change. When I use I've tried increasing the DEFAULT_MINBUFFERTIME one by one, and when I pick 9, it plays smooth, so maybe a good value is to use the minBufferSize * 2? I wonder if the suggestedPresentationDelay should actually be twice the segment size as suggested here: https://docs.unified-streaming.com/documentation/live/configure-dynamic-mpd.html#mpd-suggestedpresentationdelay |
The manifest you've posted has segment durations of about Without a config option, I don't want to set a static multiplication factor for increasing the The link you've posted explains the Just to be sure, are actually on this branch (version must be |
I understand your hesitance to just add a * 2 multiplier. I'm just curious where this freeze is coming from. I'm wondering if the sleeper is waiting to long to fetch a new segment? When playing, I don't see any 404's or something, it just seems that streamlink is waiting to long to fetch a new segment?
I'm really sure that I'm on the right branch. I'm building with |
Yes, the manifest reload logic isn't ideal. It's basically still the same as the initial implementation from 2018 and way worse than the one of the HLS implementation. It requires a rewrite, so that the reload time can be calculated better. Your manifest doesn't set a I'm going to merge this PR now, since the changes here are fine. If you want, you can open a new issue for the reload logic of dynamic DASH manifests. |
Btw, you don't need to build a wheel every time. Just install in editable mode after cloning the git repo. |
…. Based on proposed fix here: streamlink#5610 and here: streamlink#5614
Resolves #5608