Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | Moonlight Qt : GUI game streaming client for Sunshine and NVIDIA GameStream #6339

Merged
merged 29 commits into from
Apr 29, 2023

Conversation

mtekman
Copy link
Contributor

@mtekman mtekman commented Apr 25, 2023

This is based on PR #6303 as discussed here #6303 (comment)

mtekman and others added 24 commits April 11, 2023 15:01
- DietPi-Software | Moonlight: Add meta info
- DietPi-Software | Moonlight: As the packages from the used repository are for RPi only, disable on all other devices for now. We may add own builds for other hardware in the future. Also install libcec, tried to be loaded when starting streaming.
- DietPi-Software | Moonlight: Assure that headless mode is disabled and default GPU memory applied on install
- DietPi-Software | Moonlight: The armhf binary packages are currently not compatible with ARMv6: moonlight-stream/moonlight-embedded#832
- DietPi-Software | Moonlight: ARMv8 (64-bit) packages are available on Bullseye only
@MichaIng MichaIng added this to the v8.17 milestone Apr 25, 2023
@MichaIng MichaIng self-requested a review April 25, 2023 12:35
- DietPi-Software | Moonlight Qt: Consequently name it "Qt" and remove the embedded version from this PR
@MichaIng
Copy link
Owner

So this can run with full KMS, but only from console, or with fake KMS from desktop. I guess it could even run from desktop as well, but would need to be forced to run in DRM/KMS mode. I'll run some tests.

@mtekman
Copy link
Contributor Author

mtekman commented Apr 28, 2023

I guess it could even run from desktop as well, but would need to be forced to run in DRM/KMS mode.

Are you referring to the H264_DECODER_HINT=h264_v4l2m2m DRM_FORCE_DIRECT=1 moonlight-qt command from here?

I'll run some tests.

Appreciated!

@MichaIng MichaIng changed the title DietPi-Software | Moonlight QT : GUI game streaming client for Sunshine and NVIDIA GameStream DietPi-Software | Moonlight Qt : GUI game streaming client for Sunshine and NVIDIA GameStream Apr 29, 2023
@MichaIng
Copy link
Owner

Are you referring to the H264_DECODER_HINT=h264_v4l2m2m DRM_FORCE_DIRECT=1 moonlight-qt command from here?

Yes, or something like the -platform CLI options of Moonlight embedded.

- DietPi-Software | Moonlight Qt: Switch to ID 208 as 207 is now used by Moonlight (embedded)
@MichaIng
Copy link
Owner

MichaIng commented Apr 29, 2023

I tried starting it from console on RPi 2 with fKMS and KMS, with and without H264_DECODER_HINT=h264_v4l2m2m DRM_FORCE_DIRECT=1. In all cases, it starts up, but it has a large black border at the top with overlays parts of the GUI. However, it auto-detects the Sunshine server. I can pair it and connect, then select the Desktop app there, but it starts and stops immediately... Ah lol, now when I tried the exact same from SSH, it suddenly worked. Again, here I finish the text from keyboard and monitor attached to the RPi.

This was with full KMS and without any environment variable. It tells me on the SSH console that I should switch to fKMS and/or apply the rpivid-v4l2 overlay. But it does steam now.

00:00:03 - FFmpeg: [hevc_v4l2m2m @ 0x2940c20] v4l2 output format not supported
00:00:03 - FFmpeg: [hevc_v4l2m2m @ 0x2940c20] Could not find a valid device
00:00:03 - FFmpeg: [hevc_v4l2m2m @ 0x2940c20] can't configure decoder
00:00:03 - FFmpeg: [hevc_v4l2m2m @ 0x2940c20] V4L2 Codec end
00:00:03 - FFmpeg: V4L2 Context destroyed
00:00:03 - SDL Error (0): Unable to open decoder for format: 100
00:00:03 - SDL Error (0): Unable to load FFmpeg decoder
00:00:03 - SDL Info (0): V-sync disabled
00:00:03 - SDL Error (0): Full KMS Mode is enabled! Hardware accelerated H.264 decoding will be unavailable!
00:00:03 - SDL Error (0): Change 'dtoverlay=vc4-kms-v3d' to 'dtoverlay=vc4-fkms-v3d' in /boot/config.txt to fix this!
00:00:03 - SDL Warn (0): Raspberry Pi HEVC decoder is not enabled! Add 'dtoverlay=rpivid-v4l2' to your /boot/config.txt to fix this!
00:00:03 - SDL Info (0): Using SDL renderer

Again, I'm missing a magic key to exit streaming. Other than the embedded version, it does not even listen to SIGTERM or SIGINT but only to hard SIGKILL.

EDIT: Ah, from the overlays README:

Name:   rpivid-v4l2
Info:   This overlay has been deprecated and deleted as the V4L2 stateless
        video decoder driver is enabled by default.
Load:   <Deprecated>

So adding this is not required anymore. AFAIK full GPU support for this was on RPi 4 only, so I cannot really test the full KMS hardware acceleration, I guess. Testing with fake KMS again.

The quit CLI command does not work for me with embedded as well as Qt version. The list command in Qt version hangs forever and can only be stopped via SIGKILL, same as the desktop stream.

@MichaIng
Copy link
Owner

MichaIng commented Apr 29, 2023

FFmpeg is used for hardware accelerated video decoding, actually. Shall we install it OOTB?

aSOFTWARE_DEPS[$software_id]=7

EDIT: A nope those FFmpeg parts seem to be embedded, so no external library needed.

When starting from the desktop, the GUI btw is all correct, so only the DRM console variant has this issue with the too large black top border.

MichaIng
MichaIng previously approved these changes Apr 29, 2023
- DietPi-Software | Moonlight Qt: Install libgl1, needed for streaming
@MichaIng
Copy link
Owner

@mtekman
The README actually shows the name "Moonlight PC": https://github.com/moonlight-stream/moonlight-qt
Shall we use that as well? It might be a little confusing since we currently offer the APT packages for RPi only, where "PC" is just a misleading term 🤔. On the other hand, "Moonlight" is shown on their GitHub repo and website as "Moonlight Embedded": https://moonlight-stream.org/

I'm wondering whether we should use own names to make the difference pretty clear, like "Moonlight (CLI)" and "Moonlight (GUI)" or so, to make sure that one is a pure CLI variant and the other is a pure GUI variant? Or follow the official naming from their repos? Or just ask THEM for a preference? 🙂

@mtekman
Copy link
Contributor Author

mtekman commented May 2, 2023

I'm wondering whether we should use own names to make the difference pretty clear, like "Moonlight (CLI)" and "Moonlight (GUI)" or so, to make sure that one is a pure CLI variant and the other is a pure GUI variant?

I'm up for this, it's a pretty clear distinction that will only help users decide what they want. My first impression of moonlight was that it would have a GUI like the android app, and it was only later that I realised what moonlight-qt was

@mtekman mtekman deleted the moonlight-qt branch May 2, 2023 20:52
@MichaIng
Copy link
Owner

MichaIng commented May 2, 2023

Okay, let's do it that way. Usually I'm for following the developers/manufacturers official naming but in this case it is confusing indeed, especially as long as we offer the RPi compatible packages only.

disconn3ct added a commit to disconn3ct/DietPi that referenced this pull request May 3, 2023
* dev: (75 commits)
  v8.17 (MichaIng#6362)
  v8.17
  v8.17 (MichaIng#6328)
  v8.17
  v8.17 (MichaIng#6356)
  v8.17
  v8.17
  v8.17
  v8.17
  v8.17 (MichaIng#6355)
  v8.17
  v8.17
  v8.17 (MichaIng#6353)
  v8.17
  v8.17
  v8.17
  v8.17 (MichaIng#6339)
  v8.17 (MichaIng#6303)
  v8.17
  v8.17
  ...
@MichaIng MichaIng mentioned this pull request May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants