diff options
author | Cullum Smith <cullum@sacredheartsc.com> | 2024-12-02 17:08:53 -0500 |
---|---|---|
committer | Cullum Smith <cullum@sacredheartsc.com> | 2024-12-02 17:08:53 -0500 |
commit | 969c377ac6c01e8e3874a0b4822dc42a001c14cb (patch) | |
tree | a08e51065ec0d6a866e50e2e932d611ecd7220fe | |
parent | ecf6c2147d8fed19aa616f0793252ae7f53c5010 (diff) | |
download | infrastructure-969c377ac6c01e8e3874a0b4822dc42a001c14cb.tar.gz |
configure mpv for hw accel
-rw-r--r-- | files/usr/local/etc/mpv/mpv.conf.desktop | 5 | ||||
l--------- | files/usr/local/etc/mpv/mpv.conf.laptop | 1 | ||||
l--------- | files/usr/local/etc/mpv/mpv.conf.roadwarrior_laptop | 1 | ||||
-rw-r--r-- | files/usr/local/etc/poudriere.d/make.conf.pkg_repository | 2 | ||||
-rw-r--r-- | files/usr/local/etc/poudriere.d/pkglist.pkg_repository | 4 | ||||
-rw-r--r-- | scripts/hostclass/desktop | 4 | ||||
-rw-r--r-- | vars/hostclass/desktop | 6 |
7 files changed, 22 insertions, 1 deletions
diff --git a/files/usr/local/etc/mpv/mpv.conf.desktop b/files/usr/local/etc/mpv/mpv.conf.desktop new file mode 100644 index 0000000..ac8980f --- /dev/null +++ b/files/usr/local/etc/mpv/mpv.conf.desktop @@ -0,0 +1,5 @@ +hwdec=${mpv_hwdec:-auto} +vo=${mpv_vo} +vd-lavc-dr=${mpv_direct_rendering} +audio-channels=${mpv_audio_channels} +sid=no diff --git a/files/usr/local/etc/mpv/mpv.conf.laptop b/files/usr/local/etc/mpv/mpv.conf.laptop new file mode 120000 index 0000000..0997890 --- /dev/null +++ b/files/usr/local/etc/mpv/mpv.conf.laptop @@ -0,0 +1 @@ +mpv.conf.desktop
\ No newline at end of file diff --git a/files/usr/local/etc/mpv/mpv.conf.roadwarrior_laptop b/files/usr/local/etc/mpv/mpv.conf.roadwarrior_laptop new file mode 120000 index 0000000..0997890 --- /dev/null +++ b/files/usr/local/etc/mpv/mpv.conf.roadwarrior_laptop @@ -0,0 +1 @@ +mpv.conf.desktop
\ No newline at end of file diff --git a/files/usr/local/etc/poudriere.d/make.conf.pkg_repository b/files/usr/local/etc/poudriere.d/make.conf.pkg_repository index d536c94..0d2a258 100644 --- a/files/usr/local/etc/poudriere.d/make.conf.pkg_repository +++ b/files/usr/local/etc/poudriere.d/make.conf.pkg_repository @@ -51,6 +51,8 @@ multimedia_audacious-plugins_UNSET=OSS multimedia_ffmpeg_SET=OPENSSL multimedia_ffmpeg_UNSET=GNUTLS multimedia_kdemultimedia_UNSET=KDENLIVE +multimedia_mpv_SET=CDIO LIBBLURAY +multimedia_mpv_UNSET=NVDEC multimedia_pipewire_UNSET=JACK # Without PULSEAUDIO, sound doesn't work when playing videos in digikam. diff --git a/files/usr/local/etc/poudriere.d/pkglist.pkg_repository b/files/usr/local/etc/poudriere.d/pkglist.pkg_repository index 24296ef..8b43eca 100644 --- a/files/usr/local/etc/poudriere.d/pkglist.pkg_repository +++ b/files/usr/local/etc/poudriere.d/pkglist.pkg_repository @@ -19,8 +19,8 @@ databases/php${php_version}-pgsql databases/postgresql${postgresql_version}-client databases/postgresql${postgresql_version}-server databases/redis -deskutils/plasma5-sddm-kcm deskutils/merkuro +deskutils/plasma5-sddm-kcm deskutils/py-vdirsyncer devel/android-tools devel/ccache @@ -74,6 +74,8 @@ multimedia/libva-intel-media-driver multimedia/libva-utils multimedia/libvdpau-va-gl multimedia/makemkv +multimedia/mpv +multimedia/smplayer multimedia/v4l-utils multimedia/v4l_compat multimedia/vdpauinfo diff --git a/scripts/hostclass/desktop b/scripts/hostclass/desktop index 381aeef..e6ddd86 100644 --- a/scripts/hostclass/desktop +++ b/scripts/hostclass/desktop @@ -174,6 +174,7 @@ case $graphics_type in set_loader_conf \ compat.linuxkpi.i915_enable_fbc=1 \ compat.linuxkpi.i915_fastboot=1 + : ${mpv_hwdec:='vaapi-copy'} ;; esac @@ -181,6 +182,9 @@ esac # acceleration after resuming from sleep. set_sysctl kern.vt.suspendswitch="${vt_suspendswitch:-1}" +# Generate mpv configuration. +install_template -m 0644 /usr/local/etc/mpv/mpv.conf + # Start login manager. case $desktop_type in kde) diff --git a/vars/hostclass/desktop b/vars/hostclass/desktop index 40a8919..784aaab 100644 --- a/vars/hostclass/desktop +++ b/vars/hostclass/desktop @@ -25,6 +25,11 @@ clear_tmp_enable=false # Chromium seems to need this to enable VAAPI video decoding on intel. chrome_flags='--enable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan' +# Default mpv configs +mpv_vo=gpu-next +mpv_direct_rendering=yes +mpv_audio_channels=stereo + gajim_packages=" gajim py${python_version}-omemo-dr @@ -52,6 +57,7 @@ krb5 libreoffice libva-utils libvdpau-va-gl +mpv neofetch noto-basic noto-emoji |