Video files as a background

hankster112

  • Posts: 27
Basically what the title says, would it would be possible to import a video file (MP4, MKV, etc.) as a background, including maintaining a parallax effect and possibly changing its resolution? I'm still working out many ideas in my head and this one seemed interesting. The few threads I've seen on it recommend exporting the video as individual frames, however that seems like a waste of performance and I wanted to check if there was a better way of doing so.

merrak

  • *
  • Posts: 2738
I'd expect having individual frames to be better for CPU performance, since that data wouldn't have to be decompressed. On the other hand, that could take up a lot of RAM.

Here's a lead that I found: https://community.openfl.org/t/openfl-media-video/1731

hankster112

  • Posts: 27
The issue is I'd want it to scale well on all resolutions (so having several sets of images at 1080p, 1440p, 4K, etc.) and at a good framerate (60 as a minimum, 144-240 if I really want to go insane) but that would have huge performance hits as separate images.
That link might go somewhere but the repo it refers to hasn't been updated in 7-8 years, but it's better than nothing I guess.