mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
27.81k stars 2.87k forks source link

seeking before the cache in an unterminated hls stream #11990

Open bryandunbar opened 1 year ago

bryandunbar commented 1 year ago

Before requesting a new feature make sure it hasn't been requested yet. https://github.com/mpv-player/mpv/labels/meta%3Afeature-request

Expected behavior of the wanted feature

When loading a hls stream that has segments in the past mpv will not allow you to seek to those segments. Specifying --rebase-start-time=no will show the play position correctly at XX:XX into the stream, but seeking is always capped to the position that the stream was started. As you can see in the below log, mpv is adjusting the seek time to what it has in cache, even though there would be segments available prior to the cache value.

Alternative behavior of the wanted feature

Log file

2023-07-22 10:00:02.050851-0600 Tablo-iOS[7365:815118] [mpv] [cplayer] debug: Run command: seek, flags=64, args=[target="-120.000000", flags="relative", legacy="unused"]
2023-07-22 10:00:02.051003-0600 Tablo-iOS[7365:815118] [mpv] [lavf] v: queuing seek to 2060.097000
2023-07-22 10:00:02.051123-0600 Tablo-iOS[7365:815118] [mpv] [lavf] v: cached range 0: 2176.984000 <-> 2183.133367 (bof=1, eof=0)
2023-07-22 10:00:02.051231-0600 Tablo-iOS[7365:815118] [mpv] [lavf] v: ...using this range for in-cache seek.
2023-07-22 10:00:02.051332-0600 Tablo-iOS[7365:815118] [mpv] [lavf] v: adjust seek target 2060.097000 -> 2177.027267
bryandunbar commented 10 months ago

Does anybody have a thought on this? Is this something currently supported that I just can’t get to work?

bryandunbar commented 3 months ago

Checking back in here. If anybody has a thought it would be greatly appreciated