SwatterCo
VR Streamer

Turn your mobile phone into a virtual reality headset with VR Streamer


VR Streamer streams PC games to your phone and provides head tracking data back to the game on your PC.

What you need to get started:

  • VR Streamer phone app and VR Streamer server app.
  • A PC running Windows. The more powerful, the better.
  • A recent mobile phone running Android 4.0 or later.
  • VR head mount like Google Cardboard or one of the many other versions available.

How it works:

  • Start the server app on your PC.
  • Connect the server app to the phone app via wifi or USB cable.
  • Load a game on your PC and it will be streamed to your phone.

VR Streamer Apps

VR Streamer
https://play.google.com/store/apps/details?id=com.swatterco.vrstreamer

VR Streamer Demo
https://play.google.com/store/apps/details?id=com.swatterco.vrstreamerdemo

Connection

VR Streamer supports TCP (Wifi), USB Tethering and USB Debugging connections.

TCP

  • In the server app, select TCP for Connection Mode and the PC's main IP address from the IP Address drop-down.
  • In the phone app, enter Settings and select TCP for Connection Mode and enter the PC's IP address in the IP Address field.
  • Then click Start in both the server and phone apps.

USB Tethering

  • In the phones Android Settings menu, turn on USB tethering and connect your phone to your PC via a USB cable.
  • In the server app, select USB Tethering for Connection Mode and then select the USB tethering IP address from the IP Address drop-down.
  • The IP address should be something similar to 192.168.42.*.
  • In the phone app, enter Settings and select USB Tethering for Connection Mode, then enter the USB tethering IP address in the IP Address field.
  • Then click Start in both the server and phone apps.

NOTE: When in USB Tethering mode the PC may use your phones mobile data when accessing the internet. To avoid this, you may want to disable mobile data in the Android Settings menu.

USB Debugging

USB Debugging can be used to connect your phone to your PC via USB without having to use USB Tethering.

  • In the phones Android Settings menu, enable USB debugging. The USB debugging option is usually located under Developer options in Settings. After enabling USB debugging, you may be prompted to allow USB debugging when you next connect your device to your PC. If so, select OK. On some newer Android devices, the Developer options menu might be hidden by default. If so, search for instructions on how to enable it for your phone.
  • In the server app, select USB Debugging for Connection Mode.
  • In the phone app, enter Settings and select USB Debugging for Connection Mode.
  • Then click Start in both the server and phone apps.

Ports

VR Streamer Server uses the following ports:

TCP: 48682

USB Tethering: 48682

USB Debugging: 48692

Firewall

For TCP connections, the VR Streamer Server app will need to given access to communicate through the Windows Firewall.

In Allow programs to communicate through Windows Firewall, select vrstreamer.exe and also select Home/Work (Private) check box.

See this guide for help.

Display Options

Once you have established a connection from your PC to your phone, start a game on your PC and set it to run in windowed mode.

Depending on the hardware capabilities of your PC and phone, you should aim to run the game at a minimum of 30 FPS for a good VR experience.

Display Quality

The Display Quality control is used to increase or decrease the quality of the images sent from the PC to the phone. If you are experiencing low frame rates you may need to decrease the image quality until the frame rate reaches an acceptable level.

FPS Limit

Use the FPS Limit control to limit the image frames per second processed by your PC. This is useful if your PC is processing game data too quickly for your phone to display it.

Capture Mode

Application: The game images are captured at the application level. The usually results in a higher capture frame rate, but may not work for some games.

Desktop: The game images are captured at the desktop level. Depending on the PC desktop size, this may result in a slower capture rate, but will work for same games that can't be captured at application level.

Desktop Window Manager

For Windows 7 PCs, you may need to disable Desktop Window Manager to enable some games to be captured.

Crop Display

The server app will automatically remove the windows border from the game before displaying it in the phone. Use the Crop Display controls if you need to crop more of the display.

Phone Display Settings

If the game does not natively support VR, you can force stereoscopic mode by selecting it in the phone apps Setting menu. While in the game mode you can toggle stereoscopic mode by tapping the top left hand corner of the display.

In the Settings menu, you will also find options for padding the images displayed by the phone. This useful if you have a large phone and cannot see all of the display area when wearing the head mount unit.

Head Tracking

VR Streamer processes head tracking data from your phone to provide mouse, FreeTrack protocol and FreePIE application support.

Tracking Mode

To enable head tracking select the tracking mode required in the Head Tracking section of the server app.

Mouse - DirectInput Mode

This mode uses Microsoft DirectInput to simulate mouse movement in the game. The server app will move the mouse relative to its last position based on the head tracking data.

Mouse - Absolute Mode

The head tracking data received by the server app is processed and the mouse cursor moved to an absolute position in the game. If the game supports it, you should use this mode over DirectInput mode.

FreeTrack

When this method is selected the server app will supply head tracking data to the game using the FreeTrack protocol.

FreePIE

Via FreePIE, head tracking data provided by the server app can be used to emulate Keyboards, Joysticks, TrackIR and many more hardware input devices.

For more information see the FreePIE section below.

Center Head Tracking

In the phone app, you can center the head tracking by tapping the bottom left hand corner of the display. You can set a center head tracking keyboard or joystick command in the Command section of the server app.

Axis Sensitivity

Use the Axis Sensitivity controls to adjust the sensitivity of the Yaw, Pitch and Roll sensors and invert them if required.

Additional Info

Status Bar

When the server app has established a connection with the phone app, the following info is displayed in the server app status bar:

  1. Images displayed by phone app in frames per second.
  2. Dimensions of images sent to phone.
  3. Size of images sent to phone in bytes.
  4. The image capture rate in frames per second.

Commands

The Commands section of the server app, lets you set keyboard keys and joystick buttons to center head tracking and toggle on/off the passthrough camera.

When setting keys for a command, you can use a combination of keys if required.

Phone App

While in the game screen:

  • Toggle stereoscopic mode by tapping the top left hand corner of the display.
  • Center head tracking by tapping the bottom left hand corner of the display.
  • Click the back button on your phone or long press the screen to exit back to the main screen.

Download Server

Please make sure the android app you are using is v1.2. If it isn't please update the app from the play store.

Version 1.2.1

Click here to download VR Streamer v1.2.1


To download VR Streamer , complete the following:


Microsoft .NET Framework 4

VR Streamer Server requires the .NET Framework 4 to be installed on your computer. Click here to download it if it's not already installed.

Troubleshooting

Black Screen

  • Make sure game is in windowed mode and window has focus.
  • Check image size in status bar is below 350,000 bytes.
  • Set Capture Mode to Desktop.
  • Set Desktop Window Manager to disabled.

Low Capture FPS

  • Reduce size of game window.
  • Set Capture Mode to Application.

Low Display FPS

  • Reduce display quality.
  • Reduce size of game window.
  • Connect phone via USB Tethering.

Keeps Dropping Connection

  • Reduce display quality.
  • Check image size in status bar is not going over 350,000 bytes.
  • Connect phone via USB Tethering.

Game Setup Walkthrough

This section details step by step instructions to set up the game Live for Speed to work with VR Streamer.

Download and install the demo version of Live for Speed from https://www.lfs.net/.

Start the game and then enter the Options Section.

In the Screen section, select 1024 x 768 (32 bit) and then press Shift + F4 to force the game into windowed mode.

In the Controls section, set up the keys / joystick mapping so you can drive the car.

In the Graphics section, set all the settings as high as possible depending on your computers hardware.

In the View section, select ms XY for Look function (near the bottom) and then select 3D at the top of the screen.

A small dialog box is displayed. Make sure Display type is TV / monitor / projector and 3D output is side by side (half) and click Ok.

Then click Ok to return to the main game menu.

Resize the games window to remove any black bars at the top and bottom of the game screen using your mouse.

In the server app, select Mouse - Absolute Mode for Tracking Mode in the Head Tracking section.

Start the server and phone apps and then click on the Live for Speed window to give it focus.

The game should now be displayed on your phone.

Adjust the Display Quality setting in the Display section of server app if you are not getting around 30 FPS.

To start driving select Single Player and then click Go. You should be able to control the view by moving your phone. Tap the bottom left of the phones screen to center the view.

FreePIE

FreePIE (Programmable Input Emulator) is a application for bridging and emulating input devices. It's available from http://andersmalmgren.github.io/FreePIE/.

Via FreePIE, head tracking data provided by the server app can be used to emulate Keyboards, Joysticks, TrackIR and many more hardware input devices.

Test Script

To use FreePIE start the FreePIE application on your PC.

In the VR Streamer server app, select FreePIE for Tracking Mode in the Head Tracking section, then start the server and phone apps.

Paste the following script into FreePIE and then select Run script from the Script menu.

You should see the yaw, pitch and roll values in the Watch section near the bottom of the FreePIE application.

def update():
   diagnostics.watch(freePieIO[0].yaw)
   diagnostics.watch(freePieIO[0].pitch)
   diagnostics.watch(freePieIO[0].roll)

if starting:
   freePieIO[0].update += update

TrackIR Script

The following script is used to emulate TrackIR.

global yaw
global pitch
global roll

if starting:
   yaw = 0
   pitch = 0
   roll = 0
   
if not (freePieIO[0].yaw == 0):
   yaw = math.degrees(freePieIO[0].yaw)
   pitch = math.degrees(freePieIO[0].pitch)
   roll = math.degrees(freePieIO[0].roll)

trackIR.yaw = yaw
trackIR.pitch = pitch
trackIR.roll = roll