performous / performous

An open-source music and rhythm game.
https://performous.org
Other
488 stars 106 forks source link

Video dissappearing due to hdd throughput throttle #921

Open Baklap4 opened 1 year ago

Baklap4 commented 1 year ago

Suggestion

Currently when a video is attached to a song it'll be streamed to show it on screen. This happens async and if the hdd is bottlenecked you'll see a black video whilst ultimately falling back to the background image provided or stock background image provided by the game.

While this works pretty gracefully i hate to see the video getting removed and then be picked up again 10 seconds later (while still in sync).

We talked a bit in discord about this issue and came to a couple of conclusions:

  1. Load the video before starting the song
  2. Keep current behavior
  3. Load the full video async in memory and then play the video with the offset of the loading time
  4. Stream the video first couple of frames and switch over to the fully in memory loaded video once its been loaded completely async.

There was a mention to make it configurable. But i think the 4th option is a good default setting so we wouldn't have to make it configurable.

Use case

When a HDD with large video files the throughput can be a bottleneck. This is easily viewable while loading your library (read metadata from hdd) and try to play a song with a large video: 1080p or higher.

Extra info/examples/attachments

No response

Workaround

Use an ssd for performous which has greater throughput.

Baklap4 commented 10 months ago

For me this is fixed since ive upgraded my hardware hdd -> Samsung 990 PRO PCIe 4.0 NVMe

Do we still want to implement / fix this? As this is still a problem in lower-end systems

ooshlablu commented 10 months ago

I'm not sure there's much we can do really if the hardware isn't up to spec, except for caching the whole thing, as stated, which may cause its own problems that end users may not like also :-) The behaviour it has now, ie fading out and continuing with the game but not crashing, is probably the safe approach to take anyway.