1
\$\begingroup\$

I have a level where I have embedded 5 short videos and the levels lags a little compared to the other levels, so it seems that adding videos in a Unity made game is expensive on its performance and memory.

Is there a better way to do this unity, maybe using GIFs or something?

New contributor
Free-Man is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
\$\endgroup\$
8
  • \$\begingroup\$ There's a lot of factors that can negatively impact performance, the best place to start would be profiling your code / project to identify processing &/or memory spikes. \$\endgroup\$ – Pikalek Jun 7 at 14:21
  • \$\begingroup\$ Can you show us a sample of the kind of video you're using, and how it's being used in your level? Information on the video format can help too. \$\endgroup\$ – DMGregory Jun 7 at 14:22
  • \$\begingroup\$ I think i'm going to try to use sprite sheets instead, firstly they take a little less space and maybe they perform better i have to check. \$\endgroup\$ – Free-Man Jun 7 at 14:27
  • \$\begingroup\$ @Pikalek all my other levels are pretty much the same, i only notice frame drops on this particular levels with the videos. \$\endgroup\$ – Free-Man Jun 7 at 14:28
  • \$\begingroup\$ @DMGregory I'm using 5 roughly 3 MB mp4 videos all being 360p \$\endgroup\$ – Free-Man Jun 7 at 14:29
0
\$\begingroup\$

Ok so I tried a few different methods, turns out instead of using .mp4 I can use .ogv, this results in a little bit of quality loss, but it made it extremely small in size, so the issues with the memory are fixed.

Also i now don't feel any frame drops at all in-engine, things should work even better outside.

New contributor
Free-Man is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
\$\endgroup\$

Your Answer

Free-Man is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.