1libpipewire-module-combiMnies-csetlrleaanme(o7u)s InformlaitbipoinpeMwainruea-lmodule-combine-stream(7)
2
3
4

NAME

6       libpipewire-module-combine-stream - Combine Stream
7

DESCRIPTION

9       The combine stream can make:
10
11       • a new virtual sink that forwards audio to other sinks
12
13       • a new virtual source that combines audio from other sources
14
15       The sources and sink that need to be combined can be selected using
16       generic match rules. This makes it possible to combine static nodes or
17       nodes based on certain properties.
18

MODULE NAME

20       libpipewire-module-combine-stream
21

MODULE OPTIONS

23       • node.name: a unique name for the stream
24
25       • node.description: a human readable name for the stream
26
27       • combine.mode = capture | playback | sink | source, default sink
28
29       • combine.latency-compensate: use delay buffers to match stream
30         latencies
31
32       • combine.on-demand-streams: use metadata to create streams on demand
33
34       • combine.props = {}: properties to be passed to the sink/source
35
36       • stream.props = {}: properties to be passed to the streams
37
38       • stream.rules = {}: rules for matching streams, use create-stream
39         actions
40

GENERAL OPTIONS

42       Options with well-known behavior.
43
44remote.name
45
46audio.channels
47
48audio.position
49
50media.name
51
52node.latency
53
54node.name
55
56node.description
57
58node.group
59
60node.virtual
61
62media.class
63

STREAM OPTIONS

65       • audio.position: Set the stream channel map. By default this is the
66         same channel map as the combine stream.
67
68       • combine.audio.position: map the combine audio positions to the stream
69         positions. combine input channels are mapped one-by-one to stream
70         output channels.
71

EXAMPLE CONFIGURATION

73       context.modules = [
74       {   name = libpipewire-module-combine-stream
75           args = {
76               combine.mode = sink
77               node.name = "combine_sink"
78               node.description = "My Combine Sink"
79               combine.latency-compensate = false
80               combine.props = {
81                   audio.position = [ FL FR ]
82               }
83               stream.props = {
84               }
85               stream.rules = [
86                   {
87                       matches = [
88                           # any of the items in matches needs to match, if one does,
89                           # actions are emited.
90                           {
91                               # all keys must match the value. ! negates. ~ starts regex.
92                               #node.name = "~alsa_input.*"
93                               media.class = "Audio/Sink"
94                           }
95                       ]
96                       actions = {
97                           create-stream = {
98                               #combine.audio.position = [ FL FR ]
99                               #audio.position = [ FL FR ]
100                           }
101                       }
102                   }
103               ]
104           }
105       }
106       ]
107
108       Below is an example configuration that makes a 5.1 virtual audio sink
109       from 3 separate stereo sinks.
110
111       context.modules = [
112       {   name = libpipewire-module-combine-stream
113           args = {
114               combine.mode = sink
115               node.name = "combine_sink_5_1"
116               node.description = "My 5.1 Combine Sink"
117               combine.latency-compensate = false
118               combine.props = {
119                   audio.position = [ FL FR FC LFE SL SR ]
120               }
121               stream.props = {
122                       stream.dont-remix = true      # link matching channels without remixing
123               }
124               stream.rules = [
125                   {   matches = [
126                           {   media.class = "Audio/Sink"
127                               node.name = "alsa_output.usb-Topping_E30-00.analog-stereo"
128                           } ]
129                       actions = { create-stream = {
130                               combine.audio.position = [ FL FR ]
131                               audio.position = [ FL FR ]
132                       } } }
133                   {   matches = [
134                           {   media.class = "Audio/Sink"
135                               node.name = "alsa_output.usb-BEHRINGER_UMC404HD_192k-00.pro-output-0"
136                           } ]
137                       actions = { create-stream = {
138                               combine.audio.position = [ FC LFE ]
139                               audio.position = [ AUX0 AUX1 ]
140                       } } }
141                   {   matches = [
142                           {   media.class = "Audio/Sink"
143                               node.name = "alsa_output.pci-0000_00_1b.0.analog-stereo"
144                           } ]
145                       actions = { create-stream = {
146                               combine.audio.position = [ SL SR ]
147                               audio.position = [ FL FR ]
148                       } } }
149               ]
150           }
151       }
152       ]
153
154       Below is an example configuration that makes a 4.0 virtual audio source
155       from 2 separate stereo sources.
156
157       context.modules = [
158       {   name = libpipewire-module-combine-stream
159           args = {
160               combine.mode = source
161               node.name = "combine_source_4_0"
162               node.description = "My 4.0 Combine Source"
163               combine.props = {
164                   audio.position = [ FL FR SL SR ]
165               }
166               stream.props = {
167                       stream.dont-remix = true
168               }
169               stream.rules = [
170                   {   matches = [
171                           {   media.class = "Audio/Source"
172                               node.name = "alsa_input.usb-046d_HD_Pro_Webcam_C920_09D53E1F-02.analog-stereo"
173                           } ]
174                       actions = { create-stream = {
175                               audio.position = [ FL FR ]
176                               combine.audio.position = [ FL FR ]
177                       } } }
178                   {   matches = [
179                           {   media.class = "Audio/Source"
180                               node.name = "alsa_input.usb-046d_0821_9534DE90-00.analog-stereo"
181                           } ]
182                       actions = { create-stream = {
183                               audio.position = [ FL FR ]
184                               combine.audio.position = [ SL SR ]
185                       } } }
186               ]
187           }
188       }
189       ]
190
191PipeWire                             1.0.0libpipewire-module-combine-stream(7)
Impressum