You are not logged in.

#1 2025-07-01 13:35:01

rwd
Member
Registered: 2009-02-08
Posts: 671

[SOLVED] vdpau and vaapi works with mpv player, but not mplayer

Hi all,

Although both vaapi and vdpau work when playing video with mpv, I can't get it to work with my favorite player, mplayer. I would be grateful if someone could point me in the right direction to fix this.

I have a 2010 Macbook Pro 13''. It has Nvidia MCP89 (GeForce 320M) integrated graphics. I have Arch running in bios compatibility mode, and I am using X11, and Arch Linux with the linux-lts kernel is up to date.

mpv using vaapi works output of 'mpv --hwdec=vaapi testfile.mp4'

mpv using vdpau works as well: output of 'mpv --hwdec=vdpau testfile.mp4'

mplayer using vdpau gives errors and no video output: output of 'mplayer -vo vdpau -vc ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau,ffh264vdpau,ffodivxvdpau, testfile.mp4'

mplayer using vaapi gives errors and no video output: output of 'mplayer -vo vaapi testfile.mp4'

I tried " mplayer -vo vaapi:/dev/dri/renderD128 testfile.mp4" , since /dev/dri/renderD128 is the exact path to the device, but has the same results.

Output out of vainfo

Output out of vdpauinfo

Last edited by rwd (2025-07-01 15:27:54)

Offline

#2 2025-07-01 13:47:32

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,888

Re: [SOLVED] vdpau and vaapi works with mpv player, but not mplayer

VO: [gpu] 1280x720 vaapi[yuv420p]
VO: [gpu] 1280x720 vdpau[yuv420p]

The problem isn't the decoder but the output device - and mpv doesn't use vdpau or vaapi but the generic GPU output.
Can you "mplayer -vo xv" or "mplayer -vo gl"?

Also it looks like you're on nouveau?

glxinfo -B

VDPAU is very much a thing for the binary nvidia driver and you're seeking to use VAAPI.

Offline

#3 2025-07-01 14:08:47

rwd
Member
Registered: 2009-02-08
Posts: 671

Re: [SOLVED] vdpau and vaapi works with mpv player, but not mplayer

I am indeed using the nouveau driver  because Nvidia dropped support for the GeForce 320M. Playing the same testfile.mp4 using "mplayer -vo xv" and "mplayer -vo gl" works.

Here is the output of 'glxinfo -B'

My goal is to make the best use of available hardware acceleration on my old system. After posting I read that mpv is an improved fork of mplayer, so maybe I will just switch to mpv. But how do you know that the  'Using hardware decoding (vaapi).'  line in my  mpv output does not mean that vaapi is used?

Last edited by rwd (2025-07-01 14:10:04)

Offline

#4 2025-07-01 14:15:05

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,888

Re: [SOLVED] vdpau and vaapi works with mpv player, but not mplayer

It's used, but for decoding.
Try "mpv --vo=vaapi --hwdec=vaapi testfile.mp4"

Offline

#5 2025-07-01 14:39:59

rwd
Member
Registered: 2009-02-08
Posts: 671

Re: [SOLVED] vdpau and vaapi works with mpv player, but not mplayer

This shows video, but I wonder if this means hardware acceleration is used:

[user1@mbp ~]$ mpv --vo=vaapi --hwdec=vaapi testfile.mp4[
● Video  --vid=1  (h264 1280x720 25 fps) [default]
● Audio  --aid=1  (aac 6ch 48000 Hz 384 kbps) [default]
[vo/vaapi] Warning: this compatibility VO is low quality and may have issues with OSD, scaling, screenshots and more.
[vo/vaapi] vo=gpu is the preferred choice in any case and includes VA-API support via hwdec=vaapi or vaapi-copy.
Using hardware decoding (vaapi).
AO: [pulse] 48000Hz 5.1 6ch float
VO: [vaapi] 1280x720 vaapi[nv12]
AV: 00:00:12 / 00:01:02 (20%) A-V:  0.000

When I try the suggestion in the above output I get this output, and the video is  displayed with wrong colors (blue become purple):

[user1@mbp ~]$  mpv --vo=gpu --hwdec=vaapi testfile.mp4
● Video  --vid=1  (h264 1280x720 25 fps) [default]
● Audio  --aid=1  (aac 6ch 48000 Hz 384 kbps) [default]
[vo/gpu/libplacebo] EnumeratePhysicalDevices(inst, &num, NULL): VK_ERROR_INITIALIZATION_FAILED (../src/vulkan/context.c:957)
[vo/gpu/libplacebo] Found no suitable device, giving up.
[vo/gpu/libplacebo] Failed initializing vulkan device
libEGL warning: failed to get driver name for fd -1

libEGL warning: MESA-LOADER: failed to retrieve device information

libEGL warning: failed to get driver name for fd -1

Using hardware decoding (vaapi).
[autoconvert] Converting vaapi[nv12] -> vaapi[yuv420p]
AO: [pulse] 48000Hz 5.1 6ch float
VO: [gpu] 1280x720 vaapi[yuv420p]
AV: 00:00:02 / 00:01:02 (4%) A-V:  0.000

This gives video with normal colors:

[user1@mbp ~]$ mpv --vo=gpu --hwdec=vaapi-copy testfile.mp4
● Video  --vid=1  (h264 1280x720 25 fps) [default]
● Audio  --aid=1  (aac 6ch 48000 Hz 384 kbps) [default]
[vo/gpu/libplacebo] EnumeratePhysicalDevices(inst, &num, NULL): VK_ERROR_INITIALIZATION_FAILED (../src/vulkan/context.c:957)
[vo/gpu/libplacebo] Found no suitable device, giving up.
[vo/gpu/libplacebo] Failed initializing vulkan device
libEGL warning: failed to get driver name for fd -1

libEGL warning: MESA-LOADER: failed to retrieve device information

libEGL warning: failed to get driver name for fd -1

Using hardware decoding (vaapi-copy).
AO: [pulse] 48000Hz 5.1 6ch float
VO: [gpu] 1280x720 nv12
AV: 00:00:03 / 00:01:02 (5%) A-V: -0.000
Exiting... (Quit)

Last edited by rwd (2025-07-01 14:42:22)

Offline

#6 2025-07-01 14:54:27

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 69,888

Re: [SOLVED] vdpau and vaapi works with mpv player, but not mplayer

I wonder if this means hardware acceleration is used

At least VAAPI is, how much that shifts to the GPU w/ your generation and nouveau you can estimate by looking at the CPU load when playing a video on vaapi and --hwdec=no

Offline

#7 2025-07-01 15:27:24

rwd
Member
Registered: 2009-02-08
Posts: 671

Re: [SOLVED] vdpau and vaapi works with mpv player, but not mplayer

I checked 'top' to see how much cpu the mpv process used for each method :

mpv --vo=xv testfile.mp4: 20%
mpv --vo=gl  testfile.mp4: 25%
mpv --vo=vaapi --hwdec=vaapi testfile.mp4: 8%
mpv --vo=vaapi --hwdec=vaap-copyi testfile.mp4: 39%

So the 3rd one is the least taxing on the CPU it seems. I will use that. Thanks!

Last edited by rwd (2025-07-01 15:42:26)

Offline

Board footer

Powered by FluxBB