You are not logged in.

#1 2022-11-18 14:32:24

Strangiato
Member
Registered: 2020-01-10
Posts: 239

[solved] RTP streaming plays through local and remote speakers at once

Hi

I'm using RTP modules of pipwewire to stream audio from my laptop to the speakers connected to my desktop computer over LAN.

I added the following lines to the context.modules section of the /etc/pipewire/pipewire.conf file from my laptop:

{   name = libpipewire-module-rtp-sink
     args = {
         #sap.ip = "224.0.0.56"
         #sap.port = 9875
         source.ip = "192.168.0.60"
         #destination.ip = "192.168.0.50"
         #destination.port = 46000
         #local.ifname = "eth0"
         #net.mtu = 1280
         #net.ttl = 1
         #net.loop = false
         sess.name = "PipeWire RTP stream"
         #audio.format = "S16BE"
         #audio.rate = 48000
         #audio.channels = 2
         #audio.position = [ FL FR ]
         stream.props = {
             node.name = "rtp-sink"
         }
     }
}
{   name = libpipewire-module-loopback
    args = {
        audio.position = [ FL FR ]
        capture.props = {
            media.class = Audio/Sink
            node.name = "rtp-sink"
            node.description = "RTP"
        }
    }
}

This creates an output called "RTP" in the sound menu of Gnome.

And I added these lines to the /etc/pipewire/pipewire.conf of the desktop computer:

 {   name = libpipewire-module-rtp-source
      args = {
          #sap.ip = 224.0.0.56
          #sap.port = 9875
          #local.ifname = eth0
          sess.latency.msec = 100
          stream.props = {
             node.name = "rtp-source"
             #media.class = "Audio/Source"
          }
      }
  }

The streaming works. The problem is that the audio plays through both local and remote speakers at the same time and I want to play only through the desktop speakers after selecting "RTP"
output in the laptop. How can I do it:? Thanks for reading.

Last edited by Strangiato (2022-11-18 15:44:52)

Offline

#2 2022-11-18 14:50:51

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 17,734

Re: [solved] RTP streaming plays through local and remote speakers at once

Remove the loopback node?

Offline

#3 2022-11-18 15:15:58

Strangiato
Member
Registered: 2020-01-10
Posts: 239

Re: [solved] RTP streaming plays through local and remote speakers at once

V1del wrote:

Remove the loopback node?

Removing it will also remove "RTP" from the audio menu. I need to create an output in the sound menu of Gnome that only streams audio to the desktop speakers.

Offline

#4 2022-11-18 15:18:55

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 17,734

Re: [solved] RTP streaming plays through local and remote speakers at once

It shouldn't set a node.description for the rtp-sink in that case, and or check whether it's just a case of "lol gnome" and they simply hide the RDP sink because it's virtual/not having a description by checking with e.g.

pactl list sinks

instead.

Offline

#5 2022-11-18 15:31:09

Strangiato
Member
Registered: 2020-01-10
Posts: 239

Re: [solved] RTP streaming plays through local and remote speakers at once

Removing node.description results in an output called "loopback-2611-31" that also gives simultaneous outputs.

Offline

#6 2022-11-18 15:37:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 17,734

Re: [solved] RTP streaming plays through local and remote speakers at once

Yes which is totally expected. You do not want a loopback, you want the rtp sink to simply show up. Move the block of

 media.class = Audio/Sink
            node.name = "rtp-sink"
            node.description = "RTP"

to the stream.props of the rtp sink module. And double check with pavucontrol or anything that is not gnome whether you can see the RTP sink on it's own.

Last edited by V1del (2022-11-18 15:38:04)

Offline

#7 2022-11-18 15:42:48

Strangiato
Member
Registered: 2020-01-10
Posts: 239

Re: [solved] RTP streaming plays through local and remote speakers at once

V1del wrote:

Yes which is totally expected. You do not want a loopback, you want the rtp sink to simply show up. Move the block of

 media.class = Audio/Sink
            node.name = "rtp-sink"
            node.description = "RTP"

to the stream.props of the rtp sink module. And double check with pavucontrol or anything that is not gnome whether you can see the RTP sink on it's own.

So easy. lol
Thank you V1del.

Offline

Board footer

Powered by FluxBB