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

Is there a proper way to restart playback at the end of a video? #3001

Closed
garoto opened this issue Mar 28, 2016 · 8 comments
Closed

Is there a proper way to restart playback at the end of a video? #3001

garoto opened this issue Mar 28, 2016 · 8 comments

Comments

@garoto
Copy link
Contributor

garoto commented Mar 28, 2016

When "keep-open" is set to "yes", at end of playback, the video will pause at the last frame and stay there. What If I want to restart playing the same video again?

Currently, I have this keybinding set up that somewhat solves the problem, but the player will still be in a paused state requiring a second key press to start playing:

BS seek 0 absolute-percent ; show_text "Seek to 0% - ${playback-time} / ${duration} (${percent-pos}%)" 2000 0

I tried adding a "; cycle pause" to the end of that binding line, and while it works when the video indeed reached its end, it will pause the video if used while playback is still running.

Is there a better approach to accomplish this?

@haasn
Copy link
Member

haasn commented Mar 28, 2016

You could just set pause no instead of cycling through it.

@garoto
Copy link
Contributor Author

garoto commented Mar 28, 2016

Adding ; set pause no to the BS keybinding seems to resolve my issue. Thanks a lot haasn, I'd need years to figure that one out on my own 😊

@garoto garoto closed this as completed Mar 29, 2016
@ghost
Copy link

ghost commented Jan 25, 2020

I want to set b (for 'beginning') to do this, in this context.

But both b seek 0 absolute-percent; set pause no and b seek 0 absolute-percent; cycle pause still require the b to be pressed a second time to resume playback after going back to beginning.

Is there a different unpause we should use these days?

@garoto
Copy link
Contributor Author

garoto commented Jan 25, 2020

I believe this commit fixes the behavior you describe: fcf0b80

@ghost
Copy link

ghost commented Jan 25, 2020

You're correct, I updated to the current build on macOS using brew install --HEAD mpv and it's all good, thank you!

@github-account1111
Copy link

I'm using the latest build and getting the behavior @mindfulsource described. No matter whether I put set pause no before or after seek, it doesn't unpause.

@oe-d
Copy link

oe-d commented Sep 18, 2020

You can use my script to do that.

In input.conf: Space script-binding control/cycle-pause

@blueray453
Copy link

You can use my script to do that.

In input.conf: Space script-binding control/cycle-pause

This is a great solution. How the play button can be changed to replay (reload) button (both visually and functionally) after the video is finished.

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

No branches or pull requests

5 participants