ZGC
ZGC

Reputation: 114

GStreamer vorbis encoder warning (Invalid channel positions) for more than 8 channel

I have a pipeline appsrc->rawaudioparse->audioconvert->vorbisenc->oggmux->filesink. In the appsrc, i push data in buffer. data have 16 channel and are in a float array with interleaved layout (ch1, ch2, ch3,.....,ch16,ch1, ch2,....,ch16). rawaudioparse properties are:

g_object_set(G_OBJECT(parser) , "pcm-format", 28, // f32le: GST_AUDIO_FORMAT_F32LE
                                "num-channels", 16,
                                "sample-rate", 100,
                                "interleaved", TRUE,
                                 NULL);

Pipeline seems to be working well but I get a warning that worries me. This warning only appears when I set the number of channels to more than 8.

** (encoder:3785): WARNING **: 07:56:10.576: Invalid channel positions.

There's a Property called channel-positions in the rawaudioparse, but I don't know how to set it.

Does anyone know why this warning exists for more than 8 channels and how to fix it?

Upvotes: 0

Views: 414

Answers (1)

Florian Zwoch
Florian Zwoch

Reputation: 7393

Check https://gstreamer.freedesktop.org/documentation/audio/gstaudiochannels.html?gi-language=c#GstAudioChannelPosition for GstAudioChannelPosition.

Since for so many channels there is no point for positions anymore I would try adding to your g_object_set:

"channel-positions", GST_AUDIO_CHANNEL_POSITION_NONE,

I wonder why it wouldn't set that automatically though if you set the number of channels higher than 8..

If the warning persists I would double check the caps the elements agreed on. The channel-mask should be 0x0 if it is set.

Apart from that, that warning just tells you that there is a channel-position set but doesn't add up with rest of the format and probably will just be ignored (which is the same result as telling it upfront that there are no positions).

Upvotes: 0

Related Questions