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. |
gravyboat
left a comment
There was a problem hiding this comment.
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