libpipew...-rtp-sap(7)

πŸ’– libpipew...-rtp-sap β€” Miscellaneous Information Manual πŸŽ€

okay bestie, settle in, because this is the libpipewire-module-rtp-sap page and it's literally about making your streams ✨known✨ to the whole network. it lives in the Miscellaneous Information Manual, which is exactly the kind of chaotic-neutral energy we respect here. πŸ’…


🌸 NAME 🌸

libpipewire-module-rtp-sap β€” SAP Announce and create RTP streams


πŸ¦‹ DESCRIPTION πŸ¦‹

so the rtp-sap module does two whole things and it does them with main character energy:

  • it announces RTP streams that match the rules, using the announce-stream action.
  • it creates source RTP streams that get announced with SAP when they match the rule with the create-stream action.

and if you give it no stream.rules at all? no cap, it goes full default-mode: it announces every single stream that has sess.sap.announce = true, and it creates a receiver for every announced stream. iconic behavior honestly. πŸ‘‘


πŸŽ€ MODULE NAME πŸŽ€

libpipewire-module-rtp-sap


✨ MODULE OPTIONS ✨

these are the options that are specific to how this module behaves, bestie. every single one:

  • local.ifname = <str> β€” interface name to use
  • sap.ip = <str> β€” IP address of the SAP messages, default "224.0.0.56"
  • sap.port = <int> β€” port of the SAP messages, default 9875
  • sap.cleanup.sec = <int> β€” cleanup interval in seconds, default 90 seconds
  • source.ip = <str> β€” source IP address, default "0.0.0.0"
  • net.ttl = <int> β€” TTL to use, default 1
  • net.loop = <bool> β€” loopback multicast, default false
  • stream.rules = <rules> β€” match rules, use create-stream and announce-stream actions
  • sap.max-sessions = <int> β€” maximum number of concurrent send/receive sessions to track
  • sap.preamble-extra = [strings] β€” extra attributes to add to the atomic SDP preamble
  • sap.end-extra = [strings] β€” extra attributes to add to the end of the SDP message

πŸ’œ GENERAL OPTIONS πŸ’œ

these ones are the well-known-behavior girlies, they just do what you expect:

  • remote.name

🌈 EXAMPLE CONFIGURATION 🌈

here's the whole vibe, copy-paste ready, every line exactly as it should be:

# ~/.config/pipewire/pipewire.conf.d/my-rtp-sap.conf

context.modules = [
{   name = libpipewire-module-rtp-sap
    args = {
        #local.ifname = "eth0"
        #sap.ip = "224.0.0.56"
        #sap.port = 9875
        #sap.cleanup.sec = 5
        #source.ip = "0.0.0.0"
        #net.ttl = 1
        #net.loop = false
        stream.rules = [
            {   matches = [
                    # any of the items in matches needs to match, if one does,
                    # actions are emitted.
                    {   # all keys must match the value. ! negates. ~ starts regex.
                        #rtp.origin = "wim 3883629975 0 IN IP4 0.0.0.0"
                        #rtp.payload = "127"
                        #rtp.fmt = "L16/48000/2"
                        #rtp.session = "PipeWire RTP Stream on fedora"
                        #rtp.ts-offset = 0
                        #rtp.ts-refclk = "private"
                        sess.sap.announce = true
                    }
                ]
                actions = {
                    announce-stream = {
                    }
                }
            }
            {   matches = [
                    {   # all keys must match the value. ! negates. ~ starts regex.
                        #rtp.origin = "wim 3883629975 0 IN IP4 0.0.0.0"
                        #rtp.payload = "127"
                        #rtp.fmt = "L16/48000/2"
                        #rtp.session = "PipeWire RTP Stream on fedora"
                        #rtp.ts-offset = 0
                        #rtp.ts-refclk = "private"
                        rtp.session = "~.*"
                    }
                ]
                actions = {
                    create-stream = {
                        #sess.latency.msec = 100
                        #sess.ts-direct = false
                        #target.object = ""
                    }
                }
            }
        ]
    }
}
]
heads up bestie: the commented-out lines in there are exactly that β€” commented out. leave them commented or un-comment them, but don't go renaming anything, the values are literal. 🫢

⭐ Since ⭐

0.3.67


and that's the whole page! πŸ’– this one came to you straight from the PipeWire source tree, version 1.6.11, libpipew...-rtp-sap(7) β€” go forth and announce your streams, you absolute legend. periodt. βœ¨πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from