mpv icon indicating copy to clipboard operation
mpv copied to clipboard

[Request] reset playing position if quitting when only 5% of playback time left

Open kopurando opened this issue 12 years ago • 10 comments

Thanks for such a great player, finally we have a (much) better VLC alternative!

While remembering playback position on quit is very helpful, it becomes an annoyance when one quits mpv near the end of a file, i.e. last seconds (or minutes for long files), when it's clear the clip is over and nothing else left to see... On re-opening, mpv will jump to these last unplayed seconds of the file. Now rewind and play again :)

Would be nice to have some threshold to ignore last unplayed part (5% sounds reasonable for most cases) or simply an on-off setting for such behaviour.

Regardless, thanks for your work!

kopurando avatar Jul 07 '14 09:07 kopurando

Hm, that should already be implemented. I don't remember the exact "cut off" value though, maybe it's not high enough.

ChrisK2 avatar Jul 07 '14 10:07 ChrisK2

It was implemented, but then ChrisK2 complained, and it was removed.

ghost avatar Jul 07 '14 10:07 ghost

Just checked  — even quitting 3 sec before ending remembers the position exactly. --  Best regards,  Kirill K.V.

From: ChrisK2 [email protected] Reply: mpv-player/mpv [email protected]> Date: 7 июля 2014 г. at 17:17:25 To: mpv-player/mpv [email protected]> Cc: kopurando [email protected]> Subject:  Re: [mpv] [Request] reset playing position if quitting when only 5% of playback time left (#915)

Hm, that should already be implemented. I don't remember the exact "cut off" value though, maybe it's not high enough.

— Reply to this email directly or view it on GitHub.

kopurando avatar Jul 07 '14 10:07 kopurando

By the way, this would also break resuming from a playlist: if you play multiple files, and quit somewhere in the middle, and this happens to be within the last 5% of playback (or whatever is suggested), then it wouldn't resume properly anymore.

ghost avatar Jul 07 '14 11:07 ghost

well, in playlists it’s probably unnecessary as next file will play anyway. But when I re-open/resume on last seconds of a single file, mpv promptly quits after I open the file, so I have to open it again.. or opens somewhere near end credits, hence rewind. I guess, such «cut off» behavior can be enabled for single files only? 

--  Best regards,  Kirill K.V.

From: wm4 [email protected] Reply: mpv-player/mpv [email protected]> Date: 7 июля 2014 г. at 18:19:47 To: mpv-player/mpv [email protected]> Cc: kopurando [email protected]> Subject:  Re: [mpv] [Request] reset playing position if quitting when only 5% of playback time left (#915)

By the way, this would also break resuming from a playlist: if you play multiple files, and quit somewhere in the middle, and this happens to be within the last 5% of playback (or whatever is suggested), then it wouldn't resume properly anymore.

— Reply to this email directly or view it on GitHub.

kopurando avatar Jul 07 '14 11:07 kopurando

It would be nice if we can have an option to set the threshold, 0 by default.

hkenneth avatar Jul 07 '14 15:07 hkenneth

I'd like to chime in to say that I actually like the current behaviour. It serves as a quick way to know I've already watched this file if for example I'm watching a series.

kevmitch avatar Jul 07 '14 18:07 kevmitch

Regarding resuming from a playlist, this could be solved by taking the playlist total time into account, not the file's. Allowing to change the cutoff value should give people the choice between the current and the new behavior (cutoff = 0% -> current behavior)

Soukyuu avatar Jul 14 '14 13:07 Soukyuu

It was implemented, but then ChrisK2 complained, and it was removed.

could this be added back as an option? Also it'd be nice to autorewind when pressing play at the end.

kn666 avatar Apr 12 '20 10:04 kn666

You can do this using a script. I'm using my own: https://github.com/Argon-/mpv-config/blob/master/scripts/auto-save-state.lua It will always save the state when it's a playlist. When it's not a playlist it will never save state for a small file (<5 Minutes) and otherwise only when your current playback position is > 1 minute and < 3 minutes.

Argon- avatar Apr 12 '20 14:04 Argon-