Page 1 of 1
Porteus 5 + Nvidia official driver = no hardware acceleration on Mpv
Posted: 16 Jul 2019, 20:39
by fulalas
Can anyone run Mpv with hardware acceleration?
I'm facing the following error (need to call Mpv from terminal):
Code: Select all
libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so
libva error: /usr/lib64/dri/nvidia_drv_video.so has no function __vaDriverInit_1_0
libva info: va_openDriver() returns -1
Porteus 5 + Nvidia official driver = no hardware acceleration on Mpv
Posted: 16 Jul 2019, 22:51
by fulalas
I found out that we need to export a specific system variable in order to make VDPAU work with Nvidia official driver:
So now the challenge is to enable VDPAU on Nouveau (i.e. Mesa driver for Nvidia cards). First we have to export this:
You can download
vdpauinfo to check if you have any luck. I'm seeing this on a Geforce 650Ti using Nouveau:
Code: Select all
MPEG1 --- not supported ---
MPEG2_SIMPLE --- not supported ---
MPEG2_MAIN --- not supported ---
H264_BASELINE --- not supported ---
H264_MAIN --- not supported ---
H264_HIGH --- not supported ---
VC1_SIMPLE --- not supported ---
VC1_MAIN --- not supported ---
VC1_ADVANCED --- not supported ---
MPEG4_PART2_SP --- not supported ---
MPEG4_PART2_ASP --- not supported ---
DIVX4_QMOBILE --- not supported ---
DIVX4_MOBILE --- not supported ---
DIVX4_HOME_THEATER --- not supported ---
DIVX4_HD_1080P --- not supported ---
DIVX5_QMOBILE --- not supported ---
DIVX5_MOBILE --- not supported ---
DIVX5_HOME_THEATER --- not supported ---
DIVX5_HD_1080P --- not supported ---
H264_CONSTRAINED_BASELINE --- not supported ---
H264_EXTENDED --- not supported ---
H264_PROGRESSIVE_HIGH --- not supported ---
H264_CONSTRAINED_HIGH --- not supported ---
H264_HIGH_444_PREDICTIVE --- not supported ---
HEVC_MAIN --- not supported ---
HEVC_MAIN_10 --- not supported ---
HEVC_MAIN_STILL --- not supported ---
HEVC_MAIN_12 --- not supported ---
HEVC_MAIN_444 --- not supported ---
Please, post your results.
Porteus 5 + Nvidia official driver = no hardware acceleration on Mpv
Posted: 17 Jul 2019, 16:51
by Rava
Is this a success?
Code: Select all
guest@porteus:/$ export VDPAU_DRIVER="nvidia"
guest@porteus:/$ vdpauinfo
display: :0.0 screen: 0
API version: 1
Information string: NVIDIA VDPAU Driver Shared Library 340.107 Thu May 24 21:44:57 PDT 2018
Video surface:
name width height types
-------------------------------------------
420 4096 4096 NV12 YV12
422 4096 4096 UYVY YUYV
Decoder capabilities:
name level macbs width height
----------------------------------------------------
MPEG1 0 8192 2048 2048
MPEG2_SIMPLE 3 8192 2048 2048
MPEG2_MAIN 3 8192 2048 2048
H264_BASELINE --- not supported ---
H264_MAIN 41 8192 2048 2048
H264_HIGH 41 8192 2048 2048
VC1_SIMPLE 1 8190 2048 2048
VC1_MAIN 2 8190 2048 2048
VC1_ADVANCED 4 8190 2048 2048
MPEG4_PART2_SP 3 8192 2048 2048
MPEG4_PART2_ASP 5 8192 2048 2048
DIVX4_QMOBILE 0 8192 2048 2048
DIVX4_MOBILE 0 8192 2048 2048
DIVX4_HOME_THEATER 0 8192 2048 2048
DIVX4_HD_1080P 0 8192 2048 2048
DIVX5_QMOBILE 0 8192 2048 2048
DIVX5_MOBILE 0 8192 2048 2048
DIVX5_HOME_THEATER 0 8192 2048 2048
DIVX5_HD_1080P 0 8192 2048 2048
H264_CONSTRAINED_BASELINE --- not supported ---
H264_EXTENDED --- not supported ---
H264_PROGRESSIVE_HIGH --- not supported ---
H264_CONSTRAINED_HIGH --- not supported ---
H264_HIGH_444_PREDICTIVE --- not supported ---
HEVC_MAIN --- not supported ---
HEVC_MAIN_10 --- not supported ---
HEVC_MAIN_STILL --- not supported ---
HEVC_MAIN_12 --- not supported ---
HEVC_MAIN_444 --- not supported ---
Output surface:
name width height nat types
----------------------------------------------------
B8G8R8A8 8192 8192 y Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8
R10G10B10A2 8192 8192 y Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8
Bitmap surface:
name width height
------------------------------
B8G8R8A8 8192 8192
R8G8B8A8 8192 8192
R10G10B10A2 8192 8192
B10G10R10A2 8192 8192
A8 8192 8192
Video mixer:
feature name sup
------------------------------------
DEINTERLACE_TEMPORAL y
DEINTERLACE_TEMPORAL_SPATIAL y
INVERSE_TELECINE y
NOISE_REDUCTION y
SHARPNESS y
LUMA_KEY y
HIGH QUALITY SCALING - L1 y
HIGH QUALITY SCALING - L2 -
HIGH QUALITY SCALING - L3 -
HIGH QUALITY SCALING - L4 -
HIGH QUALITY SCALING - L5 -
HIGH QUALITY SCALING - L6 -
HIGH QUALITY SCALING - L7 -
HIGH QUALITY SCALING - L8 -
HIGH QUALITY SCALING - L9 -
parameter name sup min max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH y 1 4096
VIDEO_SURFACE_HEIGHT y 1 4096
CHROMA_TYPE y
LAYERS y 0 4
attribute name sup min max
-----------------------------------------------------
BACKGROUND_COLOR y
CSC_MATRIX y
NOISE_REDUCTION_LEVEL y 0.00 1.00
SHARPNESS_LEVEL y -1.00 1.00
LUMA_KEY_MIN_LUMA y
LUMA_KEY_MAX_LUMA y
Also, after exporting VDPAU_DRIVER="nvidia" mpv seems to work with --hwdec=vdpau:
Code: Select all
guest@porteus:/$ mpv --player-operation-mode=pseudo-gui --hwdec=vdpau /video/example.mp4
mpv: /usr/lib64/libOpenCL.so.1: no version information available (required by /usr/lib64/libavutil.so.55)
mpv: /usr/lib64/libOpenCL.so.1: no version information available (required by /usr/lib64/libavfilter.so.6)
guest@porteus:/$
System Porteus 5.0rc1, but not the official version, an older one with even older kernel.
Porteus 5 + Nvidia official driver = no hardware acceleration on Mpv
Posted: 17 Jul 2019, 18:48
by fulalas
@Rava, Nvidia official drivers are working nice, as I said. The problem is when using Nouveau.
Porteus 5 + Nvidia official driver = no hardware acceleration on Mpv
Posted: 19 Jul 2019, 18:00
by chromer
I am on Porteus 5 rc1 with default kernel 5.1.5 and using Nvidia 430.14 module from dl.porteus.org
after exporting VDPAU_DRIVER=nvidia seems to have some supported codecs :
Code: Select all
guest@porteus:~$ export VDPAU_DRIVER=nvidia
guest@porteus:~$ vdpauinfo
display: :0.0 screen: 0
API version: 1
Information string: NVIDIA VDPAU Driver Shared Library 430.14 Tue May 7 19:56:26 CDT 2019
Video surface:
name width height types
-------------------------------------------
420 4096 4096 NV12 YV12
422 4096 4096 UYVY YUYV
444 4096 4096
Decoder capabilities:
name level macbs width height
----------------------------------------------------
MPEG1 0 65536 4032 4048
MPEG2_SIMPLE 3 65536 4032 4048
MPEG2_MAIN 3 65536 4032 4048
H264_BASELINE 51 65536 4032 4080
H264_MAIN 51 65536 4032 4080
H264_HIGH 51 65536 4032 4080
VC1_SIMPLE 1 8190 2048 2048
VC1_MAIN 2 8190 2048 2048
VC1_ADVANCED 4 8190 2048 2048
MPEG4_PART2_SP 3 8192 2048 2048
MPEG4_PART2_ASP 5 8192 2048 2048
DIVX4_QMOBILE 0 8192 2048 2048
DIVX4_MOBILE 0 8192 2048 2048
DIVX4_HOME_THEATER 0 8192 2048 2048
DIVX4_HD_1080P 0 8192 2048 2048
DIVX5_QMOBILE 0 8192 2048 2048
DIVX5_MOBILE 0 8192 2048 2048
DIVX5_HOME_THEATER 0 8192 2048 2048
DIVX5_HD_1080P 0 8192 2048 2048
H264_CONSTRAINED_BASELINE 51 65536 4032 4080
H264_EXTENDED 51 65536 4032 4080
H264_PROGRESSIVE_HIGH 51 65536 4032 4080
H264_CONSTRAINED_HIGH 51 65536 4032 4080
H264_HIGH_444_PREDICTIVE 51 65536 4032 4080
HEVC_MAIN --- not supported ---
HEVC_MAIN_10 --- not supported ---
HEVC_MAIN_STILL --- not supported ---
HEVC_MAIN_12 --- not supported ---
HEVC_MAIN_444 --- not supported ---
Output surface:
name width height nat types
----------------------------------------------------
B8G8R8A8 16384 16384 y Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8
R10G10B10A2 16384 16384 y Y8U8V8A8 V8U8Y8A8 A4I4 I4A4 A8I8 I8A8
Bitmap surface:
name width height
------------------------------
B8G8R8A8 16384 16384
R8G8B8A8 16384 16384
R10G10B10A2 16384 16384
B10G10R10A2 16384 16384
A8 16384 16384
Video mixer:
feature name sup
------------------------------------
DEINTERLACE_TEMPORAL y
DEINTERLACE_TEMPORAL_SPATIAL y
INVERSE_TELECINE y
NOISE_REDUCTION y
SHARPNESS y
LUMA_KEY y
HIGH QUALITY SCALING - L1 y
HIGH QUALITY SCALING - L2 -
HIGH QUALITY SCALING - L3 -
HIGH QUALITY SCALING - L4 -
HIGH QUALITY SCALING - L5 -
HIGH QUALITY SCALING - L6 -
HIGH QUALITY SCALING - L7 -
HIGH QUALITY SCALING - L8 -
HIGH QUALITY SCALING - L9 -
parameter name sup min max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH y 1 4096
VIDEO_SURFACE_HEIGHT y 1 4096
CHROMA_TYPE y
LAYERS y 0 4
attribute name sup min max
-----------------------------------------------------
BACKGROUND_COLOR y
CSC_MATRIX y
NOISE_REDUCTION_LEVEL y 0.00 1.00
SHARPNESS_LEVEL y -1.00 1.00
LUMA_KEY_MIN_LUMA y
LUMA_KEY_MAX_LUMA y
but when trying to play a video via mpv the following error occurs :
Code: Select all
guest@porteus:/mnt/sdb1$ mpv --player-operation-mode=pseudo-gui --hwdec=vdpau MyVideo.mkv
libva info: VA-API version 1.4.1
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib64/dri/nvidia_drv_video.so
libva error: /usr/lib64/dri/nvidia_drv_video.so has no function __vaDriverInit_1_0
libva info: va_openDriver() returns -1
Any solution ?
Porteus 5 + Nvidia official driver = no hardware acceleration on Mpv
Posted: 19 Jul 2019, 20:25
by fulalas
@chromer, have you tried to open a terminal instance, exporting nvidia vdpau variable (
export VDPAU_DRIVER="nvidia"), then calling mpv (
mpv --player-operation-mode=pseudo-gui --hwdec=vdpau [FILE])? It's very important that you export the variable and call mpv in the same terminal instance.