Skip to main content

Configuration Structure

CloudGaming uses a config.json file that must be present in the host application’s working directory. The configuration is divided into two main sections:
  • client - Browser client configuration for signaling and matchmaking
  • host - Host application configuration for capture, encoding, audio, input, and networking

config.json Location

The configuration file must be located in the same directory as the host executable:
DisplayCaptureProject.exe
config.json  ← must be here

Configuration Sections

Video Encoding

Frame rate, bitrate, NVENC presets, HDR tone mapping

Audio Capture

Process loopback, Opus encoding, WASAPI settings

Input Injection

Mouse/keyboard policies, DataChannels, thread priority

Screen Capture

WGC capture, copy pools, frame queuing, MMCSS

Network

Signaling servers, matchmaker, ICE/TURN setup

Basic Structure

{
  "client": {
    "serverUrlBase": "wss://signaling-server.example.com",
    "matchmakerUrl": "https://matchmaker.example.com"
  },
  "host": {
    "targetProcessName": "Game.exe",
    "signalingUrl": "wss://signaling-server.example.com",
    "matchmaker": { ... },
    "window": { ... },
    "video": { ... },
    "capture": { ... },
    "audio": { ... },
    "input": { ... },
    "debug": { ... }
  }
}

Client Configuration

The client section configures browser client connection endpoints.
client.serverUrlBase
string
required
WebSocket URL for the signaling server. Must use wss:// protocol for secure connections.Default: wss://signaling-server-production-acd4.up.railway.app
client.matchmakerUrl
string
required
HTTP(S) URL for the matchmaker service that assigns clients to available hosts.Default: https://matchmaker-production-5b36.up.railway.app

Host Configuration

Target Process

host.targetProcessName
string
required
Name of the executable to capture (e.g., SandFall-Win64-Shipping.exe).This process will be the target for screen capture and input injection.
host.signalingUrl
string
required
WebSocket URL for host-to-signaling-server connection.Default: wss://signaling-server-production-acd4.up.railway.app

Window Configuration

host.window.resizeClientArea
boolean
default:"true"
Automatically resize the target window’s client area to match target dimensions.
host.window.targetWidth
integer
default:"1920"
Target window width in pixels.
host.window.targetHeight
integer
default:"1080"
Target window height in pixels.

Debug Options

host.debug.enableWAVRecording
boolean
default:"false"
Enable raw audio capture recording to WAV file for debugging.
This will create large files and impact performance. Use only for debugging.
host.debug.wavFilename
string
default:"output.wav"
Output filename for WAV recording when enabled.

Best Practices

Start with the default configuration and adjust settings incrementally based on your specific requirements and network conditions.

Performance Tuning

  1. Low Latency Priority: Set video.bf to 0, use video.rc as cbr, enable audio.latency.strictLatencyMode
  2. High Quality Priority: Increase video.bitrateMax, use slower video.preset (p5-p7), increase audio.bitrate
  3. Network Constrained: Lower video.bitrateStart, enable adaptive bitrate controllers

Production Deployment

Always use secure WebSocket connections (wss://) and HTTPS (https://) in production deployments.
  • Use production-grade signaling servers with Redis clustering
  • Configure TURN servers for NAT traversal
  • Set appropriate hostSecret for matchmaker authentication
  • Enable MMCSS for capture and input threads
  • Test with your target applications and network conditions

Configuration Validation

The host application will validate the configuration on startup and log errors for:
  • Missing required fields
  • Invalid value ranges
  • Incompatible setting combinations
  • Missing dependencies (e.g., NVENC on non-NVIDIA GPUs)
Check the console output for configuration warnings and errors before starting a streaming session.