[Nouveau] Video Hardware Decoding: Jittery Rectangles on Nvidia GT218 NVA8 VP4.

Ralph Corderoy ralph at inputplus.co.uk
Sat Jul 27 11:37:26 UTC 2019


Hi,

I'm having trouble with hardware decoding of video with mpv(1) having
switched from Nvidia's proprietary driver to nouveau due to Arch Linux
removing its nvidia-340xx package.

The machine is an Acer Revo.

    $ lspci -nn | grep VGA
    01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GT218 [ION] [10de:0a64] (rev a2)

I think this is codename NVA8 with the video-accleration engine VP4.0.

I've these packages installed, following
https://wiki.archlinux.org/index.php/Nouveau and
https://wiki.archlinux.org/index.php/Hardware_video_acceleration

    $ pacman -Q | egrep 'nvidia|nouveau|mesa|vdpau|vaapi|xorg-server'
    libva-mesa-driver 19.1.3-1
    libva-vdpau-driver 0.7.4-4
    libvdpau 1.2-1
    libvdpau-va-gl 0.4.2-2
    mesa 19.1.3-1
    mesa-demos 8.4.0-1
    mesa-vdpau 19.1.3-1
    nouveau-fw 325.15-1
    vdpauinfo 1.0-3
    xf86-video-nouveau 1.0.16-1
    xorg-server 1.20.5-2
    xorg-server-common 1.20.5-2
    $

A paste of vdpauinfo(1)'s output is at http://ix.io/1PHi.

I've many sample videos that exhibit the same problem, but I'll stick
with one from BBC's iPlayer obtained with get_iplayer(1).

    $ ffmpeg -i $f |& grep Video:
        Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661),
            yuv420p(tv, bt709), 960x540 [SAR 1:1 DAR 16:9], 1602 kb/s,
            25 fps, 25 tbr, 90k tbn, 50 tbc (default)

Plain old `mpv $f' plays fine, using software decoding.

    VO: [gpu] 960x540 yuv420p

Adding `--vo=vdpau' gives

    VO: [vdpau] 960x540 yuv420p
    [vo/vdpau] Compositing window manager detected. Assuming timing info
        is inaccurate.

Playback is fine, still software decoding.

`--vo=vdpau --hwdec=vdpau' uses hardware decoding:

    Using hardware decoding (vdpau).
    VO: [vdpau] 960x540 vdpau[yuv420p]
    [vo/vdpau] Compositing window manager detected. Assuming timing info
        is inaccurate.

The video plays, CPU load is less (my aim), but there's ‘tearing’ of the
picture as if small rectangles that are updates are appearing in the
wrong location, off by a little.  If I step through the frames with
mpv's ‘.’ and ‘,’ then I've found a pattern: one frame's picture is
good, followed by N bad ones where N is 3 or 7, i.e. every 4th or 8th
frame is okay.  Don't know if that's a clue or helps someone here
recognise a known problem.

I know X well, but Mesa, etc., below it are unknown to me, even to the
extent of knowing quite how all the bits fit together.  I'd appreciate a
pointer or two as to how to tackle the problem, even if it's a ‘You've
come to the wrong place, go over there’.  :-)

-- 
Cheers, Ralph.


More information about the Nouveau mailing list