Strange behaviour at mpv hw dec

I just installed Manjaro-ARM-xfce-vim3-21.06.img at my X96 Max+ . After changes the 01-panfrost.conf to enable 3D AccelMethod, I tried the mpv hw decode :

mpv --hwdec=auto --vo=gpu ./the_local_video_clip.mkv

However , mpv just plays serveral frames and freezes :

(+) Video --vid=1 () (h264 1024x576 25.000fps)
(+) Audio --aid=1 --alang=eng (
) (aac 2ch 48000Hz)
Cannot load libcuda.so.1
[vaapi] libva: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
Failed to open VDPAU backend libvdpau_meson.so: cannot open shared object file: No such file or directory
AO: [pulse] 48000Hz stereo 2ch float
Using hardware decoding (v4l2m2m-copy).
VO: [gpu] 1024x576 nv12
Invalid video timestamp: 0.000000 → 0.000000
AV: 00:00:00 / 00:29:31 (0%) A-V: 0.000 Dropped: 3

Exiting… (Quit)

This is just a fresh installation and I havenot updated packages yet. Did I miss sth. ? Regards !

I see the same error if use --hwdec=auto or --hwdec=yes.
Does it freezes on all the video file or just this particular video files.

I tried another mp4 video clip and designated decoder v4l2m2m-copy with the following cmds :
mpv --hwdec=v4l2m2m-copy ./mandalorian_s02e02.mp4

(+) Video --vid=1 () (h264 1280x720 23.976fps)
(+) Audio --aid=1 (
) (aac 2ch 48000Hz)
Using hardware decoding (v4l2m2m-copy).
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 1280x720 nv12
AV: 00:00:00 / 00:40:17 (0%) A-V: 0.000 Dropped: 2

Exiting… (Quit)

------------- tried with one more option -------------------------------------------------------------
mpv --hwdec=v4l2m2m-copy --vo=gpu ./mandalorian_s02e02.mp4
(+) Video --vid=1 () (h264 1280x720 23.976fps)
(+) Audio --aid=1 (
) (aac 2ch 48000Hz)
Using hardware decoding (v4l2m2m-copy).
AO: [pulse] 48000Hz stereo 2ch float
VO: [gpu] 1280x720 nv12
AV: 00:04:59 / 00:40:17 (12%) A-V: -0.000 Dropped: 1

Exiting… (Quit)

There are no warnings or errors at mpv printout . But mpv just doesnot play , it show the still pic. at the video clip. There are sth. strange at dmesg :

[  148.586089] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x61408c0, tail=0x61408c0
[  148.590466] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x61408c0, tail=0x61408c0, sched_job=000000004f1cbbb2
[  148.616118] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x6cf4880, tail=0x6cf4880
[  148.620480] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x6cf4880, tail=0x6cf4880, sched_job=00000000037de2d2
[  148.643410] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x6cf5480, tail=0x6cf5480
[  148.648063] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x6cf5480, tail=0x6cf5480, sched_job=00000000e11d1a81
[  148.664361] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x6140880, tail=0x6140880
[  148.670464] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x6140880, tail=0x6140880, sched_job=000000004f1cbbb2
[  190.438781] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x60b34c0, tail=0x60b34c0
[  190.442910] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x60b34c0, tail=0x60b34c0, sched_job=000000000c798bd7
[  300.549270] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x60b24c0, tail=0x60b24c0
[  300.553461] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x60b24c0, tail=0x60b24c0, sched_job=00000000baa6342a
[  300.570076] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x6140880, tail=0x6140880
[  300.576103] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x6140880, tail=0x6140880, sched_job=00000000ab566924
[  315.340710] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x60b38c0, tail=0x60b38c0
[  315.344852] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x60b38c0, tail=0x60b38c0, sched_job=00000000a34308e7
...
[  664.996006] meson-vdec ff620000.video-decoder: VIFIFO usage (16777242) > VIFIFO size (16777216)
[  664.996297] meson-vdec ff620000.video-decoder: VIFIFO usage (16777242) > VIFIFO size (16777216)
[  665.065220] meson-vdec ff620000.video-decoder: VIFIFO usage (16778332) > VIFIFO size (16777216)
[  665.065489] meson-vdec ff620000.video-decoder: VIFIFO usage (16778332) > VIFIFO size (16777216)
[  665.065932] meson-vdec ff620000.video-decoder: VIFIFO usage (16778076) > VIFIFO size (16777216)
[  665.106261] meson-vdec ff620000.video-decoder: VIFIFO usage (16777414) > VIFIFO size (16777216)

… quite a lot of the aboved message …

I tried to chang the topic of this thread since it may mislead people ~~~

Just to clear something up.

Hardware video decoding is very hit’n’miss on ARM, as most of the drivers used are not supported by most video renders.

Agreed it is a hit and miss for hardware video decode. just tried streaming this, it works. Dropped frames mainly due to mouse pointer movement.

jfl@MNJROGTKPro    mpv --hwdec=v4l2m2m-copy https://www.youtube.com/watch?v=jenVMnOi2uA
 (+) Video --vid=1 (*) (h264 1920x1080 29.970fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
AO: [pulse] 48000Hz stereo 2ch float
Using hardware decoding (v4l2m2m-copy).
VO: [gpu] 1920x1080 nv12
AV: 00:09:52 / 00:10:10 (97%) A-V:  0.000 Dropped: 33 Cache: 17s/7MB

Exiting... (Quit)

Hi @JFL, if you are with gnome in wayland shouldn’t you use the option gpu-context=wayland? Because if you don’t i think you are using xwayland to render (if I’m not wrong).

Had set it in mpv.conf (if not mistaken, will double check). Based on limited casual testing, it seems mpv works better in XFCE than in GNOME-Wayland (some dropped frames with mouse movement) when --hwdec=v4l2m2m-copy is being activated.

1 Like