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

[Feature] Region-based Looping (a.k.a. A/B looping) #3264

Closed
ratbastid-1 opened this issue Dec 10, 2022 · 6 comments · Fixed by #3904
Closed

[Feature] Region-based Looping (a.k.a. A/B looping) #3264

ratbastid-1 opened this issue Dec 10, 2022 · 6 comments · Fixed by #3904

Comments

@ratbastid-1
Copy link

While playing a video, enable the user to mark the start and end points of a region of the video. The player will then loop that region until stopped by the user.

@p0rnb0x
Copy link

p0rnb0x commented Dec 10, 2022

I think could be added to marker. Set end point on marker also allow looping

@ratbastid-1
Copy link
Author

ratbastid-1 commented Dec 10, 2022

That would be a way to do it, but I'm picturing something that doesn't have to leave behind an artifact like a Marker--it's just an ephemeral behavior of the player.

mpv and its derivatives all do this. In mpv, when a video is playing you can hit "L" to toggle looping the whole video (which would also be nice), or "l" (that's a lower case L) to flag the start point, then "l" again to flag the endpoint and jump the player back to the start point. When it hits the end point, it jumps back to the start point again. When the user hits "l" a third time, the points are cleared and play proceeds normally from wherever the playhead is.

@StashPowerUser
Copy link

I'd really like to see end time and looping for markers.

If you could use the simple mpv type approach to looping and then create a marker from that, it would be great as well.

@ratbastid-1
Copy link
Author

Hey look, there's a plugin for it: https://github.com/phhu/videojs-abloop

@pjsentry
Copy link

I'm picturing something that doesn't have to leave behind an artifact like a Marker--it's just an ephemeral behavior of the player.

A/B looper as an ephemeral feature of the video player can be a distinct, but related, feature from the "end" timestamp of the Marker. Selecting a marker with an end time would just pre-configure the video player. Having a/b loop be part of the Marker system gives it all the same niceties such as tagging, animated previews, global search, backups, etc.

With that said, the marker thumbnail would need a distinct way to distinguish itself from a typical bookmark-like marker.

@chickenwingavalanche
Copy link
Contributor

I've started work toward this feature on my fork and would like to get this merged in for everyone 😄

As an initial step, I've integrated the plugin suggested above, and added l as a keyboard shortcut to control it. There's a PR here: #3904

WithoutPants pushed a commit that referenced this issue Aug 24, 2023
…ugin (#3904)

* yarn add videojs-abloop
* add abLoop plugin to video player
* adding player keyboard shortcut 'l' for toggling a/b looping

copies mpv behavior:
if a/b loop start not yet set, sets start to current player time
elif a/b loop stop not yet set, sets end to current player time and enables loop
else, disables a/b loop

relates to #3264 (#3264)

* update help with keyboard shortcut
* Add plugin type definitions
* Make UI elements optional
---------
Co-authored-by: chickenwingavalanche <[email protected]>
Co-authored-by: WithoutPants <[email protected]>
halkeye pushed a commit to halkeye/stash that referenced this issue Sep 1, 2024
…ugin (stashapp#3904)

* yarn add videojs-abloop
* add abLoop plugin to video player
* adding player keyboard shortcut 'l' for toggling a/b looping

copies mpv behavior:
if a/b loop start not yet set, sets start to current player time
elif a/b loop stop not yet set, sets end to current player time and enables loop
else, disables a/b loop

relates to stashapp#3264 (stashapp#3264)

* update help with keyboard shortcut
* Add plugin type definitions
* Make UI elements optional
---------
Co-authored-by: chickenwingavalanche <[email protected]>
Co-authored-by: WithoutPants <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants