Add sender system audio loopback

This commit is contained in:
Meta Vens 2026-05-18 11:52:20 +01:00
commit 58135e21ba
5 changed files with 33 additions and 9 deletions

View file

@ -11,6 +11,8 @@
- Neighbor sender deployment under `C:\Meta\LocalCastBridge`.
- Madman's desktop start/stop launchers for the sender.
- Receiver OBS scene has `Neighbor PC - Video` and `Neighbor PC - Focusrite` Media Sources.
- Voicemeeter loopback installed on the sender.
- Receiver OBS scene has `Neighbor PC - System Audio` on SRT port `5102`.
## Temporary
@ -25,7 +27,7 @@
2. Start the sender from Madman's desktop.
3. Smoke-test the video endpoint in OBS.
4. Smoke-test the Focusrite endpoint in OBS.
5. Choose and validate a real system-output loopback device if desktop/game audio is required separately.
5. Smoke-test the system-loopback endpoint in OBS.
6. Tune SRT latency and FFmpeg buffering for the local network.
7. Decide whether a small OBS scene/source generator is worth adding.
8. Reconsider plugin/fork only if standard OBS Media Source cannot preserve the required behavior.

View file

@ -18,6 +18,8 @@
- FFmpeg reports:
- `srt` input/output protocol
- `h264_nvenc` encoder
- Voicemeeter installed through winget as `VB-Audio.Voicemeeter`.
- SoundVolumeView installed through winget as `NirSoft.SoundVolumeView`.
## Sender Config
@ -32,6 +34,7 @@ Current endpoints:
```text
video: srt://192.168.1.66:5100?mode=caller&latency=120000
focusrite srt://192.168.1.66:5101?mode=caller&latency=120000
system srt://192.168.1.66:5102?mode=caller&latency=120000
```
OBS on the receiver should add listener-mode Media Sources:
@ -39,6 +42,7 @@ OBS on the receiver should add listener-mode Media Sources:
```text
video: srt://0.0.0.0:5100?mode=listener&latency=120000&timeout=5000000
focusrite srt://0.0.0.0:5101?mode=listener&latency=120000&timeout=5000000
system srt://0.0.0.0:5102?mode=listener&latency=120000&timeout=5000000
```
As of `2026-05-18`, the receiver OBS scene collection at
@ -48,6 +52,7 @@ the current scene:
```text
Neighbor PC - Video
Neighbor PC - Focusrite
Neighbor PC - System Audio
```
The pre-edit backup is next to the scene file with a
@ -67,24 +72,39 @@ Start launcher:
- runs `scripts\sender-start.ps1`
- uses `config\localcast.json`
- passes the winget FFmpeg alias path explicitly
- starts Voicemeeter
- sets Windows default render to `Voicemeeter VAIO3 Input`
- sets Windows default capture to `Voicemeeter Out B3`
Stop launcher:
- runs `scripts\sender-stop.ps1`
- stops FFmpeg processes whose command line contains `srt://`
- restores Windows default render to `Focusrite USB Audio\Device\Speakers\Render`
- closes `voicemeeter_x64.exe`
## Audio Reality
FFmpeg DirectShow discovery currently exposes one audio input:
FFmpeg DirectShow discovery originally exposed one hardware audio input:
```text
Analogue 1 + 2 (Focusrite USB Audio)
```
This is a real audio source, but it is not the same thing as system-output loopback. The installed FFmpeg build exposes `dshow` and `gdigrab`, not `wasapi`, so capturing game/desktop output as its own source still needs a virtual or hardware loopback device such as a mixer/interface loopback, Stereo Mix if available, VB-Cable, or Voicemeeter.
After Voicemeeter install, FFmpeg exposes virtual loopback inputs including:
Do not pretend desktop audio exists until a real capture device appears in:
```text
Voicemeeter Out B3 (VB-Audio Voicemeeter VAIO)
```
LocalCastBridge uses that device as `system-loopback`.
Do not rename the loopback in config unless the replacement appears in:
```powershell
ffmpeg -hide_banner -f dshow -list_devices true -i dummy
```
If Madman cannot hear local audio while LocalCast is running, open Voicemeeter
and set hardware output `A1` to the intended physical device, probably
Focusrite speakers/headphones. The stream capture itself is independent of OBS.

View file

@ -25,13 +25,14 @@ Get-Content .\state\evidence.jsonl -Tail 8
- The repo contains scripts and docs, not a native OBS plugin.
- Neighbor sender is deployed at `C:\Meta\LocalCastBridge` on `192.168.1.84`.
- Madman's desktop has `Start LocalCast Sender.cmd` and `Stop LocalCast Sender.cmd`.
- Receiver OBS scene collection has `Neighbor PC - Video` and `Neighbor PC - Focusrite` Media Sources added.
- Receiver OBS scene collection has `Neighbor PC - Video`, `Neighbor PC - Focusrite`, and `Neighbor PC - System Audio` Media Sources added.
- Sender has Voicemeeter plus SoundVolumeView installed for system-output loopback.
## Current Pressure
The useful next work is real hardware validation:
- open OBS and smoke-test the two configured receiver sources
- open OBS and smoke-test the three configured receiver sources
- tune latency once streams are live in OBS
- add a real loopback/virtual audio capture source if system-output audio is required

View file

@ -3,3 +3,4 @@
{"ts": "2026-05-18T09:55:45+00:00", "type": "verification", "status": "ok", "note": "State helper and sender dry-run produce valid repo status and SRT URLs with explicit ports for the example config."}
{"ts": "2026-05-18T10:24:49+00:00", "type": "deployment", "status": "ok", "note": "Neighbor sender 192.168.1.84 has LocalCastBridge under C:\\Meta\\LocalCastBridge, FFmpeg 8.1.1 with SRT/h264_nvenc, and desktop start/stop launchers targeting receiver 192.168.1.66 ports 5100/5101."}
{"ts": "2026-05-18T10:27:41+00:00", "type": "deployment", "status": "ok", "note": "Receiver OBS Untitled scene now has Neighbor PC - Video and Neighbor PC - Focusrite ffmpeg_source Media Sources listening on SRT ports 5100 and 5101; original scene JSON was backed up before edit."}
{"ts": "2026-05-18T10:52:05+00:00", "type": "deployment", "status": "ok", "note": "Installed Voicemeeter and SoundVolumeView on sender, added system-loopback using DirectShow device Voicemeeter Out B3 on SRT port 5102, and added matching OBS source Neighbor PC - System Audio."}

View file

@ -48,8 +48,8 @@ current_status:
summary: >
First repo scaffold is in place and deployed to the neighbor sender at
C:\Meta\LocalCastBridge. FFmpeg 8.1.1 with SRT and h264_nvenc is installed
there, Madman's desktop has start/stop launchers, and the receiver OBS
scene has matching Media Sources.
there, Voicemeeter supplies system-output loopback, Madman's desktop has
start/stop launchers, and the receiver OBS scene has matching Media Sources.
next_action: >
Open OBS, start the sender launcher from Madman's desktop, and smoke-test
video plus Focusrite audio.
video, Focusrite audio, and system audio.