Gamestreaming Package+Sources Relase

Talking about OS and emulation core development
Post Reply
AreaScout
Posts: 1590
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, Go2, C4
Has thanked: 91 times
Been thanked: 264 times
Contact:

Gamestreaming Package+Sources Relase

Post by AreaScout »

    Gamestreaming for Go2/Go2-bk/Go Super
      moonlight.png
      moonlight.png (15.58 KiB) Viewed 525 times
        GameStream1.png
        GameStream1.png (1.31 MiB) Viewed 525 times
          GameStream2.png
          GameStream2.png (1.4 MiB) Viewed 525 times
            Download and install the package:

            Hi guys, here is the new updated package for moonlight-embedded it now supports the new Go Super and has a tearing fix, soon the source code is also available which wasn't back with the first release
            I am super excited about this release on the new Go Super because streaming with this device is really great fun and works almost with ZERO LAG ๐Ÿงƒ๐Ÿโค๐ŸŽ๐ŸŽ

            This debian package release is for the HK Ubuntu 18.04 bionic image and should be tested there https://wiki.odroid.com/odroid_go_advan ... /ubuntu_es

            >>>> Download moonlight-embedded 2.4.11 <<<<

            Code: Select all

            sudo apt install pulseaudio
            echo "autospawn=no" >> /home/odroid/pulse/client.conf
            
            wget https://www.areascout.at/libsdl2_2.0.10_arm64.deb
            wget https://www.areascout.at/moonlight-embedded_2.4.11-1_arm64.deb
            
            sudo apt install ./libsdl2_2.0.10_arm64.deb
            sudo apt install ./moonlight-embedded_2.4.11-1_arm64.deb
            
            Copy the contents of the moonlight.tgz file underneath to your /etc/emulationstation/themes/es-theme-simple directory
            moonlight.tgz
            (351.5 KiB) Downloaded 5 times
            Edit the file /etc/emulationstation/es_systems.cfg and add this content:

            Code: Select all

            	<system>
            		<name>moonlight</name>
            		<fullname>Moonlight Game Streaming</fullname>
            		<path>/opt/moonlight</path>
            		<extension>.sh</extension>
            		<command>%ROM%</command>
            		<platform></platform>
            		<theme>moonlight</theme>
            	</system>
            
            Generate a folder with this path /opt/moonlight and generate a file with the name "Start Game Stream.sh" and place this content inside and give 0755 permissions to that file:

            Code: Select all

            #!/bin/bash
            pulseaudio --start
            moonlight stream 192.168.1.2 -app Steam -fps 30 -720 -platform rk -mapping /usr/local/share/moonlight/gamecontrollerdb.txt -codec h265 -bitrate 15000
            pulseaudio --kill
            
            If your graphic card does not support h265 codec please choose h264 with the codec option, also this build has two video backends (sdl and rk) if you want to test streaming with sdl2 just replace rk with sdl on the -platform option switch ( rk aka RockChip is fastest ! )
            Also the IP address should be exchanged to the one from your PC

            Pair with your computer:

            Code: Select all

            moonlight pair 192.168.1.2
            
            Follow the on screen instructions

            Now you can start streaming from within Emulationstation the Steam App is the default App from the script which is started and from there you can run all your games from your Steam Library (see first picture)

            Have fun streaming
              Last edited by AreaScout on Tue Jan 12, 2021 10:36 pm, edited 4 times in total.
              These users thanked the author AreaScout for the post (total 2):
              odroid (Tue Jan 05, 2021 9:55 am) • joy (Tue Jan 12, 2021 10:16 am)

              AreaScout
              Posts: 1590
              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, Go2, C4
              Has thanked: 91 times
              Been thanked: 264 times
              Contact:

              Re: Gamestreaming Package+Sources Relase

              Post by AreaScout »

                Building moonlight-embedded from source:
                  GameStream3.png
                  GameStream3.png (1.38 MiB) Viewed 490 times
                    >>>> source code <<<<

                    Building moonlight with only the Rockchip (fastest) video backend:

                    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 libpulse-dev libdrm-dev

                    Code: Select all

                    git clone https://github.com/rockchip-linux/linux-rga.git
                    cd linux-rga
                    sudo apt install meson ninja-build
                    meson -Dlibdrm=true --prefix=/usr build/
                    ninja -C build
                    sudo ninja -C build install
                    

                    Code: Select all

                    cd ~
                    git clone https://github.com/rockchip-linux/mpp.git
                    cd mpp
                    cmake -DRKPLATFORM=ON -DHAVE_DRM=ON .
                    make -j3
                    sudo make install
                    

                    Code: Select all

                    git clone https://github.com/AreaScout/moonlight-embedded.git --recursive
                    cd moonlight-embedded/
                    mkdir build && cd build
                    cmake  ../.
                    make -j3
                    strip moonlight
                    
                    Building moonlight with Rockchip and SDL2 video backend:

                    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 libpulse-dev libbz2-dev liblzma-dev libdrm-dev
                    

                    Code: Select all

                    wget https://www.areascout.at/libsdl2_2.0.10_arm64.deb
                    wget https://www.areascout.at/libsdl2-dev_2.0.10_arm64.deb
                    
                    sudo apt install ./libsdl2_2.0.10_arm64.deb
                    sudo apt install ./libsdl2-dev_2.0.10_arm64.deb
                    

                    Code: Select all

                    git clone https://github.com/rockchip-linux/linux-rga.git
                    cd linux-rga
                    sudo apt install meson ninja-build
                    meson -Dlibdrm=true --prefix=/usr build/
                    ninja -C build
                    sudo ninja -C build install
                    

                    Code: Select all

                    cd ~
                    git clone https://github.com/rockchip-linux/mpp.git
                    cd mpp
                    cmake -DRKPLATFORM=ON -DHAVE_DRM=ON .
                    make -j3
                    sudo make install
                    

                    Code: Select all

                    git clone https://github.com/JeffyCN/FFmpeg.git
                    cd FFmpeg
                    wget -O FFmpeg.patch https://pastebin.com/raw/1m3j6st9
                    patch -p1 < FFmpeg.patch
                    ./configure --enable-gpl --disable-vaapi --enable-pthreads --enable-neon --enable-vfp --enable-rkmpp --enable-librga --enable-version3 --enable-libdrm --enable-shared --enable-static
                    make -j3
                    cd ~
                    

                    Code: Select all

                    git clone https://github.com/AreaScout/moonlight-embedded.git --recursive
                    cd moonlight-embedded/
                    mkdir build && cd build
                    cmake  -DUSE_CUSTOM_FFMPEG=ON -DFFMPEG_HOME:STRING=/home/odroid/FFmpeg ../.
                    make -j3
                    strip moonlight
                    
                    Have Fun
                    Last edited by AreaScout on Tue Jan 05, 2021 6:04 am, edited 8 times in total.

                    AreaScout
                    Posts: 1590
                    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, Go2, C4
                    Has thanked: 91 times
                    Been thanked: 264 times
                    Contact:

                    Re: Gamestreaming Package+Sources Relase

                    Post by AreaScout »

                      reserved

                      AreaScout
                      Posts: 1590
                      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, Go2, C4
                      Has thanked: 91 times
                      Been thanked: 264 times
                      Contact:

                      Re: Gamestreaming Package+Sources Relase

                      Post by AreaScout »

                        reserved

                        hbiber
                        Posts: 13
                        Joined: Thu Jan 30, 2020 5:03 am
                        languages_spoken: english
                        ODROIDs: Odroid Go Advance
                        Has thanked: 5 times
                        Been thanked: 1 time
                        Contact:

                        Re: Gamestreaming Package+Sources Relase

                        Post by hbiber »

                        I can't believe there's no comments on this. Awesome work!

                        Idk that much about compiling, will there be ready to go image?

                        User avatar
                        rooted
                        Posts: 8269
                        Joined: Fri Dec 19, 2014 9:12 am
                        languages_spoken: english
                        Location: Gulf of Mexico, US
                        Has thanked: 728 times
                        Been thanked: 302 times
                        Contact:

                        Re: Gamestreaming Package+Sources Relase

                        Post by rooted »

                        hbiber wrote:I can't believe there's no comments on this. Awesome work!

                        Idk that much about compiling, will there be ready to go image?
                        It's in the instructions ;)

                        Just do this from the stock ES image:

                        Code: Select all

                        sudo apt install pulseaudio
                        echo "autospawn=no" >> /home/odroid/pulse/client.conf
                        
                        wget https://www.areascout.at/libsdl2_2.0.10_arm64.deb
                        wget https://www.areascout.at/moonlight-embedded_2.4.11-1_arm64.deb
                        
                        sudo apt install ./libsdl2_2.0.10_arm64.deb
                        sudo apt install ./moonlight-embedded_2.4.11-1_arm64.deb 

                        Josh86
                        Posts: 88
                        Joined: Fri Jan 17, 2020 4:24 am
                        languages_spoken: english
                        Has thanked: 8 times
                        Been thanked: 13 times
                        Contact:

                        Re: Gamestreaming Package+Sources Relase

                        Post by Josh86 »

                        hbiber wrote: โ†‘
                        Wed Jan 06, 2021 8:42 am
                        I can't believe there's no comments on this. Awesome work!

                        Idk that much about compiling, will there be ready to go image?
                        It's really awesome! The only reason I think a number of people haven't used it more is because they are on other images or they don't know how to add this themselves. When Crash ends up getting the GUI implemented and fixes some QoL stuff I'd definitely consider switching to the stock image, especially with his streaming netplay (Retroarchs can break at any given time as most devs bump to the newest versions). I would really get use out of this moonlight port though. Seems like it would be great on the new Super version of the OGA with twin sticks and a bigger screen. No analog triggers....but that's OK -- most handhelds don't.

                        There's a number of cool things other images provide though right now out of the box (and that's the point of other custom images). Front end music, a number of ports (and other emulators like drastic, dosbox, etc), huge level of customization for shaders (great for GBA and older LCD displays), controls, looks, etc. I'm really interested to see what Crash ends up providing for a GUI.

                        I'd love to see moonlight on other images too. I'm hopeful the Batocera team can make it viable on the OGA, like all their other supported platforms. Apart from game streaming, front end video and music playback are really the only others things I desire out of this handheld -- and some images are about there with it, just not a priority.

                        AreaScout
                        Posts: 1590
                        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, Go2, C4
                        Has thanked: 91 times
                        Been thanked: 264 times
                        Contact:

                        Re: Gamestreaming Package+Sources Relase

                        Post by AreaScout »

                          Josh86 wrote: โ†‘
                          Sat Jan 09, 2021 5:47 am
                          It's really awesome! The only reason I think a number of people haven't used it more is because they are on other images or they don't know how to add this themselves
                          Yes it is, I am very proud of the Rockchip video backend in moonlight-embedded, for my personal experience it's the fastest compared to RPi and Amlogic, it does zero copy from video decoder to video output processor without any tearing and works extremely well and is a huge device upgrade. And yes, on images like EmuELEC, Batocera etc. it's not easy for someone other than the team behind it to install it.
                          Josh86 wrote: โ†‘
                          Sat Jan 09, 2021 5:47 am
                          I'd love to see moonlight on other images too. I'm hopeful the Batocera team can make it viable on the OGA
                          I also agree with that, I love the look and easy handling of Batocera and EmuELEC hope to see it too on there images

                          RG

                          AreaScout
                          Posts: 1590
                          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, Go2, C4
                          Has thanked: 91 times
                          Been thanked: 264 times
                          Contact:

                          Re: Gamestreaming Package+Sources Relase

                          Post by AreaScout »

                            The downside is, if you don't own a NVIDIA GPU you can't use it, while the steam link app on Google play store can stream from multiple GPU brands, but sadly it's not open source you would have to install Android and try it from there

                            RG

                            Shoesy
                            Posts: 38
                            Joined: Sat Jul 18, 2020 1:26 am
                            languages_spoken: english
                            ODROIDs: Odroid Go Advance
                            Has thanked: 2 times
                            Been thanked: 5 times
                            Contact:

                            Re: Gamestreaming Package+Sources Relase

                            Post by Shoesy »

                            Sunshine could be an option for people who donโ€™t have nvidia https://github.com/loki-47-6F-64/sunshine
                            These users thanked the author Shoesy for the post:
                            AreaScout (Sun Jan 10, 2021 11:04 pm)

                            AreaScout
                            Posts: 1590
                            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, Go2, C4
                            Has thanked: 91 times
                            Been thanked: 264 times
                            Contact:

                            Re: Gamestreaming Package+Sources Relase

                            Post by AreaScout »

                              @Shoesy

                              Thank you for the link ! Very interesting, didn't know that ๐Ÿ‘๐Ÿ™

                              Shoesy
                              Posts: 38
                              Joined: Sat Jul 18, 2020 1:26 am
                              languages_spoken: english
                              ODROIDs: Odroid Go Advance
                              Has thanked: 2 times
                              Been thanked: 5 times
                              Contact:

                              Re: Gamestreaming Package+Sources Relase

                              Post by Shoesy »

                              Couldnโ€™t get it to work on my Windows virtual machine, might try a Ubuntu system on a stick at some point...

                              AreaScout
                              Posts: 1590
                              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, Go2, C4
                              Has thanked: 91 times
                              Been thanked: 264 times
                              Contact:

                              Re: Gamestreaming Package+Sources Relase

                              Post by AreaScout »

                                The sunshine project uses a higher version of the moonlight-common-c core library which uses enet (a thin network communication layer on top of UDP), moonlight-embedded on the other side hasn't updated the submodule yet, so that could be the problem why it does not work on your setup

                                RG

                                Josh86
                                Posts: 88
                                Joined: Fri Jan 17, 2020 4:24 am
                                languages_spoken: english
                                Has thanked: 8 times
                                Been thanked: 13 times
                                Contact:

                                Re: Gamestreaming Package+Sources Relase

                                Post by Josh86 »

                                https://support.parsec.app/hc/en-us/art ... ux-Distros

                                I know it's not open source -- but I imagine there would be ways someone could make Parsec work based on these other builds. How usable though? I use Parsec for remote desktop and gaming. With Parsec, there's also the advantage of another user (player 2-4) joining a streamed session much like Steam's remote play together and the streaming service Crash seems to have implemented.

                                pattaCinta
                                Posts: 1
                                Joined: Fri Dec 18, 2020 12:50 am
                                languages_spoken: english
                                Has thanked: 0
                                Been thanked: 0
                                Contact:

                                Re: Gamestreaming Package+Sources Relase

                                Post by pattaCinta »

                                app
                                hbiber wrote: โ†‘
                                Wed Jan 06, 2021 8:42 am
                                I can't believe there's no comments on this. Awesome work!

                                Idk that much about compiling, will there be ready to go image?
                                yeah this was awesome

                                Post Reply

                                Return to โ€œPlatform developmentโ€

                                Who is online

                                Users browsing this forum: No registered users and 0 guests