Help: Compiling Chiaki - PS4 remote play
-
Awesome guys! Really appreciate your work !
I own PS4 Pro, followed your guide and build Chiaki based on https://github.com/zerojay/chiaki fork. Streaming works fine on Pi4 2GB (30FPS; 720p) but without sound.
When i follow Qt5.12 workaround:
set(Qt5Core_DIR "/usr/lib/qt5.12/lib/cmake/Qt53DCore")
set(Qt5_DIR "/usr/lib/qt5.12/lib/cmake/Qt5")
set(QT_QMAKE_EXECUTABLE "/usr/lib/qt5.12/bin/qmake")adding to CMakeLists.txt and create new build i got error when trying run Chiaki :
"* failed to add service - already in use?"
any idea whats wrong? I put new set line on the begining of CMakeList.txt file.
-
hi, this is really great i tried to compile on fedora by installing all the dependencies .. my nothing wrong there error on error. nevertheless I was wondering if we could compile it directly on the raspberry? (rpi-os) which would be really nice it would be a tutorial to describe step by step :) I will try again because I like to progress ... unfortunately with the covid not had much school and therefore not really advanced in this 1 year. i hope a tutorial comes out .. have a nice day.
-
I have just been working 'offline' so far and not merged my stuff back in.
You could try a code upload I did last night that might work better.https://github.com/Fredrum/test_01
Note, you still have to add Qt5.12 as mentioned above!
The resolution is hardcoded in right now but if you get it generally working first you could try changin to 1080p in,
/home/pi/chiaki/chiaki_rpi/gui/src/pihwdecode.cpp
around line 116.Also note there's still issues with garbled video stream at startup (should clear up when you start playing)
And I'm having trouble with the PS4 Joypad connected to the Pi I have to take it in and out + press PS button 3-4 times before it starts working.So yeah, this is a rough version.
-
thanks, but getting below error once trying to make your test version:
-- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.7.3", minimum required is "3") -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.7.3", minimum required is "2.7") -- Found Opus: /usr/include -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found OpenSSL: /usr/lib/arm-linux-gnueabihf/libcrypto.so (found version "1.1.1d") -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29") -- Checking for module 'libudev' -- Found libudev, version 241 -- Checking for module 'libevdev' -- Found libevdev, version 1.6.0 -- Found Udev: udev (found version "241") -- Found Evdev: evdev (found version "1.6.0") -- Setsu enabled -- QT5 version chosen: /usr/lib/qt5.12/include//usr/lib/qt5.12/include/QtMultimedia/usr/lib/qt5.12/include/QtNetwork/usr/lib/qt5.12/include/QtCore/usr/lib/qt5.12/.//mkspecs/linux-rpi3-g++/usr/lib/qt5.12/include/QtGui/usr/include -- Found SDL2: /usr/lib/arm-linux-gnueabihf/cmake/SDL2/sdl2-config.cmake -- Checking for module 'libavutil' -- Found libavutil, version 56.22.100 -- Checking for module 'libswresample' -- Found libswresample, version 3.3.100 -- Checking for module 'libswscale' -- Found libswscale, version 5.3.100 -- Checking for module 'libavcodec' -- Found libavcodec, version 58.35.100 -- Found FFMPEG: avcodec;avutil (found version "56.22.100") found components: avcodec avutil -- Configuring done CMake Error at gui/CMakeLists.txt:50 (add_executable): Cannot find source file: /home/pi/chiaki/chiaki_rpi/third-party/h264bitstream/h264_stream.h Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx CMake Error at gui/CMakeLists.txt:50 (add_executable): No SOURCES given to target: chiaki
i think CMakeLists reffers to non existing directory - "chiaki_rpi". Once correcting to /home/pi/chiaki/third-party/
i get bellow during make in 60%
[ 60%] Building CXX object gui/CMakeFiles/chiaki.dir/src/main.cpp.o In file included from /home/pi/chiaki/gui/include/videodecoder.h:38, from /home/pi/chiaki/gui/include/streamsession.h:28, from /home/pi/chiaki/gui/include/streamwindow.h:23, from /home/pi/chiaki/gui/src/main.cpp:6: /home/pi/chiaki/gui/include/pihwdecode.h:9:10: fatal error: Limelight.h: Nie ma takiego pliku ani katalogu #include "Limelight.h" // from moonlight ^~~~~~~~~~~~~ compilation terminated. make[2]: *** [gui/CMakeFiles/chiaki.dir/build.make:73: gui/CMakeFiles/chiaki.dir/src/main.cpp.o] BĹ‚Ä…d 1 make[1]: *** [CMakeFiles/Makefile2:442: gui/CMakeFiles/chiaki.dir/all] BĹ‚Ä…d 2 make: *** [Makefile:163: all] BĹ‚Ä…d 2
-
@b4zyl said in Help: Compiling Chiaki - PS4 remote play:
thanks, but getting below error once trying to make your test version:
-- The C compiler identification is GNU 8.3.0 -- The CXX compiler identification is GNU 8.3.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.7.3", minimum required is "3") -- Found PythonInterp: /usr/bin/python3 (found suitable version "3.7.3", minimum required is "2.7") -- Found Opus: /usr/include -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found OpenSSL: /usr/lib/arm-linux-gnueabihf/libcrypto.so (found version "1.1.1d") -- Found PkgConfig: /usr/bin/pkg-config (found version "0.29") -- Checking for module 'libudev' -- Found libudev, version 241 -- Checking for module 'libevdev' -- Found libevdev, version 1.6.0 -- Found Udev: udev (found version "241") -- Found Evdev: evdev (found version "1.6.0") -- Setsu enabled -- QT5 version chosen: /usr/lib/qt5.12/include//usr/lib/qt5.12/include/QtMultimedia/usr/lib/qt5.12/include/QtNetwork/usr/lib/qt5.12/include/QtCore/usr/lib/qt5.12/.//mkspecs/linux-rpi3-g++/usr/lib/qt5.12/include/QtGui/usr/include -- Found SDL2: /usr/lib/arm-linux-gnueabihf/cmake/SDL2/sdl2-config.cmake -- Checking for module 'libavutil' -- Found libavutil, version 56.22.100 -- Checking for module 'libswresample' -- Found libswresample, version 3.3.100 -- Checking for module 'libswscale' -- Found libswscale, version 5.3.100 -- Checking for module 'libavcodec' -- Found libavcodec, version 58.35.100 -- Found FFMPEG: avcodec;avutil (found version "56.22.100") found components: avcodec avutil -- Configuring done CMake Error at gui/CMakeLists.txt:50 (add_executable): Cannot find source file: /home/pi/chiaki/chiaki_rpi/third-party/h264bitstream/h264_stream.h Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx CMake Error at gui/CMakeLists.txt:50 (add_executable): No SOURCES given to target: chiaki
i think CMakeLists reffers to non existing directory - "chiaki_rpi". Once correcting to /home/pi/chiaki/third-party/
i get bellow during make in 60%
[ 60%] Building CXX object gui/CMakeFiles/chiaki.dir/src/main.cpp.o In file included from /home/pi/chiaki/gui/include/videodecoder.h:38, from /home/pi/chiaki/gui/include/streamsession.h:28, from /home/pi/chiaki/gui/include/streamwindow.h:23, from /home/pi/chiaki/gui/src/main.cpp:6: /home/pi/chiaki/gui/include/pihwdecode.h:9:10: fatal error: Limelight.h: Nie ma takiego pliku ani katalogu #include "Limelight.h" // from moonlight ^~~~~~~~~~~~~ compilation terminated. make[2]: *** [gui/CMakeFiles/chiaki.dir/build.make:73: gui/CMakeFiles/chiaki.dir/src/main.cpp.o] BĹ‚Ä…d 1 make[1]: *** [CMakeFiles/Makefile2:442: gui/CMakeFiles/chiaki.dir/all] BĹ‚Ä…d 2 make: *** [Makefile:163: all] BĹ‚Ä…d 2
You likely need to add the --recursive flag to your git checkout. I have no idea how to read these errors either. What are they in English?
-
Sorry about these I'm still inexperienced in doing code stuff that also works for other people! :)
I have made a fix for a noob mistake with some absolute paths that were specifc to my system. I tried compiling with the new relative paths. (still not the official way of doing this but I'd have to figure that one out)
I made a git 'issue' thread here that we can continue to chat in so we don't spam this one too much.
https://github.com/Fredrum/test_01/issues/1
You could re-clone for the update in
gui/CMakeLists.txt (only one file got updates) or maybe just re-download that file.I want to get this working for you so please keep letting me know if it still doesn't?
Cheers
Fred -
Hi @b4zyl as the PS4 is very soon transitioning into being a retro machine Iv'e got a new version going of this that should be much easier to get running.
Iv'e tested this a couple of times on completely fresh Raspbian installs.
https://github.com/Fredrum/chiaki/wiki/Chiaki-for-the-Raspberry-Pi
If you still run into problems just post on the new git repo's 'issues' section.
If anyone has this running in 1080p mode on a PS4 Pro I'd love to hear! -
@b4zyl Same issue here when using the fork
-
@b4zyl said in Help: Compiling Chiaki - PS4 remote play:
Awesome guys! Really appreciate your work !
I own PS4 Pro, followed your guide and build Chiaki based on https://github.com/zerojay/chiaki fork. Streaming works fine on Pi4 2GB (30FPS; 720p) but without sound.
When i follow Qt5.12 workaround:
set(Qt5Core_DIR "/usr/lib/qt5.12/lib/cmake/Qt53DCore")
set(Qt5_DIR "/usr/lib/qt5.12/lib/cmake/Qt5")
set(QT_QMAKE_EXECUTABLE "/usr/lib/qt5.12/bin/qmake")adding to CMakeLists.txt and create new build i got error when trying run Chiaki :
"* failed to add service - already in use?"
any idea whats wrong? I put new set line on the begining of CMakeList.txt file.
I get the same issue on RetroPie building these. Always get:
failed to add service - already in use?
Created a quick build script, but can't get to launch currently.
# install dependencies sudo apt install cmake python3-protobuf protobuf-compiler libopus-dev libsdl2-dev libssl-dev -y # pull Qt5.12 and install cd /tmp wget https://github.com/koendv/qt5-opengl-raspberrypi/releases/download/v5.12.5-1/qt5-opengl-dev_5.12.5_armhf.deb sudo apt install ./qt5-opengl-dev_5.12.5_armhf.deb -y # clone rpi branch of chiaki cd /home/pi git clone --single-branch --branch rpi01 https://github.com/Fredrum/chiaki.git chiaki cd chiaki # can be a bit slow git submodule update --init # qt5.12 audio fix - tested with and without these paths and results in the same # echo "set(Qt5Core_DIR "/usr/lib/qt5.12/lib/cmake/Qt53DCore")" >> /home/pi/chiaki/gui/CMakeLists.txt # echo "set(Qt5_DIR "/usr/lib/qt5.12/lib/cmake/Qt5")" >> /home/pi/chiaki/gui/CMakeLists.txt # echo "set(QT_QMAKE_EXECUTABLE "/usr/lib/qt5.12/bin/qmake")" >> /home/pi/chiaki/gui/CMakeLists.txt # build mkdir build cd build cmake -DCMAKE_PREFIX_PATH=/usr/lib/qt5.12 .. make # add custom ports launcher cat <<EOF > /home/pi/RetroPie/roms/ports/RemotePS4.sh #!/bin/bash /home/pi/chiaki/build/gui/chiaki EOF chmod +x /home/pi/RetroPie/roms/ports/RemotePS4.sh
-
@zerojay I fixed this in the end and used the original source. I've created a bash script to compile it and add it to RetroPie as a port
-
@domb84 finally resolved the audio issues for this as well. You need to revert to the legacy audio options in RetroPie, ie pulseaudio.
Final script here works.
-
Just a note that I'm not having any trouble with the audio after upgrading my system to the new PulseAudio default.
So for me it was working with both Alsa previously and now PulseAudio. -
@redmarsbluemoon I've put all the info in the script and I did file a bug with logs but I just ended up configuring pulseaudio. Not sure what the issue with alsa is.
https://github.com/thestr4ng3r/chiaki/issues/397
Do you have any information on hot keys etc? There's no docs that I can find and since I've made a custom port I can launch it but can't quit unless i just 'killall chaiki' via ssh.
Also, I'm not sure if there are supposed to be any menus within chiaki, but nothing renders, I just get black boxes if I right click. You can't connect to a session using a controller either (works great in the session). So I have to have at least a mouse attached to the Pi which I don't normally.
-
With the Audio it looks like you just went with regular apt installed Qt5? Iv'e had to install and build against that Qt5.12 version to get the audio working well. (I got no choices in the Audio select menu that I added otherwise)
Although someone said it was working with default Qt on their Pi Zero. I haven't though so far but maybe I've just not got all the right Qt packages. There's so many different ones.In session there shouldn't be any menus as far as I know.
On Desktop you can use DS4 touchpad as mouse but maybe that's different in your RetroPie setup.Seems cool what you've done though! I'll have to try that out some time soon. Ive never heard about the eglfs stuff you're doing.
Re quitting, on desktop you have to quit both the session launcher (main) Gui and the session for it to fully quit. If you quit just one the other will still stay up.
We could try to add something to quit maybe but it would have to be something that have no risk of being triggered for other users on other setups. Unless you want to just fork and add it yourself.
What's that RetroPie hotkey acting as? -
@redmarsbluemoon retropie hot key does nothing. Should it? And you mention quitting the session and the application. How? There’s no visible menus, hot keys etc. I’m pretty sure something isn’t rendering but apart from windows screen grabs I have no reference.
Short of quitting the application it runs perfectly. I’m guessing the platform option I’m running is causing menu rendering issues.
-
If you look at the video I linked a few posts up you can see how it runs on Desktop for your reference.
If you post a video of how it looks when you run maybe there's something I can say? It's hard to know otherwise. I don't really have time to do a experimental RetroPie setup just now.
With the Hotkey I mean what does that signal as to RetroPie normally? maybe we can hook that up to chiaki as quit but I'm not sure.
-
@redmarsbluemoon I’ll try and grab a video later, but sure id love to help get this up and running properly within RetroPie. My build script works fine now, it’s purely setting up a button to quit and controller navigation in the interface.
-
@domb84
I suggest you make a 'Feature Request' on the head master issues page,That way it will get general visibility for the full project and there can be discussions about ways to solve things.
https://github.com/thestr4ng3r/chiaki/issues
A simple phone video showing your issues, or screen grabs with annotations would be helpful to communicate what you are looking for.
-
Chiaki recently went to v2.0 and with that added PS5 support! :D
Also the 1080p streaming should now be working!Credits to the main developer!
I have updated my repo, https://github.com/Fredrum/chiaki/wiki/Chiaki-for-the-Raspberry-Pi
currently in line with the Master which moved to,
https://git.sr.ht/~thestr4ng3r/chiakiI'll continue trying to add some options to make it more useable with retropie.
Or someone else might do a better job using the chiaki libs.Cheers!
-
It works like a charm! Sound, 60FPS 1080p, game pads.
Thanks for your rpi repo!
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.