occivink / mpv-scripts

Various scripts for mpv
The Unlicense
417 stars 38 forks source link

Added the ability to seek to a percentage of the total duration. #34

Open jakem72360 opened 4 years ago

jakem72360 commented 4 years ago

I had to rewrite a large portion of the script to get this to work nicely, but everything is functional, including two separate lines of history for each seek mode. I've also made the cursor start at a fixed position, rather than depending on the duration of the video since the latter approach makes muscle-memory inputs impossible. Please let me know your thoughts on this

occivink commented 4 years ago

Thanks, this would be a good addition indeed. I'm not a big fan of the changes to the timestamp seeker, I find the 'shift the numbers to the left' less intuitive, and the ability to specify milliseconds (which I use when I want to compare exact frames) was lost. I also do use the feature where it starts at the 'most significant' digit, but maybe we can make that one optional so that you can also rely on muscle memory.

Also it would be nice to clamp the %-seeker to 100%.

jakem72360 commented 4 years ago

There's a couple things I'd like to clarify;

I use when I want to compare exact frames

I find three digits of milliseconds to be way too verbose. Perhaps this functionality could be re-implemented elsewhere, say for example, a "seek to frame number"? That's partly why I added the mode variable and separate history lines, for this kind of thing. Could you clarify what you do when you "compare exact frames"?

clamp the seeker to 100%

What do you mean exactly? MPV caps the seek duration for us so specifying a percentage above 100% still skips to the end of the video.

occivink commented 4 years ago

By comparing exact frames, I mean that sometimes I open two mpv instances (with different video settings, for example) on the same file, seek to a random position in one, and then seek to the same frame by using millisecond precision.

mpv doesn't expose (or even knows?) frame numbers so that is not an option.

I understand that most of the time you don't need such precision, but the advantage of the current input style is that you can leave them at 0 if you don't care, it doesn't get in the way.