PINE64
Moonlight game streaming on Manjaro - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111)
+--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114)
+--- Thread: Moonlight game streaming on Manjaro (/showthread.php?tid=11656)



Moonlight game streaming on Manjaro - ShootTheMoon - 09-27-2020

Hi all!

So a makepkg of moonlight-qt works pretty well (https://aur.archlinux.org/packages/moonlight-qt/). I adjusted the version to 2.2.0 and got a working package.

It even streams from another machine on my home network, but that's where my success kinda ends. Streaming at 1080p/60fps seems to be just too much given the software-based decoding from ffmpeg. Even though I've run the hardware acceleration patching scripts from the pbp-tools repo (https://github.com/xmixahlx/pbp-tools), the streaming client still can't pick up the available devices:

Code:
00:00:00 - SDL Info (0): Trying fallback VAAPI driver names
00:00:00 - SDL Error (0): Failed to initialize VAAPI: -1
Failed to open VDPAU backend libvdpau_rockchip.so: cannot open shared object file: No such file or directory
00:00:00 - FFmpeg: [AVHWDeviceContext @ 0xaaaabe3cb630] VDPAU device creation on X11 display :0 failed.
00:00:00 - SDL Info (0): Trying fallback VDPAU driver paths
Failed to open VDPAU backend libvdpau_rockchip.so: cannot open shared object file: No such file or directory
00:00:00 - FFmpeg: [AVHWDeviceContext @ 0xaaaabe3b09b0] VDPAU device creation on X11 display :0 failed.
Failed to open VDPAU backend libvdpau_rockchip.so: cannot open shared object file: No such file or directory
00:00:00 - FFmpeg: [AVHWDeviceContext @ 0xaaaabe3f51e0] VDPAU device creation on X11 display :0 failed.
Failed to open VDPAU backend libvdpau_rockchip.so: cannot open shared object file: No such file or directory
00:00:00 - FFmpeg: [AVHWDeviceContext @ 0xaaaabe4a8680] VDPAU device creation on X11 display :0 failed.
Failed to open VDPAU backend libvdpau_rockchip.so: cannot open shared object file: No such file or directory
00:00:00 - FFmpeg: [AVHWDeviceContext @ 0xaaaabe4bdd80] VDPAU device creation on X11 display :0 failed.
00:00:00 - SDL Error (0): Failed to create VDPAU context: -1313558101
00:00:00 - Qt Info: Found "ModeSeven.ttf" at ":/data/ModeSeven.ttf"
00:00:00 - SDL Info (0): Using SDL renderer
00:00:00 - FFmpeg: [h264_mp4toannexb @ 0xaaaabeb1e1d0] The input looks like it is Annex B already
00:00:00 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] probing device /dev/video5
00:00:00 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] driver 'uvcvideo' on card 'USB Camera: USB Camera' in splane mode
00:00:00 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] v4l2 output format not supported
00:00:00 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] probing device /dev/video4
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] driver 'uvcvideo' on card 'USB Camera: USB Camera' in splane mode
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] v4l2 output format not supported
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] probing device /dev/video3
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] driver 'hantro-vpu' on card 'rockchip,rk3399-vpu-dec' in mplane mode
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] v4l2 output format not supported
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] probing device /dev/video2
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] driver 'hantro-vpu' on card 'rockchip,rk3399-vpu-enc' in mplane mode
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] v4l2 output format not supported
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] probing device /dev/video1
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] driver 'rkvdec' on card 'rkvdec' in mplane mode
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] v4l2 output format not supported
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] probing device /dev/video0
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] driver 'rockchip-rga' on card 'rockchip-rga' in splane mode
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] v4l2 output format not supported
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] Could not find a valid device
00:00:01 - FFmpeg: [h264_v4l2m2m @ 0xaaaabeb291b0] can't configure decoder
00:00:01 - SDL Error (0): Unable to open decoder for format: 1
00:00:01 - Qt Info: Found "ModeSeven.ttf" at ":/data/ModeSeven.ttf"
00:00:01 - SDL Info (0): Using SDL renderer


I've run the pbp-install-libva, pbp-install-libva-utils, pbp-install-libva-v4l2-request, and pbp-install-ffmpeg scripts. Do I need to run on a patched kernel as well? I'm not sure if 5.8.10-2-MANJARO-ARM has the patches or not.

I wasn't expecting vaapi to work yet based on the other topics I've read throughout the forums, but I was hoping either /dev/video1 or /dev/video2 would have reported back with the v4l2 format as available.

Any other suggestions are welcome as well!


RE: Moonlight game streaming on Manjaro - ShootTheMoon2 - 11-15-2020

So it's a been a while, and I somehow lost my original account, but I've made progress!

I read through all the mainline hwaccel and pbp-tools posts and got some really good info. I ran the pbp-tool scripts for libva, libva-v4l2-request, and ffmpeg. However, the ffmpeg script seems to fail. Despite that, I built the 4.3 version of the kwiboo repo. After pointing VAAPI at the rkvdec device (by running export "LIBVA_DRIVER_NAME=v4l2_request" and "export LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video1", vainfo says everything looks good:

Code:
v4l2-ctl --list-devices
rockchip,rk3399-vpu-enc (platform: hantro-vpu):
        /dev/video0
        /dev/video2
        /dev/media1

rockchip-rga (platform:rga):
        /dev/video3

rkvdec (platform:rkvdec):
        /dev/video1
        /dev/media0

USB Camera: USB Camera (usb-fe3c0000.usb-1.2):
        /dev/video4
        /dev/video5
        /dev/media2
(I know the above listing changes with every boot)
Code:
vainfo: VA-API version: 1.9 (libva 2.8.0)
vainfo: Driver version: v4l2-request
vainfo: Supported profile and entrypoints
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264MultiviewHigh      : VAEntrypointVLD
      VAProfileH264StereoHigh         : VAEntrypointVLD

So I attempted a test decode of big buck bunny from a local mp4 file
Code:
ffmpeg -hwaccel vaapi -vaapi_device /dev/video1 -i ./Big_Buck_Bunny_1080_10s_1MB.mp4 -an output.mp4 -loglevel verbose

[AVHWDeviceContext @ 0xaaab0c820ad0] libva: VA-API version 1.9.0

[AVHWDeviceContext @ 0xaaab0c820ad0] libva: User environment variable requested driver 'v4l2_request'                                  
[AVHWDeviceContext @ 0xaaab0c820ad0] libva: Trying to open /usr/lib/dri/v4l2_request_drv_video.so                                      
[AVHWDeviceContext @ 0xaaab0c820ad0] libva: Found init function __vaDriverInit_1_8                                                     
[AVHWDeviceContext @ 0xaaab0c820ad0] libva: va_openDriver() returns 0                                                                  
[AVHWDeviceContext @ 0xaaab0c820ad0] Initialised VAAPI connection: version 1.9                                                         
[AVHWDeviceContext @ 0xaaab0c820ad0] VAAPI driver: v4l2-request.                                                                       
[AVHWDeviceContext @ 0xaaab0c820ad0] Driver not found in known nonstandard list, using standard behaviour.                             
[h264 @ 0xaaab0c839900] Reinit context to 1920x1088, pix_fmt: yuv420p                                                                  
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from './Big_Buck_Bunny_1080_10s_1MB.mp4':                                                           
 Metadata:

   major_brand     : isom

   minor_version   : 512

   compatible_brands: isomiso2avc1mp41

   title           : Big Buck Bunny, Sunflower version

   artist          : Blender Foundation 2008, Janus Bager Kristensen 2013

   composer        : Sacha Goedegebure

   encoder         : Lavf57.63.100

   comment         : Creative Commons Attribution 3.0 - http://bbb3d.renderfarming.net

   genre           : Animation

 Duration: 00:00:10.00, start: 0.000000, bitrate: 815 kb/s

   Stream #0:0(und): Video: h264 (High), 1 reference frame (avc1 / 0x31637661), yuv420p(left), 1920x1080 (1920x1088) [SAR 1:1 DAR 16:
9], 812 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)

   Metadata:

     handler_name    : VideoHandler

File 'output.mp4' already exists. Overwrite? [y/N] y

Stream mapping:

 Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))

Press [q] to stop, [?] for help

[h264 @ 0xaaab0c8c3b60] Reinit context to 1920x1088, pix_fmt: vaapi_vld

[AVHWFramesContext @ 0xffffa005a8a0] Failed to sync surface 0x400001a: 5 (invalid VAContextID).                                        
[h264 @ 0xaaab0c83a730] Failed to transfer data to output frame: -5.                                                                   
Error while processing the decoded data for stream #0:0                                                                                
[AVIOContext @ 0xaaab0c806d50] Statistics: 0 seeks, 0 writeouts                                                                        
[AVIOContext @ 0xaaab0c807320] Statistics: 111917 bytes read, 0 seeks                                                                  
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000019: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000015: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000014: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000018: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x400001a: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000016: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000017: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000012: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000013: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000011: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000010: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x400000f: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x400000e: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x400000d: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x400000c: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x400000b: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x400000a: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000009: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000008: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000007: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000006: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000005: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000004: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000003: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000002: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000001: 6 (invalid VASurfaceID).                                     
[AVHWFramesContext @ 0xffffa005a8a0] Failed to destroy surface 0x4000000: 6 (invalid VASurfaceID).   


Now, moonlight hits a very similar message ("Failed to sync surface (invalid VAContextID)."):

Code:
00:00:00 - SDL Info (0): Compiled with SDL 2.0.12
00:00:00 - SDL Info (0): Running with SDL 2.0.12
00:00:00 - Qt Info: Found "gamecontrollerdb.txt" at ":/data/gamecontrollerdb.txt"
00:00:00 - SDL Info (0): Loaded 113 new gamepad mappings
00:00:00 - SDL Info (0): V-sync enabled
00:00:00 - SDL Info (0): Initialized VAAPI 1.9
00:00:00 - SDL Info (0): Driver: v4l2-request
00:00:00 - FFmpeg: [AVHWDeviceContext @ 0xaaaad6d9eea0] Format 0x3231564e -> nv12.
00:00:00 - FFmpeg: [AVHWDeviceContext @ 0xaaaad6d9eea0] VAAPI driver: v4l2-request.
00:00:00 - FFmpeg: [AVHWDeviceContext @ 0xaaaad6d9eea0] Driver not found in known nonstandard list, using standard behaviour.
00:00:00 - SDL Info (0): VAAPI driver supports exporting DRM PRIME surface handles
00:00:00 - SDL Info (0): Using VAAPI accelerated renderer on x11
00:00:00 - FFmpeg: [h264 @ 0xaaaad6eb0250] nal_unit_type: 7(SPS), nal_ref_idc: 3
00:00:00 - FFmpeg: [h264 @ 0xaaaad6eb0250] nal_unit_type: 8(PPS), nal_ref_idc: 3
00:00:00 - FFmpeg: [h264 @ 0xaaaad6eb0250] nal_unit_type: 5(IDR), nal_ref_idc: 3
00:00:00 - FFmpeg: [h264 @ 0xaaaad6eb0250] nal_unit_type: 5(IDR), nal_ref_idc: 3
00:00:00 - FFmpeg: [h264 @ 0xaaaad6eb0250] nal_unit_type: 5(IDR), nal_ref_idc: 3
00:00:00 - FFmpeg: [h264 @ 0xaaaad6eb0250] nal_unit_type: 5(IDR), nal_ref_idc: 3
00:00:00 - FFmpeg: [h264 @ 0xaaaad6eb0250] Format vaapi_vld chosen by get_format().
00:00:00 - FFmpeg: [h264 @ 0xaaaad6eb0250] Format vaapi_vld requires hwaccel initialisation.
00:00:00 - FFmpeg: [h264 @ 0xaaaad6eb0250] Considering format 0x3231564e -> nv12.
00:00:00 - FFmpeg: [h264 @ 0xaaaad6eb0250] Picked nv12 (0x3231564e) as best match for yuv420p.
00:00:00 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x4000000.
00:00:00 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Direct mapping possible.
00:00:00 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x4000001.
00:00:00 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x4000002.
00:00:00 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x4000003.
00:00:00 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x4000004.
00:00:00 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x4000005.
00:00:00 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x4000006.
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x4000007.
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x4000008.
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x4000009.
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x400000a.
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x400000b.
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x400000c.
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x400000d.
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x400000e.
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x400000f.
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x4000010.
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x4000011.
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x4000012.
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Created surface 0x4000013.
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Considering format 0x3231564e -> nv12.
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Picked nv12 (0x3231564e) as best match for yuv420p.
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Decode context initialised: 0x1000000/0x2000000.
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Reinit context to 1280x720, pix_fmt: vaapi_vld
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Param buffer (type 0, 672 bytes) is 0x8000000.
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Param buffer (type 1, 240 bytes) is 0x8000001.
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Slice 0 param buffer (3128 bytes) is 0x8000002.
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Slice 0 data buffer (75 bytes) is 0x8000003.
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Slice 1 param buffer (3128 bytes) is 0x8000004.
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Slice 1 data buffer (80 bytes) is 0x8000005.
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Slice 2 param buffer (3128 bytes) is 0x8000006.
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Slice 2 data buffer (85 bytes) is 0x8000007.
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Slice 3 param buffer (3128 bytes) is 0x8000008.
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Slice 3 data buffer (97 bytes) is 0x8000009.
00:00:01 - FFmpeg: [h264 @ 0xaaaad6eb0250] Decode to surface 0x4000013.
00:00:01 - SDL Info (0): FFmpeg-based video decoder chosen
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x4000013: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x4000012: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x4000011: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x4000010: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x400000f: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x400000e: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x400000d: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x400000c: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x400000b: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x400000a: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x4000009: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x4000008: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x4000007: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x4000006: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x4000005: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x4000004: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x4000003: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x4000002: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x4000001: 6 (invalid VASurfaceID).
00:00:01 - FFmpeg: [AVHWFramesContext @ 0xaaaad6e9d4a0] Failed to destroy surface 0x4000000: 6 (invalid VASurfaceID).

Can anyone tell me if i still need to update the kernel with pbp-tools? I'm on the latest manjaro release (5.9.6) and assumed all the acceleration patches have been mainlined by now.

If it's not the kernel, is there a version of ffmpeg I should be using?


RE: Moonlight game streaming on Manjaro - tblindba - 12-23-2020

This has been my Moby Dick for awhile. I've been trying to get a usable hardware moonlight solution off and on since I received my PBP.

I went a different route with moonlight-embedded. It compiled okay, but was unable to get hardware decoding working. I've taken inspiration, and installed moonlight-qt (which is objectively better) and it works identically to yours. I haven't patched/recompiled ffmpeg, the only change from stock is using mesa-git instead of mesa.

I'm not savvy enough to follow the discussion in the hwaccel pbptools threads closely, but I understand that there are some critical bugs to be worked out still (in ffmpeg?).

Software decoding works okay with 720p 60 fps, and even 1080p 30 fps, so it gives me hope that once hardware acceleration kicks in, then it'll be a perfect moonlight streaming device.

Also, I've noticed that while streaming, the keyboard/trackpad associations get messed up somehow. I'm not able to change system settings (volume, brightness, etc) and the trackpad loses its multitouch capability. Not a dealbreaker, but I wonder how the trackpad and function keys are presented in order to figure out a solution.

I'm glad there are other people out there who have the same concerns. I don't have the background for video stuff (which complicated on linux, and even worse on SBCs), but I can offer testing.

Also, I've discovered that moonlight is probably the most over the top, but practical solution to watching netflix on the PBP. It truly is the brute force and ignorance solution.