Mapping unordered audio channels

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Mapping unordered audio channels

jpoet
Hi,

I noticed that Sebastian committed code to allow >2 channel input with decklinkaudiosrc.  I gave it a quick try, but the following pipeline does not map the channels correctly (at least for my setup):

DEVICE=0

gst-launch-1.0 \
    decklinkvideosrc device-number=${DEVICE} mode=0 ! queue ! autovideoconvert ! deinterlace mode=2 ! queue ! avenc_mpeg2video bitrate=800000 ! mpegvideoparse ! mpegtsmux name=mux ! filesink location=video.ts   decklinkaudiosrc device-number=${DEVICE} channels=8 ! audioconvert ! deinterleave name=d  interleave name=i ! audioconvert ! "audio/x-raw,channels=6" ! wavenc ! wavparse ! audioconvert ! avenc_ac3 bitrate=640000 ! queue ! ac3parse ! mux.    d.src_0 ! queue ! audioconvert ! i.sink_0    d.src_1 ! queue ! audioconvert ! i.sink_1    d.src_2 ! queue ! audioconvert ! i.sink_2    d.src_3 ! queue ! audioconvert ! i.sink_3    d.src_4 ! queue ! audioconvert ! i.sink_4    d.src_5 ! queue ! audioconvert ! i.sink_5

I tried changing it such that d.src_1 is mapped to i.sink_2,  (e.g. "d.src_1 ! queue ! audioconvert ! i.sink_2    d.src_2 ! queue ! audioconvert ! i.sink_1"), but I get:

    WARNING: erroneous pipeline: could not link audioconvert5 to i

So, what is the correct way to remap the audio channels?

Thank you,

John

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Mapping unordered audio channels

Sebastian Dröge-3
On Wed, 2017-01-04 at 23:43 +0000, John P Poet wrote:
> Hi,
>
> I noticed that Sebastian committed code to allow >2 channel input
> with decklinkaudiosrc.  I gave it a quick try, but the following
> pipeline does not map the channels correctly (at least for my setup):
> [...]

I think we'd like to have an element for that, which would have a
property that takes an array of channel positions for the input and
then accordingly reorders the channels and puts the correct channel-
mask on the output.

But for now, doing it with deinterleave and interleave should work, you
just need to make sure that interleave puts the correct channel-mask on
the output caps. It has a property for that. Or alternatively you could
put a capssetter before every input of the interleave and set a
channel-mask with a single bit for that.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (981 bytes) Download Attachment