# Audio deinterleave plugin: support non-interleaved input sink?

**URL:** <https://discourse.gstreamer.org/t/audio-deinterleave-plugin-support-non-interleaved-input-sink/1226>\
**Category:** Plugin and library development\
**Created:** [March 21, 2024, 5:38pm UTC](https://discourse.gstreamer.org/t/audio-deinterleave-plugin-support-non-interleaved-input-sink/1226 "2024-03-21T17:38:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arthur-devialet](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/arthur-devialet/32/453_2.png) [@arthur-devialet](https://discourse.gstreamer.org/u/arthur-devialet)\
**Post date:** [March 21, 2024, 5:38pm UTC](https://discourse.gstreamer.org/t/audio-deinterleave-plugin-support-non-interleaved-input-sink/1226/1 "2024-03-21T17:38:29Z")

</div>

Hello

I would need to convert one multi-channel `non-interleaved` stream, into several pads.

The `deinterleave` plugin does something similar,

- from: one `sink` with `interleaved` multichannel audio
- to: as many `src_%u` as input channels
- ref: [deinterleave](https://gstreamer.freedesktop.org/documentation/interleave/deinterleave.html?gi-language=c#pad-templates)

But while the output `src_%u` can be interleaved or `non-interleaved`, the sink can only be `interleaved`.

Is there a reason for that?  
Or it would make sense to update the plugin to also support `non-interleaved` input?

Asking because it would be exactly my need, and something I could try to implement directly in the plugin, if the authors think it makes sense.

Alternatively, do you know another existing plugin that would do that ?

Cheers,  
Arthur

---

<div class="post-metadata">

**Author:** ![tpm](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@tpm](https://discourse.gstreamer.org/u/tpm)\
**Post date:** [March 23, 2024, 8:22pm UTC](https://discourse.gstreamer.org/t/audio-deinterleave-plugin-support-non-interleaved-input-sink/1226/2 "2024-03-23T20:22:17Z")

</div>

Hello Arthur,

Adding support for `layout=non-interleaved` input to the `deinterleave` element makes perfect sense, and might have performance advantages as well, since each channel / output buffer would be a subregion of the input buffer.

On the output side there’s no difference between `layout=non-interleaved` and `layout=interleaved` of course anyway, since it’s always one channel (signalling aside).

Feel free to propose a MR in gitlab to add this functionality.

The reason it doesn’t support non-interleaved input yet is likely just that the `deinterleave` element predates the addition of the non-interleaved layout, and no one has gotten around to adding support for it yet.
