hardware decoding doesn't work
hardware decoding seems not working. only auto
option (default) seems to have some effect, but even in this case it seems some GL/shaders fallback is used (according to CPU/GPU load, details are below). any other options definitely falling back to software decoding, because CPU usage grows insanely.
hardware decoding works fine in another mpv-based player (SMPlayer), but it directly uses mpv
rather than libmpv
and just somehow embeds its output into UI. using vaapi
as h/w decoding engine in it.
there are some comparisons between playing the same video in Haruna and SMPlayer.
Haruna, H/W decoding auto
(other options are the same as disabled
):
SMPlayer, H/W decoding vaapi
(found it the best in terms of performance and codecs support):
as you can see on screenshots above, Haruna causes much more CPU usage and twice more GPU usage. that's why I think that it uses some generic GL fallback backend, rather than specific H/W decoding modules (that explains high GPU usage). increased CPU usage in turn can be explained by frequent and pretty expensive (by its nature) GPU -> CPU memory exchange (maybe even few times for one frame), very likely during frames rendering.
choosing any other options for h/w decoding rather than auto
(for example vaapi
which is know to be working and even the best option in my case) produces no difference comparing to disabled h/w decoding - almost no GPU usage and very high CPU usage.
video used in test is pretty "heavy" (chosen intentionally, test is not interesting with "lightweight" videos), 4k 60FPS h.265 (8bit), details below:
General
Complete name : Sony Aquarium 4K Demo.mp4
Format : MPEG-4
Format profile : Base Media
Codec ID : isom (isom)
File size : 1.05 GiB
Duration : 1 min 53 s
Overall bit rate mode : Variable
Overall bit rate : 79.7 Mb/s
Encoded date : UTC 2014-08-14 01:45:15
Tagged date : UTC 2014-08-14 01:45:15
Video
ID : 1
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main@L5.1@High
Codec ID : hvc1
Codec ID/Info : High Efficiency Video Coding
Duration : 1 min 53 s
Bit rate : 79.5 Mb/s
Maximum bit rate : 125 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 59.940 (60000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Bits/(Pixel*Frame) : 0.160
Stream size : 1.05 GiB (100%)
Encoded date : UTC 2014-08-14 01:51:46
Tagged date : UTC 2014-08-14 01:45:28
Color range : Limited
Color primaries : BT.709
Transfer characteristics : BT.709
Matrix coefficients : BT.709
Codec configuration box : hvcC
Audio
ID : 2
Format : AAC LC
Format/Info : Advanced Audio Codec Low Complexity
Codec ID : mp4a-40-2
Duration : 1 min 53 s
Source duration : 1 min 53 s
Bit rate mode : Variable
Bit rate : 192 kb/s
Maximum bit rate : 197 kb/s
Channel(s) : 2 channels
Channel layout : L R
Sampling rate : 48.0 kHz
Frame rate : 46.875 FPS (1024 SPF)
Compression mode : Lossy
Stream size : 2.59 MiB (0%)
Source stream size : 2.59 MiB (0%)
Language : English
Encoded date : UTC 2014-08-14 01:51:46
Tagged date : UTC 2014-08-14 01:45:28
hardware used for testing:
- laptop: RedmiBook Pro 14S
- CPU: AMD Ryzen 5 5500U with Radeon Graphics
- GPU: AMD Radeon Graphics (Lucienne), integrated into CPU, no discrete graphics available
- RAM: 16GB DDR4
- Display: 14", 2560x1600, 100% sRGB (aka 72% NTSC)
environment:
- OS: Debian Unstable (sid), amd64
- DE: KDE on X11, scaling 200%
amdgpu
proprietary firmware required by GPU drivers is installed, user-space (mesa and so on) libraries required for H/W decoding (both vaapi
and vdpau
) are installed too, otherwise h/w decoding would be impossible. h/w decoding is known to work in several players (based on different libraries) and even in different ways (aka using vaapi
and vdpau
variations). SMPlayer was chosen for comparison because it is also based on mpv
.
Haruna: 0.8.0 (installed from Debian repo)
didn't see any significant decoding-related messages in console, also didn't found any options to enable any logging at all (logging anything from mpv
will be useful in this situation). all I saw is couple of warnings from QML (files/lines are different, but the message is the same):
unknown() : qrc:/qml/MpvVideo.qml:312:5: QML Connections: Implicitly defined onFoo properties in Connections are deprecated. Use this syntax instead: function onFoo(<arguments>) { ... }
unknown() : file:///usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Controls.2/org.kde.desktop/Menu.qml:32:15: QML MenuItem: Binding loop detected for property "implicitHeight"
and some warning about libcuda.so
appearing on player startup:
Cannot load libcuda.so.1
yes, I don't have it, and this is useless for me as so as it is NVIDIA-only, but I have AMD Radeon.