GStreamer 1.24.9
I am having issues with using the mix-matrix property of audioconvert to upmix / downmix audio streams with different unpositioned channel counts.
When setting no explicit unpositioned channel-mask for the output format the pipeline can be started:
gst-launch-1.0 -v audiotestsrc ! ^ audio/x-raw, rate=48000, channels=4, channel-mask=(bitmask)0x0 ! ^ audioconvert mix-matrix="<<(float)1.0,(float)0.0,(float)0.0,(float)0.0>, <(float)0.0,(float)0.0,(float)0.0,(float)0.0>, <(float)0.0,(float)0.0,(float)0.0,(float)0.0>>" ! ^ audio/x-raw,channels=3 ! ^ fakesink
But when setting the channel-mask explicitly to “unpositioned” an error occurs:
gst-launch-1.0 -v audiotestsrc ! ^ audio/x-raw, rate=48000, channels=4, channel-mask=(bitmask)0x0 ! ^ audioconvert mix-matrix="<<(float)1.0,(float)0.0,(float)0.0,(float)0.0>, <(float)0.0,(float)0.0,(float)0.0,(float)0.0>, <(float)0.0,(float)0.0,(float)0.0,(float)0.0>>" ! ^ audio/x-raw,channels=3, channel-mask=(bitmask)0x0 ! ^ fakesink
Error:
basetransform gstbasetransform.c:1373:gst_base_transform_setcaps:<audioconvert0> transform could not transform audio/x-raw, format=(string)S16LE, layout=(string)interleaved, rate=(int)48000, channels=(int)4, channel-mask=(bitmask)0x0000000000000000 in anything we support
My expectation is that the audioconvert element transforms the stream correctly without error when an appropriate mix-matrix is configured even if channels are unpositioned.