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 ! '