Compile Chiaki and add as a custom port to RetroPie

# install dependencies
sudo apt install cmake python3-protobuf protobuf-compiler libopus-dev libsdl2-dev libssl-dev qttools5-dev libqt5svg5-dev qtmultimedia5-dev libqt5multimedia5-plugins gstreamer-qapt qt5* -y

# restore legacy audio settings for RetroPie
# https://retropie.org.uk/forum/topic/26628/audio-issues-after-latest-raspbian-updates
echo "snd_bcm2835.enable_hdmi=1 snd_bcm2835.enable_headphones=1 snd_bcm2835.enable_compat_alsa=1" >> /boot/cmdline.txt

# clone rpi branch of chiaki
cd /opt/retropie/supplementary/
git clone https://git.sr.ht/~thestr4ng3r/chiaki chiaki
cd chiaki
git submodule update --init

# build with the CLI
sed -i 's,option(CHIAKI_ENABLE_CLI "Enable CLI for Chiaki" OFF),option(CHIAKI_ENABLE_CLI "Enable CLI for Chiaki" ON),g' /opt/retropie/supplementary/chiaki/CMakeLists.txt 
mkdir build
cd build
cmake ..
make

# set permissions
chown pi:pi /opt/retropie/supplementary/chiaki -R
chmod +x /opt/retropie/supplementary/chiaki/build/gui/chiaki

# create the launch config directory
mkdir /opt/retropie/configs/ports/chiaki

# create qt5 eglfs config
cat <<EOF > /opt/retropie/configs/ports/chiaki/eglfs.json
{
  "device": "/dev/dri/card1",
  "hwcursor": false,
  "pbuffers": true,
  "outputs": [
    { "name": "HDMI1", "mode": "1280x720", "size": "1280x720", "format": "argb8888" }
  ]
}
EOF

# create the launch script
cat <<EOF > /opt/retropie/configs/ports/chiaki/chaiki.sh
#!/bin/bash
# export QT_DEBUG_PLUGINS=1
# export QT_QPA_EGLFS_DEBUG=1
# export QSG_INFO=1
# export QT_LOGGING_RULES=qt.qpa.*=true
export QT_QPA_EGLFS_ALWAYS_SET_MODE="28"
export QT_SCALE_FACTOR=2
export QT_QPA_EGLFS_KMS_CONFIG=/opt/retropie/configs/ports/chiaki/eglfs.json
/opt/retropie/supplementary/chiaki/build/gui/chiaki -platform eglfs
EOF

# create the launch config
cat <<EOF > /opt/retropie/configs/ports/chiaki/emulators.cfg
chiaki = "/opt/retropie/configs/ports/chiaki/chaiki.sh"
default = "chiaki"
EOF

# set permissions
chown pi:pi /opt/retropie/configs/ports/chiaki -R
chmod +x /opt/retropie/configs/ports/chiaki/chaiki.sh

# create the ports launch file
cat <<EOF > /home/pi/RetroPie/roms/ports/chiaki.sh
#!/bin/bash
"/opt/retropie/supplementary/runcommand/runcommand.sh" 0 _PORT_ "chiaki" ""
EOF

# set permissions
chown pi:pi /home/pi/RetroPie/roms/ports/chiaki.sh
chmod +x /home/pi/RetroPie/roms/ports/chiaki.sh

Once installed grab this Python script and run it on a Windows machine https://github.com/thestr4ng3r/chiaki/blob/master/scripts/psn-account-id.py

Get your PSN ID using the script and pair your RPi to your PS4 to enjoy streaming with the RPi!

To quit the session hold R3 plus Moon.

There’s a config file hidden in your home folder.

/home/pi/.config/Chiaki/Chiaki.conf

However, I’ve not found any settings that have an effect ie video_resolution = 1080p or video_fps = 60:

~/.config/Chiaki/Chiaki.conf