An experimental DSi remote game streaming homebrew application written with RubyNDS
rnds-stream-compressed.mp4
My DSi homebrew SDK RubyNDS contains support for JPEGDEC, a tiny fast JPEG decoder. Using this we can easily get MJPEG working, a format that is already used for basic video streaming.
With just the right GStreamer settings, we can pull off a playable 20 fps of relatively low-latency streaming (with frameskipping). Quality settings can easily be changed within the GStreamer helper script. Full DSi resolution does run but more so at 10 - 15 fps.
Mouse and keyboard control are done with ydotool. I'm using my simple wrapper for this Rubydotool. Ydotool requires user permissions to work which is talked about in the setup.
Your steam library and prism launcher instances are automatically scanned.
Note
This was only tested on Fedora KDE. Window parsing only works on X11/xWayland. Pure Wayland windows will not be detected. Server will run on the local network, there are zero security implementations, so it is not recommended to truly run this remotely over the internet.
-
Check whether your PC can send keyboard and mouse input:
test -w /dev/uinput && echo "Ready" || echo "Setup needed"
If it says
Ready, skip to the next step. If it saysSetup needed, run:printf '%s\n' 'KERNEL=="uinput", SUBSYSTEM=="misc", TAG+="uaccess", OPTIONS+="static_node=uinput"' | sudo tee /etc/udev/rules.d/60-rnds-stream-uinput.rules >/dev/null sudo udevadm control --reload-rules sudo reboot
-
Put
RNDS-Stream.ndson your flashcart's microSD card. Creaternds-stream.txtat the root of the same card with only your PC's local IP address, for example:192.168.1.100The ROM reads this file through
fat:/, so it needs to be on the card used by the flashcart, not the DSi's internal SD card. (this should be easy to change in the source code if you're not using a flashcart) -
Install
wmctrland GStreamer on the PC. The Flatpak uses the host tools to capture game windows. On Fedora:sudo dnf install wmctrl gstreamer1 gstreamer1-plugins-good
-
Install and run the Flatpak on the PC:
flatpak install --user RNDS-Stream.flatpak flatpak run io.github.gavff64.RNDSStream
-
Open
RNDS-Stream.ndson the DSi and choose a game.
- Server doesn't seem to recognize when the client disconnects.
- Possible fundamental 20 fps cap because of decode speed?
- Server needs to be manually restarted from the PC in order to switch games.
- Hardcoded keybinds.
- Inherent limited resolution. Text and UI is hard to see.
- Mouse needs to be locked to the window.