wenxin-wang / PulseDroidRtp

Receive and play PulseAudio RTP stream on Android
48 stars 2 forks source link

Instructions for pipewire #15

Open lelgenio opened 1 year ago

lelgenio commented 1 year ago

Using instructions from the reference manual, I was able to get this working under pipewire version 3.60 using the following configurations:

# .config/pipewire/pipewire.conf.d/99-rtp-sink.conf
context.modules = [
{   
    name = libpipewire-module-rtp-sink
    args = {
        node.description = "Phone rtp receiver"

        destination.ip = "192.168.0.100"
        destination.port = 4010
        net.mtu = 320
        audio.rate = 48000
        audio.channels = 2
        stream.props = {
         node.name = "rtp-sink"
        }
    }
}
]

I'm sure there's some other configuration that needs to be done for the phone to appear as a normal output for pulseaudio, perhaps using a loopback node?

atmouse- commented 1 year ago

A working conf from my end.

pc with ip 192.168.21.1 stream output audio to android phone (ip:192.168.21.22) with App PulseDroidRtp

pipewire.conf.d/50-rtp-sender.conf

context.modules = [
{   name = libpipewire-module-rtp-sink
     args = {
         local.ifname = "wlan0"
         source.ip = "192.168.21.1"
         destination.ip = "192.168.21.22"
         destination.port = 4600
         net.mtu = 1280
         #net.ttl = 1
         #net.loop = false
         sess.min-ptime = 2
         sess.max-ptime = 2000
         sess.name = "PipeWire RTP stream"
         #sess.media = "audio"
         #audio.format = "S16BE"
         #audio.rate = 48000
         #audio.channels = 2
         #audio.position = [ FL FR ]
         stream.props = {
             node.name = "rtp-sink"
             media.class = Audio/Sink
             node.description = "RTP"
         }
     }
}

PulseDroidRtp UI:

IP: 224.0.0.56
Port: 4600
MTU: 1280
Max Latency(ms): 2000
Channel Count: 2
Channel Mask: 0

wpctl set-default audio sink to the RTP sink id