GNOME Bugzilla – Bug 631449
[audioparse] doest not support several channel numbers
Last modified: 2010-11-01 17:48:15 UTC
Created attachment 171779 [details] 2 raw audio channels then 6 Hi, audioparse element does not work if the incomming buffers have different number of channels (and channel layout) " WARNING **: Failed to retrieve channel layout from caps. This usually means there is a GStreamer element that does not implement multichannel audio correctly. Please file a bug. " I join a raw audio file that contains 2 channels then 6. You can play it using: A: gst-launch-0.10 filesrc location=audio.raw ! audioparse rate=48000 channels=2 ! alsasink B: gst-launch-0.10 filesrc location=audio.raw ! audioparse rate=48000 channels=6 ! audioconvert ! alsasink In case A, you can only hear the buffers that are channels 2. In case B, you can only hear the buffers that are channels 6. Other question: Is there a gstreamer muxer that saves buffers and their caps ? (and a caps demuxer ?) And this way if would be possible to avoid setting fixed properties as required in the audioparse element ?)
First of all audioparse should get a property to set the channel layout. That will then fix your warning. I don't understand what you're trying to do though. You stored raw samples in a file, first part is with 2 channels and the second part with 6 channels? And what are you trying to do then and how?
commit 77c05b5419eea010b3126a0681d03ff12cd6ccb3 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Thu Oct 7 10:34:48 2010 +0200 audioparse: Add support for setting the channel-positions This allows you to set the channel positions by using the channel-positions property (note that you can't use gst-launch to fill them, you have to write code). If the channel positions are not given and more than 2 channels are used a channel layout with NONE positions is assumed. So the warning should be gone in any case. But that doesn't seem to be the problem you have
Hi, thx for adding support for setting the channel-positions. I would like to encode an audio stream that has the particularity to be able to dynamically change its number of audio channels. As I am not able to find an encoder (and associated decoder) that works properly (see bug #631501), then I would like to record the raw audio stream in order to be able to debug the encoders/decoders in offline (because my audio source is live). I am able to record the raw stream (see attached audio.raw file): I just put the flow in a file directly. But then I am not able to use the result file, because audioparse does not support dynamic change of the number of audio channels. Any suggestions ?
I'm not sure this makes sense with raw audio tbh. You will need to put that into a container or some sort of wrapper that supports changing the number of channels on the fly (mpeg-* maybe?)
(In reply to comment #4) > I'm not sure this makes sense with raw audio tbh. right > You will need to put that into a container or some sort of wrapper that > supports changing the number of channels on the fly (mpeg-* maybe?) Which one exactly ? I have tested matroskamux/demux, see bug #631618
Now faac outputformat=1 and faad are working for my needs (see bug #631501) , I am going to put aac directly in a file and read it with aacparse. So it's now possible to report bugs for other audio encoders that are supposed to handle "dynamically switch from 2 audio channels to 6". Since the reported problem has been fixed in comment 2, I set this bug to RESOLVED/FIXED.