chore: shift all ports by +40000 to avoid defaults

8080->48080, 8889->48889, 8888->48888, 9997->49997, 8189->48189

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-05 20:52:50 -04:00
parent b217cbbc0f
commit c23e8799fe
5 changed files with 40 additions and 40 deletions
+6 -6
View File
@@ -16,7 +16,7 @@ writeQueueSize: 512
############################################################################### ###############################################################################
api: yes api: yes
apiAddress: 127.0.0.1:9997 apiAddress: 127.0.0.1:49997
############################################################################### ###############################################################################
# WebRTC (WHIP ingest + WHEP playback) # WebRTC (WHIP ingest + WHEP playback)
@@ -25,10 +25,10 @@ apiAddress: 127.0.0.1:9997
webrtc: yes webrtc: yes
# HTTP listener for WHIP/WHEP signaling (SDP exchange). # HTTP listener for WHIP/WHEP signaling (SDP exchange).
# NPM proxies /whep/* and the OBS WHIP target (localhost) to this. # NPM proxies /whep/* and the OBS WHIP target (localhost) to this.
webrtcAddress: :8889 webrtcAddress: :48889
webrtcEncryption: no # TLS is handled at NPM; this listener is LAN/localhost only webrtcEncryption: no # TLS is handled at NPM; this listener is LAN/localhost only
# Dedicated UDP port for SRTP media. NPM Stream forwards public UDP 8189 here. # Dedicated UDP port for SRTP media. NPM Stream forwards public UDP 48189 here.
webrtcLocalUDPAddress: :8189 webrtcLocalUDPAddress: :48189
# No TCP fallback - we only want a single UDP path for simplicity. # No TCP fallback - we only want a single UDP path for simplicity.
webrtcLocalTCPAddress: '' webrtcLocalTCPAddress: ''
# Tell browsers to send media to the public hostname. # Tell browsers to send media to the public hostname.
@@ -48,7 +48,7 @@ webrtcTrackGatherTimeout: 2s
############################################################################### ###############################################################################
hls: yes hls: yes
hlsAddress: :8888 hlsAddress: :48888
hlsEncryption: no hlsEncryption: no
hlsAlwaysRemux: no hlsAlwaysRemux: no
hlsVariant: lowLatency hlsVariant: lowLatency
@@ -77,7 +77,7 @@ pathDefaults:
paths: paths:
# The single stream path. OBS publishes here via WHIP # The single stream path. OBS publishes here via WHIP
# (http://localhost:8889/game/whip), friends watch via WHEP # (http://localhost:48889/game/whip), friends watch via WHEP
# (https://stream.hetherman.cloud/whep/game/whep). # (https://stream.hetherman.cloud/whep/game/whep).
game: game:
source: publisher source: publisher
+12 -12
View File
@@ -4,7 +4,7 @@ Configures NPM to:
1. Serve `https://stream.hetherman.cloud` with TLS + Authentik forward auth, 1. Serve `https://stream.hetherman.cloud` with TLS + Authentik forward auth,
reverse-proxying HTTP traffic to the Windows gaming PC. reverse-proxying HTTP traffic to the Windows gaming PC.
2. Forward public UDP 8189 (WebRTC media) to the gaming PC via an NPM 2. Forward public UDP 48189 (WebRTC media) to the gaming PC via an NPM
**Stream** (L4 UDP proxy). **Stream** (L4 UDP proxy).
Replace `<PC-LAN-IP>` with the LAN IP of the Windows gaming PC Replace `<PC-LAN-IP>` with the LAN IP of the Windows gaming PC
@@ -22,9 +22,9 @@ Make sure your router forwards these to NPM (not to the PC directly):
| Proto | External port | Internal target | | Proto | External port | Internal target |
|-------|--------------|-------------------| |-------|--------------|-------------------|
| TCP | 443 | NPM host, 443 | | TCP | 443 | NPM host, 443 |
| UDP | 8189 | NPM host, 8189 | | UDP | 48189 | NPM host, 48189 |
(TCP 443 is probably already forwarded for your other services; UDP 8189 is (TCP 443 is probably already forwarded for your other services; UDP 48189 is
the new one for this app.) the new one for this app.)
## 3. NPM Proxy Host (HTTP) ## 3. NPM Proxy Host (HTTP)
@@ -38,7 +38,7 @@ In NPM, **Hosts -> Proxy Hosts -> Add Proxy Host**.
| Domain Names | `stream.hetherman.cloud` | | Domain Names | `stream.hetherman.cloud` |
| Scheme | `http` | | Scheme | `http` |
| Forward Hostname | `<PC-LAN-IP>` | | Forward Hostname | `<PC-LAN-IP>` |
| Forward Port | `8080` | | Forward Port | `48080` |
| Cache Assets | off | | Cache Assets | off |
| Block Common Exploits | on | | Block Common Exploits | on |
| Websockets Support | **on** (WebRTC signaling works without this, but it costs nothing) | | Websockets Support | **on** (WebRTC signaling works without this, but it costs nothing) |
@@ -49,9 +49,9 @@ forward-auth gating).
| Location | Scheme | Forward Hostname | Forward Port | | Location | Scheme | Forward Hostname | Forward Port |
|----------|--------|------------------|--------------| |----------|--------|------------------|--------------|
| `/whep` | `http` | `<PC-LAN-IP>` | `8889` | | `/whep` | `http` | `<PC-LAN-IP>` | `48889` |
| `/hls` | `http` | `<PC-LAN-IP>` | `8888` | | `/hls` | `http` | `<PC-LAN-IP>` | `48888` |
| `/v3` | `http` | `<PC-LAN-IP>` | `9997` | | `/v3` | `http` | `<PC-LAN-IP>` | `49997` |
**SSL tab:** **SSL tab:**
@@ -72,13 +72,13 @@ In NPM, **Hosts -> Streams -> Add Stream**.
| Field | Value | | Field | Value |
|-------------------|---------------| |-------------------|---------------|
| Incoming Port | `8189` | | Incoming Port | `48189` |
| Forward Host | `<PC-LAN-IP>` | | Forward Host | `<PC-LAN-IP>` |
| Forward Port | `8189` | | Forward Port | `48189` |
| TCP | **off** | | TCP | **off** |
| UDP | **on** | | UDP | **on** |
Save. NPM (nginx `stream` module) now forwards public UDP 8189 to MediaMTX Save. NPM (nginx `stream` module) now forwards public UDP 48189 to MediaMTX
on the gaming PC. This is the path WebRTC media takes after ICE negotiation. on the gaming PC. This is the path WebRTC media takes after ICE negotiation.
## 5. Verify ## 5. Verify
@@ -95,7 +95,7 @@ on the gaming PC. This is the path WebRTC media takes after ICE negotiation.
`/hls/game/index.m3u8`, and `/v3/paths/get/game` all return 200 (and not `/hls/game/index.m3u8`, and `/v3/paths/get/game` all return 200 (and not
401/302). 401/302).
4. **UDP stream:** with OBS streaming, tail the NPM container logs - you 4. **UDP stream:** with OBS streaming, tail the NPM container logs - you
should see entries from the stream module for UDP connections on 8189. should see entries from the stream module for UDP connections on 48189.
Alternatively, from the NPM host run Alternatively, from the NPM host run
`tcpdump -n -i any udp port 8189` and confirm packets flow while a `tcpdump -n -i any udp port 48189` and confirm packets flow while a
viewer is connected. viewer is connected.
+13 -13
View File
@@ -8,7 +8,7 @@ Prerequisites:
- OBS Studio 30.0 or newer (WHIP output is built in from 30.x onward). - OBS Studio 30.0 or newer (WHIP output is built in from 30.x onward).
- You already ran `.\scripts\install.ps1` in an elevated PowerShell, so - You already ran `.\scripts\install.ps1` in an elevated PowerShell, so
`bin\mediamtx.exe` exists and the `GameStream-UDP-8189` firewall rule is `bin\mediamtx.exe` exists and the `GameStream-UDP-48189` firewall rule is
registered (in the disabled state). registered (in the disabled state).
## 1. Load the OBS script ## 1. Load the OBS script
@@ -22,10 +22,10 @@ Prerequisites:
| MediaMTX binary | `<repo>\bin\mediamtx.exe` | | MediaMTX binary | `<repo>\bin\mediamtx.exe` |
| MediaMTX config | `<repo>\config\mediamtx.yml` | | MediaMTX config | `<repo>\config\mediamtx.yml` |
| Frontend directory | `<repo>\frontend` | | Frontend directory | `<repo>\frontend` |
| Frontend HTTP port | `8080` (default) | | Frontend HTTP port | `48080` (default) |
| Firewall rule name | `GameStream-UDP-8189` (must match the rule created by install.ps1) | | Firewall rule name | `GameStream-UDP-48189` (must match the rule created by install.ps1) |
| Public URL | `https://stream.hetherman.cloud` | | Public URL | `https://stream.hetherman.cloud` |
| MediaMTX API URL | `http://127.0.0.1:9997` | | MediaMTX API URL | `http://127.0.0.1:49997` |
4. Check the **Script Log** at the bottom - you should see 4. Check the **Script Log** at the bottom - you should see
`[game_stream] game_stream.py loaded`. `[game_stream] game_stream.py loaded`.
@@ -79,7 +79,7 @@ generous headroom. Push to 12000-15000 Kbps if you want higher quality.
|----------|-----------------------------------------------| |----------|-----------------------------------------------|
| Service | Custom | | Service | Custom |
| Protocol | **WHIP** | | Protocol | **WHIP** |
| Server | `http://localhost:8889/game/whip` | | Server | `http://localhost:48889/game/whip` |
| Bearer Token | (leave blank) | | Bearer Token | (leave blank) |
Save. Save.
@@ -88,9 +88,9 @@ Save.
1. Click **Start Streaming**. 1. Click **Start Streaming**.
2. Check the OBS Script Log - you should see: 2. Check the OBS Script Log - you should see:
- `Firewall rule 'GameStream-UDP-8189' ENABLED` - `Firewall rule 'GameStream-UDP-48189' ENABLED`
- `MediaMTX started (pid=...)` - `MediaMTX started (pid=...)`
- `Frontend HTTP server listening on 0.0.0.0:8080` - `Frontend HTTP server listening on 0.0.0.0:48080`
- `Viewers can watch at: https://stream.hetherman.cloud` - `Viewers can watch at: https://stream.hetherman.cloud`
3. Open `https://stream.hetherman.cloud` from another device, log in with 3. Open `https://stream.hetherman.cloud` from another device, log in with
Authentik, and verify video plays. Authentik, and verify video plays.
@@ -101,12 +101,12 @@ Click **Stop Streaming** in OBS. The script will:
- Stop the MediaMTX subprocess - Stop the MediaMTX subprocess
- Stop the frontend HTTP server - Stop the frontend HTTP server
- Disable the firewall rule (`GameStream-UDP-8189` -> disabled) - Disable the firewall rule (`GameStream-UDP-48189` -> disabled)
Verify the firewall state from PowerShell: Verify the firewall state from PowerShell:
```powershell ```powershell
Get-NetFirewallRule -DisplayName "GameStream-UDP-8189" | Select-Object Enabled Get-NetFirewallRule -DisplayName "GameStream-UDP-48189" | Select-Object Enabled
``` ```
Should report `False` while not streaming, `True` while streaming. Should report `False` while not streaming, `True` while streaming.
@@ -116,17 +116,17 @@ Should report `False` while not streaming, `True` while streaming.
- **"MediaMTX binary not found"** in the script log: the path in the script - **"MediaMTX binary not found"** in the script log: the path in the script
properties panel is wrong. Re-select it with the file picker. properties panel is wrong. Re-select it with the file picker.
- **OBS cannot connect to WHIP**: MediaMTX did not start. Check the script - **OBS cannot connect to WHIP**: MediaMTX did not start. Check the script
log for the actual reason; most commonly a port conflict on 8889 or 8189 log for the actual reason; most commonly a port conflict on 48889 or 48189
(another process is already using them). (another process is already using them).
- **Viewers see "Stream offline"** even after you click Start Streaming: - **Viewers see "Stream offline"** even after you click Start Streaming:
- Check that the MediaMTX API returns `ready: true`: - Check that the MediaMTX API returns `ready: true`:
`curl http://localhost:9997/v3/paths/get/game` `curl http://localhost:49997/v3/paths/get/game`
- Check OBS's own streaming indicator - if it's red, OBS is not actually - Check OBS's own streaming indicator - if it's red, OBS is not actually
sending to WHIP. Verify the URL and that the custom service / WHIP sending to WHIP. Verify the URL and that the custom service / WHIP
protocol is selected. protocol is selected.
- **Viewers connect but playback freezes after a few seconds:** the UDP port - **Viewers connect but playback freezes after a few seconds:** the UDP port
path is broken. Verify the firewall rule is enabled (`Get-NetFirewallRule`), path is broken. Verify the firewall rule is enabled (`Get-NetFirewallRule`),
the router port-forward to NPM for UDP 8189 is correct, and the NPM Stream the router port-forward to NPM for UDP 48189 is correct, and the NPM Stream
entry points at `<PC-LAN-IP>:8189`. entry points at `<PC-LAN-IP>:48189`.
- **Autoplay is blocked / no audio:** browsers start the video muted so - **Autoplay is blocked / no audio:** browsers start the video muted so
autoplay works. There is a "Click to unmute" button in the status bar. autoplay works. There is a "Click to unmute" button in the status bar.
+6 -6
View File
@@ -47,10 +47,10 @@ CONFIG = {
"mediamtx_binary": "", "mediamtx_binary": "",
"mediamtx_config": "", "mediamtx_config": "",
"frontend_dir": "", "frontend_dir": "",
"http_port": 8080, "http_port": 48080,
"firewall_rule_name": "GameStream-UDP-8189", "firewall_rule_name": "GameStream-UDP-48189",
"public_url": "https://stream.hetherman.cloud", "public_url": "https://stream.hetherman.cloud",
"api_url": "http://127.0.0.1:9997", "api_url": "http://127.0.0.1:49997",
} }
@@ -401,15 +401,15 @@ def script_defaults(settings):
obs.obs_data_set_default_string(settings, "mediamtx_binary", "") obs.obs_data_set_default_string(settings, "mediamtx_binary", "")
obs.obs_data_set_default_string(settings, "mediamtx_config", "") obs.obs_data_set_default_string(settings, "mediamtx_config", "")
obs.obs_data_set_default_string(settings, "frontend_dir", "") obs.obs_data_set_default_string(settings, "frontend_dir", "")
obs.obs_data_set_default_int(settings, "http_port", 8080) obs.obs_data_set_default_int(settings, "http_port", 48080)
obs.obs_data_set_default_string( obs.obs_data_set_default_string(
settings, "firewall_rule_name", "GameStream-UDP-8189", settings, "firewall_rule_name", "GameStream-UDP-48189",
) )
obs.obs_data_set_default_string( obs.obs_data_set_default_string(
settings, "public_url", "https://stream.hetherman.cloud", settings, "public_url", "https://stream.hetherman.cloud",
) )
obs.obs_data_set_default_string( obs.obs_data_set_default_string(
settings, "api_url", "http://127.0.0.1:9997", settings, "api_url", "http://127.0.0.1:49997",
) )
+3 -3
View File
@@ -19,8 +19,8 @@
[CmdletBinding()] [CmdletBinding()]
param( param(
[string]$FirewallRuleName = "GameStream-UDP-8189", [string]$FirewallRuleName = "GameStream-UDP-48189",
[int]$UdpPort = 8189 [int]$UdpPort = 48189
) )
$ErrorActionPreference = 'Stop' $ErrorActionPreference = 'Stop'
@@ -110,6 +110,6 @@ Write-Host " Frontend dir : $(Join-Path $projectRoot 'frontend')"
Write-Host " 3. Configure OBS Stream output:" Write-Host " 3. Configure OBS Stream output:"
Write-Host " Service : Custom" Write-Host " Service : Custom"
Write-Host " Protocol : WHIP" Write-Host " Protocol : WHIP"
Write-Host " Server : http://localhost:8889/game/whip" Write-Host " Server : http://localhost:48889/game/whip"
Write-Host " 4. See docs/ for NPM + Authentik setup on your reverse proxy host." Write-Host " 4. See docs/ for NPM + Authentik setup on your reverse proxy host."
Write-Host "" Write-Host ""