PipeWire  0.3.79
PipeWire Module: SAP Announce and create RTP streams

source.ip and source.port and format parameters matches that of the sender.

The rtp-sap module announces RTP streams that match the rules with the announce-stream action.

It will create source RTP streams that are announced with SAP when they match the rule with the create-stream action.

If no stream.rules are given, it will announce all streams with sess.sap.announce = true and it will create a receiver for all announced streams.

Module Options

Options specific to the behavior of this module

  • 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

General options

Options with well-known behavior:

Example configuration

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 emited.
{ # 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 = ""
}
}
}
]
}
}
]
Since
0.3.67

source.ip and source.port and format parameters matches that of the sender.

Module Options

Options specific to the behavior of this module

  • local.ifname = <str>: interface name to use
  • source.ip = <str>: the source ip address, default 224.0.0.56
  • source.port = <int>: the source port
  • node.always-process = <bool>: true to receive even when not running
  • sess.latency.msec = <str>: target network latency in milliseconds, default 100
  • sess.ignore-ssrc = <bool>: ignore SSRC, default false
  • sess.media = <string>: the media type audio|midi|opus, default audio
  • stream.props = {}: properties to be passed to the stream

General options

Options with well-known behavior:

Example configuration

context.modules = [
{ name = libpipewire-module-rtp-source
args = {
#local.ifname = eth0
#source.ip = 224.0.0.56
#source.port = 0
sess.latency.msec = 100
#sess.ignore-ssrc = false
#node.always-process = false
#sess.media = "audio"
#audio.format = "S16BE"
#audio.rate = 48000
#audio.channels = 2
#audio.position = [ FL FR ]
stream.props = {
#media.class = "Audio/Source"
node.name = "rtp-source"
}
}
}
]
Since
0.3.60