Direct PC to PC link

Only use this if you play on WIFI.

About 10 minutes to read

Use this guide if you're running a dedicated Ethernet link directly between your two PCs — no switch or router in between — and want to use UDP streaming.

Common reasons to use this setup:

  • Your Gaming PC connects to the internet via Wi-Fi and you want UDP on a separate wired link.
  • You're using 2x USB-to-Ethernet adapters to create a dedicated UDP link, separate from your main network.
  • You've added dedicated PCIe Ethernet cards in one or both PCs specifically for the UDP connection.

Is this the right guide? If both PCs are plugged into the same router or network switch, use the UDP Network Switch guide instead. This guide is for any setup where you have a dedicated point-to-point Ethernet connection between the two PCs that is separate from your regular network.

UDP vs NDI: Both are network-based capture methods. NDI is generally easier to set up. UDP gives you more control over bitrate and compression but requires more manual configuration. If you're not sure which to use, try NDI first.


#Why This Setup Exists

The goal is to keep UDP streaming traffic on its own dedicated link, completely isolated from your game/internet traffic. This matters in a few scenarios:

  • Gaming PC on Wi-Fi: If UDP shares the Wi-Fi link with your game, both suffer. A direct Ethernet cable gives UDP its own path.
  • USB-to-Ethernet adapters: If your PCs don't have spare Ethernet ports (or you want to keep your main Ethernet ports on your regular network), a pair of USB-to-Ethernet adapters creates a cheap dedicated link.
  • Dedicated PCIe NICs: Same idea, just using internal cards instead of USB adapters. Maximum throughput and lowest latency for the dedicated link.

In all cases, UDP travels over the dedicated cable and your game traffic stays on your main network connection. The two never touch each other.

The catch: Windows doesn't automatically know which traffic should go where. If you skip the binding and IP isolation steps below, UDP traffic can route over your main network connection instead of the dedicated link — causing game ping spikes and streaming failures. This is the single most common issue with this setup.


#Prerequisites

Before starting:

  • You have a way to connect the two PCs directly — either a standard Ethernet cable between built-in ports, two USB-to-Ethernet adapters, or dedicated PCIe NICs.
  • Windows is fully updated on both PCs.
  • System clocks are synced on both PCs: Settings → Time & Language → Date & Time → Sync now.

#Step 1: Install OBS (Gaming PC Only)

Download and install OBS Studio on the Gaming PC.

No additional plugins needed. Unlike NDI, UDP streaming uses OBS's built-in FFmpeg output. You don't need DistroAV or NDI Runtime.


#Step 2: Set Up the Direct Ethernet Connection

#Connect the Hardware

Plug an Ethernet cable directly between the Gaming PC and the Script PC. This can be through:

  • Built-in Ethernet ports (if you have a spare port not used for your main network)
  • USB-to-Ethernet adapters — one on each PC, connected by a standard Ethernet cable
  • Dedicated PCIe Ethernet cards — installed in one or both PCs

Any of these work. The key is that this link is separate from your main network connection.

#Assign Static IP Addresses

Since there's no router handing out IP addresses, you need to set them manually on both PCs.

On both PCs:

  1. Go to Network and Sharing Center → Change adapter settings (or search "Network connections" in Start).
  2. Right-click the adapter you're using for the direct link (this could be labeled "Ethernet", "Ethernet 2", or your USB/PCIe adapter name) and select Properties.
  3. Click Internet Protocol Version 4 (TCP/IPv4) → Properties.
  4. Select Use the following IP address and configure:
Gaming PCScript PC
IP address192.168.2.10192.168.2.11
Subnet mask255.255.255.0255.255.255.0
Default gateway(leave blank)(leave blank)
  1. Click OK to save.

Critical — Use a different subnet than your main network. If your main network (Wi-Fi or wired router) uses 192.168.1.x, your dedicated link must be on a different range like 192.168.2.x or 192.168.0.x. If both are on the same range, Windows can't tell which adapter to send UDP traffic through and will often choose the wrong one — causing game lag and streaming failures. Run ipconfig in Command Prompt to check your main network IP, then pick a different third octet for the dedicated link.

#Verify Connectivity

Open Command Prompt on the Script PC and ping the Gaming PC:

ping 192.168.2.10

You should get replies. If not, check your cable and IP settings.


#Step 3: Configure OBS (Gaming PC)

#Video Settings

Navigate to Settings → Video and set:

  • Base (Canvas) Resolution and Output (Scaled) Resolution to the same value:
    • 800x600 — lowest bandwidth, works for most games
    • 1024x768 — good middle ground
    • 1280x720 — highest fidelity of the three
  • FPS: Set to Fractional FPS, at least 80/1. Ideal is 240/1.

Your in-game resolution doesn't affect this. OBS captures and scales independently.

#Advanced Settings

Navigate to Settings → Advanced:

  • Color Format: NV12

This is the step most people miss, and it's the reason UDP traffic ends up on your main network instead of the dedicated cable.

The UDP stream goes wherever its URL points. In the recording output below, the URL uses the Script PC's link IP (192.168.2.11), and with the link on its own subnet (Step 2) Windows sends it over the cable. OBS's Bind to IP setting does not affect this output, so leave it on Default.

If the link shares a subnet with your home network, the stream can go out over the main adapter. This causes your game ping to spike and the stream to stutter or fail entirely.

#Recording Output (This Is Your UDP Stream)

UDP streaming uses OBS's Recording output, not the regular streaming feature. You'll click "Start Recording" to begin the UDP stream — this is not intuitive but it's how it works.

Navigate to Settings → Output → Recording and configure:

  1. At the top, change Output Mode to Advanced.

  2. Set Type to Custom Output (FFmpeg).

  3. Set FFmpeg Output Type to Output to URL.

  4. Set File path or URL to:

    udp://192.168.2.11:1234

    Use your Script PC's static IP and any port number you choose.

    The port can be any number (e.g., 1234, 2341, 5000). Just remember it — you'll need the same port on the Script PC side.

  5. Set Container Format to mpjpeg.

  6. Set Video Bitrate — start with 50000 Kbps and adjust from there:

    • Lower (10000–30000 Kbps) = more compression, less bandwidth, more image artifacts
    • Medium (30000–80000 Kbps) = good balance for most setups
    • Higher (80000–150000 Kbps) = cleaner image, but more bandwidth and potentially more lag
    • On a dedicated point-to-point link you have the full bandwidth to yourself, so you can push higher than on a shared network — but start moderate and increase if the stream looks too compressed.
  7. Set Keyframe interval to 0.

  8. Set Video Encoder to mjpeg (MJPEG - Motion JPEG) — this should be the default encoder.

#Game Capture Source

  1. In the Sources panel, click + and select Game Capture.
  2. Set Mode to Capture Specific Window and select your game (must be open).
  3. Select the Game Capture source in Sources, then press Ctrl + D to center it.

#Disable Preview and Start the Stream

  1. Right-click on the OBS preview area and select the option to disable the preview to reduce GPU usage.
  2. Click "Start Recording" to begin the UDP stream.

Yes, it says "Recording." OBS doesn't have a separate UDP stream button. The recording output is configured to send to a UDP URL instead of a file, so "Start Recording" is what starts the stream. You must click this every time you want to begin streaming to the Script PC.


#Step 4: Create Firewall Rules

Since this is a direct connection, you want firewall rules that specifically allow OBS/UDP traffic over the dedicated link only.

#On the Gaming PC — Allow OBS Outbound

  1. Press Win + R, type wf.msc, press Enter (opens Windows Defender Firewall with Advanced Security).
  2. In the left pane, click Outbound Rules.
  3. In the right pane, click New Rule.
  4. Select Program → Next.
  5. Browse to OBS: C:\Program Files\obs-studio\bin\64bit\obs64.exe → Next.
  6. Select Allow the connection → Next.
  7. Check Private and Public, uncheck Domain → Next.
  8. Name it OBS UDP over Ethernet → Finish.

Then bind it to the dedicated link interface:

  1. Right-click the rule you just created → Properties.
  2. Go to the Advanced tab.
  3. Under Interface types, click Customize.
  4. Select Only for local area network (LAN) and uncheck Remote Access and Wireless.
  5. Click OK.

#On the Script PC — Allow the Application Inbound

Create an Inbound Rule for the application exe. Make sure both Private and Public are checked.

Keep the firewall on and whitelist. Don't just disable it — users have confirmed that disabling the firewall entirely sometimes causes more problems than proper rules.


#Step 5: Configure the Application (Script PC)

  1. Set Capture Mode to UDP in the capture tab.
  2. Enter the same port number you configured in OBS (e.g., 1234).
  3. Load a community config — don't use the default config. Make sure it's set to UDP mode.
  4. Press Start.

If the capture isn't working, make sure you clicked "Start Recording" in OBS on the Gaming PC first.


#Troubleshooting

#Stream not connecting / no capture

1. Did you click "Start Recording" in OBS? The UDP stream doesn't start until you click this button. Check the bottom of OBS — it should show a recording timer if the stream is active.

2. Verify the stream goes to the link IP. In OBS's recording output, File path or URL must use the Script PC's dedicated link IP (e.g., udp://192.168.2.11:1234), not its main network IP. OBS's Bind to IP setting does not affect this output.

3. Verify IP ranges are isolated. Run ipconfig on the Gaming PC. Your main network adapter and your dedicated link adapter should be on different subnets. If both show 192.168.1.x, change your dedicated link static IPs to 192.168.2.x as described above.

4. Check the port. Make sure the port in your OBS URL matches the port configured in the application's capture settings. A mismatched port means the stream goes nowhere.

5. Firewall whitelisting. Make sure obs64.exe is whitelisted on the Gaming PC and the application exe is whitelisted on the Script PC — both for Private and Public networks.

6. Sync clocks on both PCs. Settings → Time & Language → Date & Time → Sync now.

7. Windows updates. Make sure both PCs are fully updated.

8. Install .NET Runtime. Download from https://dotnet.microsoft.com/en-us/download, install, restart.

#Game ping spikes while streaming

This means UDP traffic is routing over your main network connection instead of the dedicated link. The fix:

  1. Bind OBS to the dedicated link IP (Step 3 above).
  2. Isolate IP ranges — your main network and the dedicated link must be on different subnets.
  3. Verify with ping 192.168.2.11 from the Gaming PC — if it responds, the dedicated link is working.

#Lag, stuttering, or frame drops

Lower the bitrate. Start at 30000–50000 Kbps and work up. On a dedicated link you have more headroom than a shared network, but the Script PC still needs to decode the stream fast enough.

#Script PC has no internet

The Script PC doesn't need internet access for UDP to work — it only needs the dedicated link to the Gaming PC. If it needs internet for downloads/updates, temporarily connect it to your router or Wi-Fi, then switch back.

Network sharing (sharing your Gaming PC's internet to the Script PC through the dedicated link) is an untested configuration. If you're using Internet Connection Sharing, be aware it can interfere with UDP routing and static IP assignments. Disable ICS if you're having issues.

#Full restart procedure

  1. Close OBS and the application on both PCs.
  2. Shut down both PCs completely.
  3. Start the Gaming PC first. Open OBS, verify settings, verify the output URL uses the Script PC's link IP, click "Start Recording."
  4. Start the Script PC. Launch the application, set capture to UDP with the correct port, press Start.

#Quick Reference

SettingLocationValue
Gaming PC dedicated link IPNetwork adapter settings192.168.2.10
Script PC dedicated link IPNetwork adapter settings192.168.2.11
Subnet maskNetwork adapter settings255.255.255.0
OBS ResolutionSettings → Video800x600, 1024x768, or 1280x720
OBS FPSSettings → Video80/1 to 240/1 (fractional)
Color FormatSettings → AdvancedNV12
Output ModeSettings → Output → RecordingAdvanced
TypeSettings → Output → RecordingCustom Output (FFmpeg)
FFmpeg Output TypeSettings → Output → RecordingOutput to URL
File path or URLSettings → Output → Recordingudp://192.168.2.11:1234
Container FormatSettings → Output → Recordingmpjpeg
Video BitrateSettings → Output → Recording50000 Kbps (adjust as needed)
Keyframe intervalSettings → Output → Recording0
Video EncoderSettings → Output → Recordingmjpeg (MJPEG)
Start streamOBS main windowClick "Start Recording"
FirewallGaming PCobs64.exe — LAN interface only

Stuck on a step? Ask in the Moonlight Discord and a staff member will help.