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

--loop-file should apply to each file individually #11291

Closed
pedrominicz opened this issue Feb 9, 2023 · 3 comments
Closed

--loop-file should apply to each file individually #11291

pedrominicz opened this issue Feb 9, 2023 · 3 comments

Comments

@pedrominicz
Copy link

pedrominicz commented Feb 9, 2023

Expected behavior of the wanted feature

The command line option --loop-file should apply to each file individually. For example, suppose I have two video files a.mkv and b.mkv, mpv --loop-file=5 a.mkv b.mkv should play a.mkv six times in a row then b.mkv six times in a row.

Furthermore, it should work with other command line options. For example, mpv --loop-file=5 --loop-playlist=inf a.mkv b.mkv should play a.mkv six times in a row then b.mkv six times in a row then a.mkv six times in a row, etc.

Note that, unlike #7858, I am not trying to use --loop-file to create a slideshow. I am aware of --image-display-duration. I want to loop multiple video files each a few times in a row. Also, I am pretty sure I could use a Lua script to do this but I think this should not be necessary as I believe what I am proposing is a pretty natural default behavior for --loop-file with multiple files.

Alternative behavior of the wanted feature

N/A

Log file

N/A

@haasn
Copy link
Member

haasn commented Feb 9, 2023

Huh, I thought that's how it worked currently. Sounds like a bug.

@hooke007
Copy link
Contributor

hooke007 commented Feb 9, 2023

Ref the previous issue, I don't think it was a bug. #5943 (comment)

@pedrominicz
Copy link
Author

@hooke007 thanks, --reset-on-next-file is exactly what I was looking for.

I like the consistency of --reset-on-next-file=loop-file with other settings. Instead of making --loop-file special as I originally suggested, I think it is better to mention --reset-on-next-file on --loop-file's man page section as I believe there are more people who would like the behavior I was looking for.

Just to have it documented in this issue, the behavior I was looking for can be achieved with mpv --loop-file=5 --reset-on-next-file=loop-file a.mkv b.mkv.

guidocella added a commit to guidocella/mpv that referenced this issue Jun 5, 2024
This stops decreasing numerical values of --loop-file on each iteration
so that loop-file=N loops every playlist entry without having to add
--loop-file to --reset-on-next-file.

The current behavior confuses users as seen in:

mpv-player#2481
mpv-player#5943
mpv-player#11291
mpv-player#13860
https://www.reddit.com/r/mpv/comments/rcwnrw/looping_each_file_n_times_in_a_playlist/

Also options are supposed to reflect the value configured by the user
and not change on their own.

A remaining-file-loops property is exposed as a replacement to check how
many loops are left.
guidocella added a commit to guidocella/mpv that referenced this issue Jun 7, 2024
This stops decreasing numerical values of --loop-file on each iteration
so that loop-file=N loops every playlist entry without having to add
--loop-file to --reset-on-next-file.

The current behavior confuses users as seen in:

mpv-player#2481
mpv-player#5943
mpv-player#11291
mpv-player#13860
https://www.reddit.com/r/mpv/comments/rcwnrw/looping_each_file_n_times_in_a_playlist/

Also options are supposed to reflect the value configured by the user
and not change on their own.

A remaining-file-loops property is exposed as a replacement to check how
many loops are left.
guidocella added a commit to guidocella/mpv that referenced this issue Jul 4, 2024
This stops decreasing numerical values of --loop-file on each iteration
so that loop-file=N loops every playlist entry without having to add
--loop-file to --reset-on-next-file.

The current behavior confuses users as seen in:

mpv-player#2481
mpv-player#5943
mpv-player#11291
mpv-player#13860
https://www.reddit.com/r/mpv/comments/rcwnrw/looping_each_file_n_times_in_a_playlist/

Also options are supposed to reflect the value configured by the user
and not change on their own.

A remaining-file-loops property is exposed as a replacement to check how
many loops are left.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants