Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

input.conf: bind HOME and END #15856

Merged
merged 2 commits into from
Feb 20, 2025
Merged

Conversation

guidocella
Copy link
Contributor

No description provided.

@avih
Copy link
Member

avih commented Feb 13, 2025

I'm not strictly against this, but intuitively it feels to me like home/end should apply to the current clip rather than to the playlist, and maybe with ctrl or shift it should apply to the playlist.

@guidocella did raise up some valid counter arguments:

  • END for the current clip is largely weird. Normally it would just go to the next clip or quit, and it would only really make sense with a playlist of one item, with both idle and keep-open enabled. Maybe it could seek to someplace near the end?
  • It's adjacent to PgUp/Dn, which seek chapters, while with shift it makes it a normal seek, so shift-home/end could similarly seek in the current clip.

Any thoughts on what should home/end do as default bindings?

@qyot27
Copy link
Contributor

qyot27 commented Feb 13, 2025

I'm not strictly against this, but intuitively it feels to me like home/end should apply to the current clip rather than to the playlist, and maybe with ctrl or shift it should apply to the playlist.

I've always had HOME/END bound to seek operations (seek (-)32 relative-percent, so that you can jump by a third of the length of the current clip at a time), although I'll readily admit that I haven't used those bindings regularly in a long time.

@DanOscarsson
Copy link
Contributor

As I never uses chapters and just skip to next file in a playlist I think keys without ctrl or shift should apply to current clip.
My PgUp and PgDown is mapped to current clip instead of default chapters, as that is much more used. If you want to have consistent handling you could have unmodified keys apply to current clip, shift to chapters and ctrl to playlist.

@guidocella guidocella changed the title input.conf: bind HOME and END to go to the first and last file input.conf: bind HOME and END Feb 13, 2025
@guidocella
Copy link
Contributor Author

guidocella commented Feb 13, 2025

Changed to

HOME seek 0 absolute
END seek 95 absolute-percent
Shift+HOME no-osd set playlist-pos 0
Shift+END no-osd set playlist-pos-1 ${playlist-count}

Copy link

github-actions bot commented Feb 13, 2025

Download the artifacts for this pull request:

Windows
macOS

@mrfragger
Copy link

Changed to

HOME seek 0 absolute END seek 95 absolute-percent Shift+HOME no-osd set playlist-pos 0 Shift+END no-osd set playlist-pos-1 ${playlist-count}

I use these bindings for editing video/audio
HOME osd-msg-bar seek 0 absolute-percent+exact;frame-step #! [Playback] > [Seek] > Skip to Start
END playlist-clear; osd-msg-bar seek 99.99 absolute-percent+exact #! [Playback] > [Seek] > Skip to End (clears playlist)

DOCS/man/mpv.rst Outdated
Seek to the beginning of the file.

END
Seek to 95% of the file.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like magic 95% seek. Either make it seek to the real end or not at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How would you seek to the end, and how would that be useful? This at least lets you seek towards the end quickly, e.g. I've been pressing END + Page down to quickly seek to anime ending chapters which is convenient.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is seeking to 95% useful? The same case but got to real and and stay there (depending on other mpv options).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just gave an example of how it's useful?? Seek to end would just be quit or playlist-next with the default options.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

95% in 10 minute clip is quite different than in 3 h movie. For me END means end, not some 5%, but anyway. Not gonna argue that.

Copy link
Member

@avih avih Feb 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the first thing we need is that END is meaningful, and we can probably agree that it's not meaningful with the default mpv options.

So the question is which value should be used instead.

Few options came up, among them 95%, 99%, someplace in between, or a fixed delta from the end, for instance 1 minute.

I don't think there's a perfect solution here, and between the imperfect options we can choose from, I think we should just pick one. I don't have a personal preference between them, but if someone does, then let's go with that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're going to have this, I think some fixed delta from the end is the way to go. Like Kasper said, using a percent is going to be wildly different depending on the length of the clip.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to END seek -60 absolute.

Copy link
Contributor

@kasper93 kasper93 Feb 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly I would bind only HOME. If anything END could jump to last chapter or do nothing if there are no chapters. Any time related seek for END whether relative or absolute seems wrong to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed END.

@avih
Copy link
Member

avih commented Feb 19, 2025

LGTM too. Good solution.

Copy link
Member

@Dudemanguy Dudemanguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm good with these bindings.

@Dudemanguy Dudemanguy merged commit e32beaa into mpv-player:master Feb 20, 2025
26 of 27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants