From dfc85a4c6f893afeb0622e3f03af67b6f81e7ea2 Mon Sep 17 00:00:00 2001 From: jenz Date: Fri, 3 Jul 2026 12:41:53 +0100 Subject: [PATCH] had missed this piprewire target-object fix for audio to work --- streaming-agent/gst_agent.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/streaming-agent/gst_agent.py b/streaming-agent/gst_agent.py index 1075328..c9b0627 100755 --- a/streaming-agent/gst_agent.py +++ b/streaming-agent/gst_agent.py @@ -145,10 +145,13 @@ class CSSStreamAgent: f'webrtcbin. ' # Game audio: pipewiresrc → Opus - # pipewiresrc is the native PipeWire GStreamer source (Ubuntu 24+/26). - # It connects to the default audio output monitor via PipeWire directly, - # avoiding the PulseAudio compatibility layer entirely. - f'pipewiresrc ! ' + # target-object=game_output pins capture to the game audio sink. + # Without this, pipewiresrc defaults to the system capture device + # (virtual_mic / microphone) instead of the game audio monitor. + # stream.capture.sink=true tells PipeWire to use game_output's + # monitor ports rather than treating it as a regular source node. + f'pipewiresrc target-object=game_output ' + f'stream-properties="props,stream.capture.sink=(boolean)true" ! ' f'audio/x-raw,format=F32LE,rate=48000,channels=2 ! ' f'audioconvert ! ' f'opusenc ! '