Almamu / linux-wallpaperengine

Wallpaper Engine backgrounds for Linux!
GNU General Public License v3.0
1.69k stars 61 forks source link

Make mpv options configurable #243

Open moetayuko opened 2 months ago

moetayuko commented 2 months ago

This software passes a set of hardcoded options to libmpv: https://github.com/Almamu/linux-wallpaperengine/blob/d4687f09ec398373a0195a1bed2ddf5ed67025bf/src/WallpaperEngine/Render/Wallpapers/CVideo.cpp#L27-L44

They are okay for most users but prevent users from further customization of mpv behavior. For example, I have two GPUs and would like to specify the one for video decoding. This can be done by passing vaapi-device (or cuda-decode-device if using nvdec) to mpv, which is impossible now.

I come up with two possible solutions:

  1. Add an extra command line option to bypass options to mpv. One such example is the --mflags flag of paru
  2. Use the include option to load a linux-wallpaperengine-specific mpv config file. According to the man page:

    Files explicitly requested by command line options, like --include or --use-filedir-conf, will still be loaded.