ppy / osu-framework

A game framework written with osu! in mind.
MIT License
1.62k stars 403 forks source link

Add an option to loop videos from a certain start frame #3658

Open MiraiSubject opened 4 years ago

MiraiSubject commented 4 years ago

Use case:

This is more related to osu! tournaments, but graphics designers could then implement certain effects inside the video for a segment of frames and then have a second segment loop infinitely.

Example:

0 - 300 frames -> segment that will be played once
301 - 600 frames -> segment that will repeat

Other applications that utilize the osu-framework will also be able to utilize this for video backgrounds etc.

Will likely require https://github.com/ppy/osu-framework/issues/3519 to be fixed first before this can be reliably used.

frenzibyte commented 4 years ago

So something like Track's RestartPoint?

smoogipoo commented 4 years ago

It's more like a loop point than a restart point.

I'd check to see if this is achievable by a custom clock first, and evaluate the issues from there if it's not. Video and Animation should be kept simple since their clock logic is already quite complex.

One thing that may be an issue is buffering since you have to seek back in time, but I'd have to see how it looks first.