Project Overview

A few years ago I bought a Raspberry Pi and was wondering exactly what to do with it. Reading through some articles online, I saw a project about how someone had rigged theirs up to control a Super Nintendo. I adapted the schematics to work with a regular Nintendo and thought it was interesting to be able to play games in such a manner, with the RPi was acting as the gamepad. Naturally, the next question was if it would be possible to have the RPi control the NES over the Internet with acceptable latency.

As it turns out, the control latency is rather decent, but streaming the video in real-time is the tricky part. Most video capture cards will tend to buffer the video and this creates an unacceptable lag between what you see and what is actually happening. These are okay for streaming to YouTube because most viewers can tolerate a few seconds of delay. But if you are trying to play the game remotely then the video must be very close to real-time. The only capture cards that can do this reliably are those that plug into a PCI slot on the PC.

One such card in particular is the Micomsoft SC-512N1-L/DVI capture card:

With the above capture card, I now had the hardware necessary to stream the video. Now all I had to do was figure out the appropriate software to make everything work together:

First, I had to figure out what kind of software would stream video with as little latency as possible. With a bit of reading I found out that Skype would actually do this fairly well because with most teleconferencing you want to see people's reactions in real-time as you talk. Consequently the first version of the project used Skype by having the Host PC accept incoming calls and would then choose the capture card as the webcam device. Later I found out that WebRTC offers very low latency video streaming, provided that you can code it up properly. So I ultimately went down this route in version 2 and it is what is currently in use.

One small problem I ran into was actually the audio portion. With WebRTC, one has to specify which device is the webcam and which device is the microphone. Natually, it would be best to choose the video capture card (SC-512) as both the webcam and the microphone because it is providing both the video and audio from the Nintendo. Unfortunately, WebRTC only allows you to choose the capture card for the webcam, not for the microphone. So as a work-around, I loaded up Obs Studio and had it connect to an Elgato capture card (so as not to tie up the video from the SC-512). But rather than use the audio from the Elgato, I selected the option to use other device for audio, and selected the SC-512. And by playing audio from the application (Obs Studio) to the desktop, I could then select Windows Stereo Mix as the microphone source in WebRTC. So now I finally had the ability to stream the output of the capture card into WebRTC, both video and audio.

Satisfied with the progress, I then sought to improve on the Host PC by selecting parts that would have low energy usage. After some research I found that the Intel i3-7100T offers a Thermal Design Power (TDP) rating of 35 watts, which is quite low compared to most CPUs with 90 watts being fairly typical. Furthermore, it also comes with integrated graphics (HD Graphics 630), so I could eliminate the graphics card and reduce energy usage even more. I then paired this CPU with an ASRock Z270 motherboard and the upgraded Host PC now consumes no more energy than a single 60 watt light bulb.

As the battery backup unit indicates, at most 63 watts are used, and this is from not just the Host PC but also the cable modem, router, Nintendo, and Raspberry Pi.