After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 631449 - [audioparse] doest not support several channel numbers
[audioparse] doest not support several channel numbers
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 0.10.21
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-10-05 16:22 UTC by Julien Isorce
Modified: 2010-11-01 17:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
2 raw audio channels then 6 (997.97 KB, application/x-gzip)
2010-10-05 16:22 UTC, Julien Isorce
Details

Description Julien Isorce 2010-10-05 16:22:52 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 ?)
Comment 1 Sebastian Dröge (slomo) 2010-10-07 08:23:38 UTC
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?
Comment 2 Sebastian Dröge (slomo) 2010-10-07 08:37:09 UTC
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
Comment 3 Julien Isorce 2010-10-07 14:29:27 UTC
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 ?
Comment 4 Tim-Philipp Müller 2010-10-07 14:57:45 UTC
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?)
Comment 5 Julien Isorce 2010-10-07 15:37:57 UTC
(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
Comment 6 Julien Isorce 2010-10-18 09:52:49 UTC
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.