mpv icon indicating copy to clipboard operation
mpv copied to clipboard

[Enhancement] Behaviour of partial downloads

Open rubyFeedback opened this issue 3 years ago • 0 comments

mpv allows us to play videos that are being downloaded such as via yt-dltp or what was the name of the improved youtube-dl successor.

At like 50% of a video I wanted to look and see whether I should continue to download it. Often you don't know what a video is about, and browser preview does not always work either. I have this problem with chrome + NVIDIA on linux right now. Via mpv it plays fine, always, though. So this is more a separate issue.

Now: if you play the partial download you can skip forward via right arrow keys.

This works.

You then get the following message when you are at the end:

"[file] File is apparently being appended to, will keep retrying with timeouts."

That makes sense.

HOWEVER HAD, using the left arrow key to then "jump back" does not work. The video remains frozen aka it does not move at all anymore. Perhaps I am hitting that mandatory timeout issue? But navigation should still be possible for the dataset that was already downloaded before that, IMO.

My proposal here is to re-enable these partial steps and allow the left arrow key to work.

I don't know C really well or how it is implemented internally, but I can think of ways to solve it. Ideally one could simply jump to a prior state and have it work from that point in the buffer, if that is possible. After all we know this must have worked because the arrow-right key works correctly within the already downloaded data. So arrow-left should also work, IMO; from a logical point of view (because you can hit the right arrow keys several times in a given video file). Oddly enough right now it does not work, at the least not on my computer system. I suspect the code has different support for arrow-right and arrow-left; if anyone could have a look at the arrow-specific C code and perhaps notice how this could be changed to allow the arrow-left key to also work fine. (This only happens when I hit the above message by the way; the arrow-left key works fine otherwise, so I can use arrow-right and arrow-left, UNTIL I hit that "is currently downloaded" error message - or rather that already mentioned "[file] File is apparently being appended to, will keep retrying with timeouts." message.

rubyFeedback avatar Sep 20 '22 16:09 rubyFeedback