From b95b54d54de1eb927e3bc9317f1a2b841e4bd857 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 8 Jun 2026 22:52:44 +0100 Subject: [PATCH] Fix Muninn Raven audio activation --- docs/muninn.md | 11 +++++++++++ scripts/activate-muninn-raven-av-srt.ps1 | 11 +++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/docs/muninn.md b/docs/muninn.md index f7454b0..2f65c8b 100644 --- a/docs/muninn.md +++ b/docs/muninn.md @@ -49,3 +49,14 @@ Activation is explicit: That Raven activation starts the requested screen and Realtek loopback stream and publishes `muninn.capture_stream.v1`. Mimir and OBS are stream consumers; they do not own Muninn. + +The deployed loopback helper must accept Muninn's command contract: + +```powershell +wasapi-loopback-capture.ps1 -Output stdout -Device Realtek -SampleRate 48000 -Channels 2 +``` + +`stdout` is an alias for binary standard output, and `Device` is the requested +render-device hint. Current helper builds may ignore the hint and use the +default render endpoint, but they must accept the argument so Muninn's generated +mux command remains executable. diff --git a/scripts/activate-muninn-raven-av-srt.ps1 b/scripts/activate-muninn-raven-av-srt.ps1 index 484e6dd..fd9f5d7 100644 --- a/scripts/activate-muninn-raven-av-srt.ps1 +++ b/scripts/activate-muninn-raven-av-srt.ps1 @@ -9,7 +9,8 @@ param( [int] $Port = 5200, [string] $ObsTargetHost = "10.77.0.2", [int] $ObsPort = 5204, - [string] $AudioDevice = "Realtek" + [string] $AudioDevice = "Realtek", + [switch] $NoObsTarget ) $ErrorActionPreference = "Stop" @@ -29,10 +30,16 @@ Get-CimInstance Win32_Process | ForEach-Object { taskkill.exe /PID `$_.ProcessId /T /F | Out-Null } `$muninnDir = Split-Path -Parent "$MuninnExe" `$launcher = Join-Path `$muninnDir "activate-raven-av-srt.cmd" +`$obsArgs = "" +if (-not [bool]::Parse("$($NoObsTarget.IsPresent)") -and -not ("$TargetHost" -eq "$ObsTargetHost" -and $Port -eq $ObsPort)) { + `$obsArgs = " --obs-target-host ""$ObsTargetHost"" --obs-port $ObsPort" +} else { + `$obsArgs = " --no-obs-target" +} `$lines = @( "@echo off", "cd /d ""`$muninnDir""", - """$MuninnExe"" activate --store ""$StorePath"" --host raven --stream muninn.raven.av.srt --target-host ""$TargetHost"" --port $Port --obs-target-host ""$ObsTargetHost"" --obs-port $ObsPort --audio-device ""$AudioDevice"" --ffmpeg ""$Ffmpeg"" --loopback-script ""$LoopbackScript"" --log-root ""$LogRoot"" 1>>""$LogRoot\muninn-activate.out.log"" 2>>""$LogRoot\muninn-activate.err.log""" + """$MuninnExe"" activate --store ""$StorePath"" --host raven --stream muninn.raven.av.srt --target-host ""$TargetHost"" --port $Port`$obsArgs --audio-device ""$AudioDevice"" --ffmpeg ""$Ffmpeg"" --loopback-script ""$LoopbackScript"" --log-root ""$LogRoot"" 1>>""$LogRoot\muninn-activate.out.log"" 2>>""$LogRoot\muninn-activate.err.log""" ) Set-Content -LiteralPath `$launcher -Value `$lines -Encoding ASCII cmd /c "schtasks /Delete /TN GameCult-Muninn-Activate /F 2>NUL"