[GAMES] NVIDIA Game Streaming with ODROID

Unstoppable
Posts: 8
Joined: Thu Jan 25, 2018 7:06 am
languages_spoken: english,dutch
ODROIDs: XU4, C2
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by Unstoppable » Sun Jan 28, 2018 12:15 am

meveric wrote:my packages are build WITH pulseaudio support, but it's more likely that puseaudio is causeing the issue and disabling pulseaudio and running moonlight on alsa instead could help here.
also running as root can has some sideeffects, for example pulseaudio does not work per default for root.
xcb_connection error makes me wonder if you run the program from terminal or from desktop, that could mean you run it without an X server, not sure if X is needed though, as for C1 and C2 video runs on a different layer anyway.
I have no desktop installed. I normally run it directly from the commandline, and the results from my previous post are using the SSH method you mentioned. Also, I did try removing pulseaudio, but the problems remain. Also, I did some more testing. This time using a normal user account instead of root.

First test was without pulseaudio installed and without the -localaudio parameter. The same errors showed up as mentioned before in the similar test with root.
Then I added the -localaudio parameter. The errors were gone after the first launch (and after a reboot), but when restarting the stream caused the same errors to show up again.

Next step was with pulseaudio installed. I did a reboot and started the stream. No alsa/rtp errors this time, with or without the -localaudio parameter. Even after restarting the stream.
However, the following errors keep showing up (and the video stutter problem as well):

Code: Select all

xcb_connection_has_errors() returned true
shared memfd open() failed: function not implemented
I added the -verbose parameter as well, but that didn't provide any extra information.
These two errors show up directly after eachother, and this happens always two times during initialization. Once after the line "Stream 1920x1080, 60 fps, 20000 kbps" and once after "starting video stream...done". I honestly do not know what these two errors mean.

UPDATE: I finished some additional testing. I tried forcing both the host and the C2 to run at 100Mbit Full duplex instead of 1Gb, since I read somewhere that this could also cause lag due to overhead. It didn't make any difference though. Additionally, I tried to use the official image. Clean install, fully up-to-date and only with the packages installed to build and run moonlight (from upstream). Still the same issue as on Armbian and the Debian Stretch image by meveric. It did get rid of two errors mentioned above however, so I guess those weren't the reasons for my issue.

This is the command I tested with:

Code: Select all

moonlight stream -fps 60 -1080 -platform aml -codec h265 -verbose 192.168.10.146
And this is the full log:

Code: Select all

Moonlight Embedded 2.4.6 (AML;ALSA;PULSE;EMBEDDED)
Connect to 192.168.10.146...
NVIDIA GeForce GTX 1070, GFE 3.12.0.84 (gs_04_04_23287129, 7.1.404.0)
Platform AMLogic VPU
Loading mappingfile /usr/local/share//moonlight/gamecontrollerdb.txt
No mapping available for cec_input (100000008e1b0000ec0c000001000000) on /dev/input/event2
No mapping available for vt-input (19000000b41600000107000001000000) on /dev/input/event3
Stream 1920 x 1080, 60 fps, 20000 kbps
Initializing platform...done
Resolving host name...done
Starting RTSP handshake...done
Initializing control stream...done
Initializing video stream...done
Initializing audio stream...done
Initializing input stream...done
Starting control stream...done
Starting video stream...OPEN es hevc
codec_init amstream version : 2.0
done
Starting audio stream...done
Starting input stream...done
Control stream received disconnect event
Loss Stats: Transaction failed: 11
Stopping input stream...done
Stopping audio stream...done
[codec_close_cntl]video codec close return=0!
Stopping video stream...done
Stopping control stream...done
Cleaning up input stream...done
Cleaning up audio stream...done
Cleaning up video stream...done
Cleaning up control stream...done
Cleaning up platform...done
Looks fine to me... Yet still the video starts to stutter after some time. I even tried lowering my bitrate to 5000 and it still happened. The only thing I can try still is either downgrade GFE and/or drivers, or try a direct connection between my PC and C2. Does anybody else have an idea of what else I could try?

Unstoppable
Posts: 8
Joined: Thu Jan 25, 2018 7:06 am
languages_spoken: english,dutch
ODROIDs: XU4, C2
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by Unstoppable » Sun Jan 28, 2018 10:59 pm

Just another update... I just finished testing with a direct connection (no routers or switches, and with static IP) between my PC and the C2, but it didn't help. I even tried using an ethernet USB device to ensure it isn't a problem with my PC's built-in ethernet. And with the ethernet USB I also tried forcing 100Mbit mode again (on the C2 as well), but that actually made things worse. It caused the stream to actually freeze and close on me.

Furthermore I removed any programs that I thought could conflict, such as codec packs, vmware, openvpn and hamachi. And I fully re-installed my graphics drivers (390.65) & GFE (3.12). Still slight video stuttering as described in my first post.

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by crashoverride » Mon Jan 29, 2018 11:03 pm

Unstoppable wrote:The stream usually, but not necessarily, starts out smooth. After some time (not more than a minute or two), the stream becomes.. not smooth. It seems like micro-stuttering or FPS drops. This effect will remain for some time as well, and then it becomes smooth again.
This is not a hardware issue. It is a software issue with moonlight-embedded. This occurs when one of its queues gets "backup up". I discussed the issue somewhere on this forum. Since there is no PTS information or management in moonlight-embedded, it depends solely on "the Grace of God" to work. Setups with large amounts of clock-skew between sender and receiver will be affected worse than those without.

I mitigated this issue on my XU4 branch by reworking the audio path and dropping audio when necessary. Since I do not currently have any Windows(tm) machines for testing, I have not applied this change or any updates for C2.

Unstoppable
Posts: 8
Joined: Thu Jan 25, 2018 7:06 am
languages_spoken: english,dutch
ODROIDs: XU4, C2
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by Unstoppable » Tue Jan 30, 2018 2:30 am

crashoverride wrote:
Unstoppable wrote:The stream usually, but not necessarily, starts out smooth. After some time (not more than a minute or two), the stream becomes.. not smooth. It seems like micro-stuttering or FPS drops. This effect will remain for some time as well, and then it becomes smooth again.
This is not a hardware issue. It is a software issue with moonlight-embedded. This occurs when one of its queues gets "backup up". I discussed the issue somewhere on this forum. Since there is no PTS information or management in moonlight-embedded, it depends solely on "the Grace of God" to work. Setups with large amounts of clock-skew between sender and receiver will be affected worse than those without.

I mitigated this issue on my XU4 branch by reworking the audio path and dropping audio when necessary. Since I do not currently have any Windows(tm) machines for testing, I have not applied this change or any updates for C2.
Ah, well that would explain why I didn't get it to work properly. You say however that you fixed it on the XU4 by dropping audio frames when needed, but my issue is with video only. Audio is always perfect on my system. Could it still the same issue?

And would it be hard to apply the same fix, or a similar one, for the C2? Because if not, I could try to do it, since I'm a programmer myself. Although with very minimum C experience, but I like a challenge. Plus I really want Moonlight to work :p

raelik
Posts: 22
Joined: Mon Nov 14, 2016 9:51 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by raelik » Tue Jan 30, 2018 6:37 am

So, I've got an XU4 that I'm setting up RetroPie on (using https://odroid.in/ubuntu_16.04lts/ubunt ... 213.img.xz as the base image), and I wanted some advice for getting moonlight working. I borked my RetroPie setup last time I tried this (RetroPie manually installs some specific dependencies, and I accidentally overwrote them with build deps for moonlight). My main questions are which moonlight-embedded repo/version should I use, what options might I need to set before I build it, and should I do all of that prior to doing the RetroPie install & setup?

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by crashoverride » Tue Jan 30, 2018 2:32 pm

Unstoppable wrote:Audio is always perfect on my system. Could it still the same issue?
If either the audio thread or the video thread blocks for too long, it results in reception data loss. If you have "perfect audio", then its because your C2 clock is skewed slower than your PC clock; This means it takes slighter longer to play audio on C2 than it does on your PC. Eventually this slight difference in time accumulates consuming all free buffers. Since the amount of time lost due to missing data is greater than the clock skew, synchronization is re-established over time. This also means that audio is not actually perfect, rather, the loss is audibly imperceptible; however, the video loss is perceptible.

The mitigation for this situation is to 1) enable "freeplay" on C2 so that video will never block waiting for vsync, and 2) re-buffer the incoming audio so you can discard it in the event it would block. The latter requires code modification.

Unstoppable
Posts: 8
Joined: Thu Jan 25, 2018 7:06 am
languages_spoken: english,dutch
ODROIDs: XU4, C2
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by Unstoppable » Tue Jan 30, 2018 5:48 pm

crashoverride wrote:
Unstoppable wrote:Audio is always perfect on my system. Could it still the same issue?
If either the audio thread or the video thread blocks for too long, it results in reception data loss. If you have "perfect audio", then its because your C2 clock is skewed slower than your PC clock; This means it takes slighter longer to play audio on C2 than it does on your PC. Eventually this slight difference in time accumulates consuming all free buffers. Since the amount of time lost due to missing data is greater than the clock skew, synchronization is re-established over time. This also means that audio is not actually perfect, rather, the loss is audibly imperceptible; however, the video loss is perceptible.

The mitigation for this situation is to 1) enable "freeplay" on C2 so that video will never block waiting for vsync, and 2) re-buffer the incoming audio so you can discard it in the event it would block. The latter requires code modification.
Thanks for the explanation, it makes sense. I understand audio isn't actually perfect, but it sounds perfect - is what I meant (like you said). I would like to try to enable "freeplay" on the C2 before modifying the code, but I'm not quite sure I understand what that is. Is that the same as freerun mode? Because I verified that freerun mode is actually enabled when a moonlight stream has been started. If it is not, what would I need to do to enable freeplay?

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by crashoverride » Tue Jan 30, 2018 5:58 pm

Unstoppable wrote:Is that the same as freerun mode?
Yes, I should have wrote "freerun" mode but was thinking about games so wrote "freeplay" by mistake. :oops:

Unstoppable
Posts: 8
Joined: Thu Jan 25, 2018 7:06 am
languages_spoken: english,dutch
ODROIDs: XU4, C2
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by Unstoppable » Tue Jan 30, 2018 7:24 pm

crashoverride wrote:
Unstoppable wrote:Is that the same as freerun mode?
Yes, I should have wrote "freerun" mode but was thinking about games so wrote "freeplay" by mistake. :oops:
No problem, I figured you meant freerun :D Sadly, freerun mode doesn't work then. Once I've started a stream and execute the following:

Code: Select all

cat /sys/class/video/freerun_mode
It does return 1. Any idea why freerun isn't actually working? Or rather, not working well enough?

crashoverride
Posts: 4317
Joined: Tue Dec 30, 2014 8:42 pm
languages_spoken: english
ODROIDs: C1
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by crashoverride » Wed Jan 31, 2018 3:47 am

Unstoppable wrote:Any idea why freerun isn't actually working? Or rather, not working well enough?
If freerun does not affect operation, then it is not the problem. As previously stated, there are two (2) things (video and audio) that can cause the issue. If video is not the issue (freerun), then its the audio.

Unstoppable
Posts: 8
Joined: Thu Jan 25, 2018 7:06 am
languages_spoken: english,dutch
ODROIDs: XU4, C2
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by Unstoppable » Wed Jan 31, 2018 4:59 am

crashoverride wrote:
Unstoppable wrote:Any idea why freerun isn't actually working? Or rather, not working well enough?
If freerun does not affect operation, then it is not the problem. As previously stated, there are two (2) things (video and audio) that can cause the issue. If video is not the issue (freerun), then its the audio.
Ah I'm sorry. I didn't realize that freerun was for video only (even though it should be pretty obvious from the freaking command I executed haha). I suppose there is no way to enable something similar for (pulse)audio? Regardless, I'm going to experiment a little as soon as I have the time and post it here if I get some results.

raelik
Posts: 22
Joined: Mon Nov 14, 2016 9:51 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by raelik » Wed Jan 31, 2018 5:33 am

raelik wrote:So, I've got an XU4 that I'm setting up RetroPie on (using https://odroid.in/ubuntu_16.04lts/ubunt ... 213.img.xz as the base image), and I wanted some advice for getting moonlight working. I borked my RetroPie setup last time I tried this (RetroPie manually installs some specific dependencies, and I accidentally overwrote them with build deps for moonlight). My main questions are which moonlight-embedded repo/version should I use, what options might I need to set before I build it, and should I do all of that prior to doing the RetroPie install & setup?
I guess I should be more specific. Since I'm running RetroPie (no X11) should I use https://github.com/AreaScout/moonlight-embedded, one of the xu4 branches of https://github.com/OtherCrashOverride/m ... shoverride, or something else that I'm not seeing?

User avatar
AreaScout
Posts: 806
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by AreaScout » Fri Feb 02, 2018 8:43 pm

raelik wrote:
raelik wrote:So, I've got an XU4 that I'm setting up RetroPie on (using https://odroid.in/ubuntu_16.04lts/ubunt ... 213.img.xz as the base image), and I wanted some advice for getting moonlight working. I borked my RetroPie setup last time I tried this (RetroPie manually installs some specific dependencies, and I accidentally overwrote them with build deps for moonlight). My main questions are which moonlight-embedded repo/version should I use, what options might I need to set before I build it, and should I do all of that prior to doing the RetroPie install & setup?
I guess I should be more specific. Since I'm running RetroPie (no X11) should I use https://github.com/AreaScout/moonlight-embedded, one of the xu4 branches of https://github.com/OtherCrashOverride/m ... shoverride, or something else that I'm not seeing?
Hello raelik, both should be good to go, you have to choose which one is best (fastest) for you, if you use my repository you need an modified SDL2 which is capable of doing fbdev (https://github.com/AreaScout/SDL-mirror with memeka patch) or you are going to do it with Wayland, if you use the repo from CrashOverride please use the XU4-openal branch.

RG

raelik
Posts: 22
Joined: Mon Nov 14, 2016 9:51 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by raelik » Sat Feb 03, 2018 2:42 am

AreaScout wrote:
raelik wrote:
raelik wrote:So, I've got an XU4 that I'm setting up RetroPie on (using https://odroid.in/ubuntu_16.04lts/ubunt ... 213.img.xz as the base image), and I wanted some advice for getting moonlight working. I borked my RetroPie setup last time I tried this (RetroPie manually installs some specific dependencies, and I accidentally overwrote them with build deps for moonlight). My main questions are which moonlight-embedded repo/version should I use, what options might I need to set before I build it, and should I do all of that prior to doing the RetroPie install & setup?
I guess I should be more specific. Since I'm running RetroPie (no X11) should I use https://github.com/AreaScout/moonlight-embedded, one of the xu4 branches of https://github.com/OtherCrashOverride/m ... shoverride, or something else that I'm not seeing?
Hello raelik, both should be good to go, you have to choose which one is best (fastest) for you, if you use my repository you need an modified SDL2 which is capable of doing fbdev (https://github.com/AreaScout/SDL-mirror with memeka patch) or you are going to do it with Wayland, if you use the repo from CrashOverride please use the XU4-openal branch.

RG
I was planning on using fbdev if at all possible, since that's what everything else is going to be using.

User avatar
AreaScout
Posts: 806
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by AreaScout » Sat Feb 03, 2018 3:56 am

raelik wrote: I was planning on using fbdev if at all possible, since that's what everything else is going to be using.
and whats your problem ? try to compile it on RetroPie, iirc EmulationStation is also using SDL2 as video driver so there should be already an SDL2 fbdev version on that image

raelik
Posts: 22
Joined: Mon Nov 14, 2016 9:51 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by raelik » Sat Feb 03, 2018 6:09 am

AreaScout wrote:
raelik wrote: I was planning on using fbdev if at all possible, since that's what everything else is going to be using.
and whats your problem ? try to compile it on RetroPie, iirc EmulationStation is also using SDL2 as video driver so there should be already an SDL2 fbdev version on that image
I wasn't really having a problem per-se, as I don't think issue I had before was really related to moonlight. It was more just package-foo when dealing with apt installed dependencies vs. RetroPie's source compiled ones. I didn't think about the fact that RetroPie does that until I'd already borked it. I really just wanted to know which repo/branch I'd have the best luck with.

User avatar
AreaScout
Posts: 806
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by AreaScout » Sat Feb 03, 2018 8:33 pm

raelik wrote: I wasn't really having a problem per-se, as I don't think issue I had before was really related to moonlight. It was more just package-foo when dealing with apt installed dependencies vs. RetroPie's source compiled ones. I didn't think about the fact that RetroPie does that until I'd already borked it. I really just wanted to know which repo/branch I'd have the best luck with.
it works extremely well on RetroPie, if there isn't already any moonlight package for RetroPie on XU4, this is how i build it:

Code: Select all

sudo apt-get install libssl-dev libopus-dev libasound2-dev libudev-dev libavahi-client-dev libcurl4-openssl-dev libexpat1-dev cmake uuid-dev libenet-dev libsdl2-dev libbz2-dev liblzma-dev
git clone https://github.com/AreaScout/moonlight-embedded.git --recursive
cd moonlight-embedded
cmake .
make -j8
that's it, i didn't integrate it in RetroPie, instead i startet it via ssh, what can i say ... it runs VERY well, you have to figure out how to integrate this, but i think that's easy :)

P.S.: i had to disable pulseaudio and i use this image http://www.arcadepunks.com/odroid-xu4-r ... a-impress/

RG

raelik
Posts: 22
Joined: Mon Nov 14, 2016 9:51 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by raelik » Sun Feb 04, 2018 12:54 pm

AreaScout wrote:
that's it, i didn't integrate it in RetroPie, instead i startet it via ssh, what can i say ... it runs VERY well, you have to figure out how to integrate this, but i think that's easy :)

P.S.: i had to disable pulseaudio and i use this image http://www.arcadepunks.com/odroid-xu4-r ... a-impress/

RG
So, I REALLY like that ORA image... unfortunately, I don't think I can use it. I'm using a CloudShell 2, and it seems that it isn't possible to get the case fan working on a 3.10 kernel. And I NEED that fan, the hard drives push the thing up to 80C at idle without the fan, around 40C with the fan. If there's a way to update that image to a 4.9+ kernel (4.14 would be nice) without breaking everything, then I'd love to use it.

User avatar
meveric
Posts: 9771
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by meveric » Sun Feb 04, 2018 3:05 pm

The Case fan works with Kernel 3.10 as well, there's no reason why it should not work.
I used it with Kernel 3.10 just fine before I updated it to 4.14.
Simply use: i2cset -y 1 0x60 0x05 0x00 and the fan will start spinning.
Doesn't matter what Kernel you're on.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

raelik
Posts: 22
Joined: Mon Nov 14, 2016 9:51 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by raelik » Mon Feb 05, 2018 12:21 am

meveric wrote:The Case fan works with Kernel 3.10 as well, there's no reason why it should not work.
I used it with Kernel 3.10 just fine before I updated it to 4.14.
Simply use: i2cset -y 1 0x60 0x05 0x00 and the fan will start spinning.
Doesn't matter what Kernel you're on.
Looks like I may have a different issue, i2cdetect is detecting every address, which means something is pulling SDA low somewhere. Not sure how this happened, I didn't mess with the hardware. That said, I've never been able to get the fan working on 3.10, only on 4.9+.

raelik
Posts: 22
Joined: Mon Nov 14, 2016 9:51 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by raelik » Mon Feb 05, 2018 2:58 am

raelik wrote:
meveric wrote:The Case fan works with Kernel 3.10 as well, there's no reason why it should not work.
I used it with Kernel 3.10 just fine before I updated it to 4.14.
Simply use: i2cset -y 1 0x60 0x05 0x00 and the fan will start spinning.
Doesn't matter what Kernel you're on.
Looks like I may have a different issue, i2cdetect is detecting every address, which means something is pulling SDA low somewhere. Not sure how this happened, I didn't mess with the hardware. That said, I've never been able to get the fan working on 3.10, only on 4.9+.
I double-checked, and there isn't a hardware issue. On 4.9+, the case fan works normally and i2cdetect returns just 60, but on 3.10, it doesn't work and i2cdetect returns every address. There may be some 3.10 patch or a kernel CONFIG_* setting that fixes this, but that ORA image isn't using it.

raelik
Posts: 22
Joined: Mon Nov 14, 2016 9:51 am
languages_spoken: english
ODROIDs: XU4
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by raelik » Tue Feb 06, 2018 1:58 am

So odroid clued me in that I may simply need to access /dev/i2c-4 instead of /dev/i2c-1 (i.e. i2cset -y 4 0x60 0x05 0x00). I'll give that a shot tonight, and if that works, then the ORA image is how I'll proceed!

User avatar
AreaScout
Posts: 806
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by AreaScout » Tue Feb 20, 2018 5:01 am

hi all

so for anyone interested, the upcoming ODROID-N1 will support 4k hardware accelerated Game Streaming, read more over here viewtopic.php?f=155&t=30183

RG

substring
Posts: 51
Joined: Fri Jun 23, 2017 5:28 am
languages_spoken: english, french
ODROIDs: C2, XU4
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by substring » Wed Feb 21, 2018 7:54 am

One stupid question : why fork moonlight, and not submit those changes upstream ? I remember seeing some commits form AreaScout, but I still believe an upstream integration would be nicer and most probably easier to update and follox the moolight evolutions by themselves

User avatar
AreaScout
Posts: 806
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by AreaScout » Wed Feb 21, 2018 5:28 pm

substring wrote:One stupid question : why fork moonlight, and not submit those changes upstream ? I remember seeing some commits form AreaScout, but I still believe an upstream integration would be nicer and most probably easier to update and follox the moolight evolutions by themselves
Rockchip integration i am trying to get upstream soon, the ffmpeg part i made changes for are to ODROID platform specific i.e using all 8 cores would slow things down because of the heterogeneous multiprocessing (hmp) management, so with 4 cores hard coded it works best a.s.o

RG

substring
Posts: 51
Joined: Fri Jun 23, 2017 5:28 am
languages_spoken: english, french
ODROIDs: C2, XU4
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by substring » Wed Feb 21, 2018 9:43 pm

That's a very good start ! Do i understand that since memeka added XU4 support in ffmpeg, we could hope for an upstream XU4 integration ? Or i'm just too enthusiastic ?

User avatar
AreaScout
Posts: 806
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by AreaScout » Thu Feb 22, 2018 4:14 am

substring wrote:That's a very good start ! Do i understand that since memeka added XU4 support in ffmpeg, we could hope for an upstream XU4 integration ? Or i'm just too enthusiastic ?
that's not a good start, that is what we did all the time ;) well color conversation is the only thing left to get HW decoding via FFmpeg on moonlight but on the other hand
ODROID's are so fast that software decoding is also capable to get a decent Gameplay experience, the second video is on XU4Q with software decoder and it runs really fine, i doubt that HW decoding will be faster ...
well since GFE 3.12 things get worse on my setup and 1080p60 isn't that fast anymore ( on XU4Q ), if that doesn't change maybe i will try to implement it again ( it wouldn't be my first try, oh well ... )
but it could also be that my Hardware get's outdated now and this is the cause of the problems. So that's the situation !

RG

Tony32
Posts: 6
Joined: Sun Mar 04, 2018 1:39 am
languages_spoken: english
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by Tony32 » Sun Mar 04, 2018 1:41 am

Which OS would you recommend for the smoothest installation on an XU4? I'm getting one soon and I really want moonlight to work with it =)
I've downloaded Debian Stretch already, but maybe there is some other OS that's have better compability?

User avatar
AreaScout
Posts: 806
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by AreaScout » Tue Mar 06, 2018 1:10 am

Tony32 wrote:Which OS would you recommend for the smoothest installation on an XU4? I'm getting one soon and I really want moonlight to work with it =)
I've downloaded Debian Stretch already, but maybe there is some other OS that's have better compability?
Debian Stretch is ok, just do a sudo apt-get install moonlight-embedded-odroid if it's not already installed

RG

User avatar
AreaScout
Posts: 806
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by AreaScout » Tue Mar 06, 2018 3:47 am

AreaScout wrote: Debian Stretch is ok, just do a sudo apt-get install moonlight-embedded-odroid if it's not already installed

RG
Sorry it's Debian Jessie and you should use this image viewtopic.php?f=98&t=7322#p57682 moonlight is pre-installed but you should consider a apt-get update && apt-get upgrade && apt-get dist-upgrade
before using it and the package name is moonlight-embedded not moonlight-embedded-odroid on XU3/4

RG

User avatar
meveric
Posts: 9771
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by meveric » Tue Mar 06, 2018 8:25 am

Updated moonlight packages in my repository:
viewtopic.php?p=217580#p217580
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Tony32
Posts: 6
Joined: Sun Mar 04, 2018 1:39 am
languages_spoken: english
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by Tony32 » Wed Mar 07, 2018 4:19 pm

AreaScout wrote:
AreaScout wrote: Debian Stretch is ok, just do a sudo apt-get install moonlight-embedded-odroid if it's not already installed

RG
Sorry it's Debian Jessie and you should use this image viewtopic.php?f=98&t=7322#p57682 moonlight is pre-installed but you should consider a apt-get update && apt-get upgrade && apt-get dist-upgrade
before using it and the package name is moonlight-embedded not moonlight-embedded-odroid on XU3/4

RG
w
Thank you so much! Much appreciated.

liquidsnake
Posts: 2
Joined: Mon Nov 19, 2018 2:20 am
languages_spoken: english
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by liquidsnake » Mon Nov 19, 2018 2:29 am

Was looking to resurface this thread. I am currently on a Odroid XU4 with Team Ora 1.5.2 (based on Retropie 4.4) and am unable to get Moonlight installed using the latest version 2.4.7. I am able to install AreaScout's last 2.4.6 version (that I believe is based on Jessie not Stretch) but unable to actually stream. The issue seems to be related to SDL2 as I can receive a unable to render window error. I had thought that since I am using a custom version of RetroPie/EmulationStation for Odroid that it should default to NOT use OpenGL but it appears that is not the case? Was hoping to get someones feedback on whether I need to install a custom SDL2 or if there is another layer of compatibility issues with Odroid/Moonlight that needs further refinement.

Many thanks

User avatar
AreaScout
Posts: 806
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by AreaScout » Mon Nov 26, 2018 1:34 am

liquidsnake wrote:Was looking to resurface this thread. I am currently on a Odroid XU4 with Team Ora 1.5.2 (based on Retropie 4.4) and am unable to get Moonlight installed using the latest version 2.4.7. I am able to install AreaScout's last 2.4.6 version (that I believe is based on Jessie not Stretch) but unable to actually stream. The issue seems to be related to SDL2 as I can receive a unable to render window error. I had thought that since I am using a custom version of RetroPie/EmulationStation for Odroid that it should default to NOT use OpenGL but it appears that is not the case? Was hoping to get someones feedback on whether I need to install a custom SDL2 or if there is another layer of compatibility issues with Odroid/Moonlight that needs further refinement.

Many thanks
Hi

Many things were broken lately, latest GFE did not work with current moonlight-embedded, that was fixed yesterday and FFmpeg init was also broken -> it's also fixed, if you compile from source now following the first example with external FFmpeg all should work now and you will have a super fast streaming experience. Tell me if you have problems, I don't know much about SDL2 on Ora Image but it has to be build without OpenGL and it should have FBDEV support as far as I am aware for this Image. I use it on an Ubuntu 18.04 minimal Image with GBM enabled Mali driver and GBM KMS/DRM enabled SDL2 2.0.9 version

RG

liquidsnake
Posts: 2
Joined: Mon Nov 19, 2018 2:20 am
languages_spoken: english
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by liquidsnake » Mon Nov 26, 2018 2:17 pm

Hello. Many thanks for providing guidance on how to get this to properly run. I compiled with a custom FFMPEG per your direction and I am still getting a SDL: could not create window - exiting when attempting to stream with -platform sdl command. Given I am running Emulation Station from Team Ora image I am puzzled why I am receiving a SDL error. Attempting to stream via without any platform commands creates a different error. Starting control stream...Start B failed: 11. (My understanding is this error relates to GFE 3.16 which I believe was just patched per your note below). I should be running with -platform sdl right?

Thanks again.

AreaScout wrote:
Hi

Many things were broken lately, latest GFE did not work with current moonlight-embedded, that was fixed yesterday and FFmpeg init was also broken -> it's also fixed, if you compile from source now following the first example with external FFmpeg all should work now and you will have a super fast streaming experience. Tell me if you have problems, I don't know much about SDL2 on Ora Image but it has to be build without OpenGL and it should have FBDEV support as far as I am aware for this Image. I use it on an Ubuntu 18.04 minimal Image with GBM enabled Mali driver and GBM KMS/DRM enabled SDL2 2.0.9 version

RG

User avatar
AreaScout
Posts: 806
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by AreaScout » Mon Nov 26, 2018 4:27 pm

liquidsnake wrote:Hello. Many thanks for providing guidance on how to get this to properly run. I compiled with a custom FFMPEG per your direction and I am still getting a SDL: could not create window - exiting when attempting to stream with -platform sdl command. Given I am running Emulation Station from Team Ora image I am puzzled why I am receiving a SDL error. Attempting to stream via without any platform commands creates a different error. Starting control stream...Start B failed: 11. (My understanding is this error relates to GFE 3.16 which I believe was just patched per your note below). I should be running with -platform sdl right?

Thanks again.
Yes -platform sdl is needed, you can try to change/add some SDL2 attributes, as far as I remember they have to use a custom SDL2 FBDEV backend and it could be that an alpha size value of 0 is needed for this, please try to change

this -> https://github.com/AreaScout/moonlight- ... .c#L52-L55 to this ->

Code: Select all

    SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION,2);
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION,0);
    SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1);
    SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
    SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
    SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
    SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 0);
    SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
Also please git pull the latest changes on my github page, because I forgot to update the thirdparty submodules

I was testing this back in 2015 on FBDEV if I remember correctly it was not the fastest SDL2 backend, X11 was faster, GBM is equal with X11 and does not have tearing

RG

SAM41
Posts: 3
Joined: Wed Feb 20, 2019 6:48 pm
languages_spoken: german, english
ODROIDs: none yet
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by SAM41 » Wed Mar 13, 2019 8:38 pm

Hey AreaScout,
are you still working on this project?
Are you confident that it will work on the Odroid N2/will you try to make it work?

shadowhunter
Posts: 1
Joined: Fri Nov 23, 2018 2:27 am
languages_spoken: English
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by shadowhunter » Wed Mar 13, 2019 9:36 pm

Will installing Android resolve issues like this, since that build seems to get updated quicker than the embedded build?

Sent from my SM-N950U using Tapatalk


User avatar
AreaScout
Posts: 806
Joined: Sun Jul 07, 2013 3:05 am
languages_spoken: german, english
ODROIDs: X2, U3, XU3, C2, HiFi Shield, XU4, XU4Q,
N1, Go, VU5A, Show2, CloudShell2,
H2, N2, VU7A, VuShell
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by AreaScout » Thu Mar 14, 2019 12:44 am

SAM41 wrote:
Wed Mar 13, 2019 8:38 pm
Hey AreaScout,
are you still working on this project?
Are you confident that it will work on the Odroid N2/will you try to make it work?
Amlogic is already supported by moonlight mainline, N2 should work out of the box
shadowhunter wrote:
Wed Mar 13, 2019 9:36 pm
Will installing Android resolve issues like this, since that build seems to get updated quicker than the embedded build?

Sent from my SM-N950U using Tapatalk
Moonlight on Android has very good support while on Linux for XU3/4 it's better to use my fork ;

RG

Codey8
Posts: 16
Joined: Sat Dec 15, 2018 4:41 am
languages_spoken: english
ODROIDs: 0
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by Codey8 » Fri Mar 22, 2019 11:47 pm

Hey. Do you guys know if it is possible to code your own games? What language? :?: :roll: :lol:

User avatar
meveric
Posts: 9771
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go
Contact:

Re: [GAMES] NVIDIA Game Streaming with ODROID

Unread post by meveric » Sat Mar 23, 2019 5:37 am

Codey8 wrote:
Fri Mar 22, 2019 11:47 pm
Hey. Do you guys know if it is possible to code your own games? What language? :?: :roll: :lol:
kinda the wrong section to ask.
Sure you can code your own games and you can code them in any language you want. There is (nearly) no restrictions for the language.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Post Reply

Return to “Games and Emulators”

Who is online

Users browsing this forum: No registered users and 1 guest