Open oliver-hrkltz opened 2 weeks ago
you can disable the hardware acceleration and check the performance if better or not, https://github.com/media-kit/media-kit?tab=readme-ov-file#display-the-video
for the web, web uses native browser video playback so its not the same as any other platform under the hood
did you follow this https://github.com/media-kit/media-kit?tab=readme-ov-file#gnulinux-1
Update: Fixed for me by adding mpv_set_option_string(self->handle, "hwdec", "vaapi")
to video_output.cc. It's still missing the cuda package but the acceleration works now.
As a general fix I guess it could be enough to include/read the mpv config file (/etc/mpv/mpv.conf).
i dont know much about the configuration of mpv, if that works for you can you add a pr so we see if it works on our ci too?
Could be something related also to this problem? https://github.com/media-kit/media-kit/issues/552#issuecomment-2095830769
i dont know but you can test it using
final videoController = VideoController(player,
configuration: VideoControllerConfiguration(hwdec: "vaapi"));
@oliver-hrkltz i think it should work for you too instead of changing the video_output.cc
Hello!
First: Thank you for offering a library which supports all Flutter build targets!
To increase the performance on our kiosk systems I would like to switch from the web build to the linux build. During my tests I noticed that the video playback takes much more CPU if I build the linux version compared to running the web build. And of course the FHD video is also laggy on the linux build.
So I guess the GPU acceleration is not working. The CPU is a Intel N4120 with Intel UHD Graphics running on Kubuntu 24.04.
Linux build:
If I play the video directly in from the terminal with mpv it works fine and the libcuda.so.1 message is not printed.
Can I somehow provide additional information for you to validate if the hardware acceleration is active or not?