Skip to content

Improve video wallpapers performance

Matt Jolly edited this page Aug 5, 2020 · 2 revisions

Video playback is a demanding task, requiring significant CPU/GPU resources. To use a video as a wallpaper, it's important that it causes minimal impact to the day-to-day use of your system. The following are some tips you can follow to reduce resource utilisation while using Komorebi:

Ensure hardware decoding is working

Komorebi uses GStreamer for video decoding; this means that, if supported, GStreamer will automatically use your GPU for hardware-accelerated decoding which can provide a big boost to performance.

To test your hardware-decoding capabilities run an instance of mpv with -hwdec enabled:

mpv -hwdec myVideo.mp4

If this command outputs lines similar to:

libva info: VA-API version 0.39.4
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
AO: [alsa] 48000Hz stereo 2ch float
Using hardware decoding (vaapi).
VO: [opengl] 1920x816 vaapi

Then it means hardware decoding is working.

You can also run vainfo to check for driver support.

If you're using Intel CPU/GPU, running intel_gpu_top shows the current workload on your system. If, while running Komorebi, you see some usage on Video/0, hardware acceleration is in use.

If the commands above indicate that hardware acceleration is disabled your system may not be configured correctly. The process for doing this varies from distro to distro, so you'll have to do some research yourself. The Hardware video acceleration page on the Arch wiki contains useful information that can be applied to any setup.

Re-encode your video using a tool

Re-encoding your video can help reduce overall resource usage. For that, you can use HandBrake, an open-source video transcoder. Simply select a General preset, such as the Very Fast 1080p30 preset, and re-encode your video.

On an Intel i5-8250u CPU and with COSTA RICA 4K Video, re-enconding the video to 1080p reduced CPU usage from 18% to 11%.

Use Komorebi's performance settings

Komorebi comes with performance options you can tweak to your setup:

  • Pause Video playback on un-focus stops video processing when you focus on any other window; depending on your setup, this can be immensely helpful without you even noticing the video pausing
  • more options coming soon