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

options: reset some options between files by default #14151

Closed
wants to merge 1 commit into from

Conversation

guidocella
Copy link
Contributor

Add some options to --reset-on-next-file's default value that you commonly don't want to keep between files. The catch is that if you specify options in the command line or mpv.conf --reset-on-next-file resets to those values, but the vast majority of uses for these options should be at runtime.

Copy link

github-actions bot commented May 15, 2024

Download the artifacts for this pull request:

Windows
macOS

@na-na-hi
Copy link
Contributor

na-na-hi commented May 15, 2024

that you commonly don't want to keep between files

This purely depends on the contents of the playlist in question. It's very often that all videos in the playlist come from closely-related sources. I don't want the crop and rotate settings to be reset for this reason. Switching to the next file and then switching it back also causes the settings to be reset.

Also it makes no sense to reset ab loop points without also resetting --ab-loop-count.

@guidocella
Copy link
Contributor Author

I always wanted to reset rotate and crop to reset between files, it's hard to guess how common the use case you mentioned is. We can remove those and add ab-loop only if desired. Resetting ab-loop is also nice because it is not obvious how to add it to --reset-on-next-file (#10966). I added --ab-loop-count.

A tricky one is loop-file which ideally you could make it preserve numerical values between files without making it reset on next file if you change it at runtime; see #5943 #10966 #11291 https://www.reddit.com/r/mpv/comments/rcwnrw/looping_each_file_n_times_in_a_playlist/

and IRC discussions:

2023-09-18 17:47:53 ChH guido: kasper93: I didn't realize how weird loop-file is, I've always only used it with yes/no. I thought resetting it means that if mpv gets started without it and then set to 'yes' at runtime, then resetting it would mean it goes to 'no' when going to the next file.
2023-09-18 17:48:54 ChH imo that option should be changed so that it counts repeats (or seeks to the beginning, idc) for the current file instead of in total
...
2023-09-18 20:35:02 guido I just remembered that there was a lot of discussion about adding current-window-scale because option values shouldn't change on their own but actually loop-file already changes the value set by the user
2023-09-18 20:37:13 guido d07b7f0
2023-09-18 20:51:53 guido I guess there should be a remaining-loops property that decreases on each loop while --loop-file=N persists across files
2023-09-18 20:52:10 guido --loop-playlist=N also overwrites the value set by the user, but that doesn't cause issues
2023-09-18 20:56:01 ChH remaining-file-loops to make clear it doesn't have anything to do with loop-playlist
2023-09-18 20:56:23 guido right
2023-09-18 20:57:17 guido whether --loop-file=inf should reset on next file depends on individual preferences, but --loop-file=N should never reset

Add ab-loop options to --reset-on-next-file's default value because you
never want to preserve them between files. VLC and MPC-HC also reset
them.
@guidocella
Copy link
Contributor Author

I made this ab loop only which should be uncontroversial.

@kasper93
Copy link
Contributor

Do we really need this change? Are we fixing anything? I can image ab-loop to be useful if you watch some series and want to skip recap/intro each time. Not sure how valid is that usecase, but maybe just don't introduce precedence of resetting anything.

@guidocella
Copy link
Contributor Author

That would be weird since episodes have different durations, but it's fine if the change is not worth it.

@guidocella guidocella closed this May 20, 2024
@guidocella guidocella deleted the reset-on-next-file branch May 20, 2024 16:07
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.

None yet

3 participants