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 547258 - Failed to retrieve channel layout from caps.
Failed to retrieve channel layout from caps.
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: dont know
0.10.18
Other Linux
: Normal normal
: 0.10.11
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-08-11 09:00 UTC by Achim Frase
Modified: 2008-08-20 17:17 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Achim Frase 2008-08-11 09:00:08 UTC
If I try to record 5.1 sound that is coming from my pulseaudio monitor device gstreamer cannot get the right channel layout.

This is my gstreamer pipeline and output.

$ gst-launch pulsesrc device=alsa_output.pci_8086_284b_sound_card_0_alsa_playback_0.monitor ! queue ! audio/x-raw-float,rate=44100,channels=6 ! audioconvert ! vorbisenc quality=0.5 ! oggmux ! filesink location=outtest.ogg

** (gst-launch-0.10:7938): 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.
Leitung ist aktiv und brauch nicht gestartet werden ...
Setze Pipeline zum Abspielen...
New clock: GstAudioSrcClock

** (gst-launch-0.10:7938): 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.

** (gst-launch-0.10:7938): 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.
Caught interrupt -- handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 3946947245 ns.
Pausiere Leitung ...
Setze Pipeline auf BEREIT...
Setze Pipeline auf NULL...
BEREINIGE Pipeline...

This are my gstreamer packages that I have installed.

ii  gstreamer-tools                            0.10.18-4ubuntu1                                     Tools for use with GStreamer
ii  gstreamer0.10-alsa                         0.10.18-3                                            GStreamer plugin for ALSA
ii  gstreamer0.10-ffmpeg                       0.10.3-6                                             FFmpeg plugin for GStreamer
ii  gstreamer0.10-gnomevfs                     0.10.18-3                                            GStreamer plugin for GnomeVFS
ii  gstreamer0.10-plugins-bad                  0.10.6-5                                             GStreamer plugins from the "bad" set
ii  gstreamer0.10-plugins-bad-multiverse       0.10.6-1                                             GStreamer plugins from the "bad" set (Multiv
ii  gstreamer0.10-plugins-base                 0.10.18-3                                            GStreamer plugins from the "base" set
ii  gstreamer0.10-plugins-base-apps            0.10.18-3                                            GStreamer helper programs from the "base" se
ii  gstreamer0.10-plugins-farsight             0.12.9-2ubuntu1~ppa8.04+2                            plugins for GStreamer for Audio/Video confer
ii  gstreamer0.10-plugins-good                 0.10.8-4~ppa8.04+1                                   GStreamer plugins from the "good" set
ii  gstreamer0.10-plugins-ugly                 0.10.7-3ubuntu1                                      GStreamer plugins from the "ugly" set
ii  gstreamer0.10-plugins-ugly-multiverse      0.10.7-1                                             GStreamer plugins from the "ugly" set (Multi
ii  gstreamer0.10-pulseaudio                   0.9.7-2                                              GStreamer plugin for PulseAudio
ii  gstreamer0.10-tools                        0.10.18-4ubuntu1                                     Tools for use with GStreamer
ii  gstreamer0.10-x                            0.10.18-3                                            GStreamer plugins for X11 and Pango
ii  libgstreamer-plugins-base0.10-0            0.10.18-3                                            GStreamer libraries from the "base" set
ii  libgstreamer-plugins-base0.10-dev          0.10.18-3                                            GStreamer development files for libraries fr
ii  libgstreamer0.10-0                         0.10.18-4ubuntu1                                     Core GStreamer libraries and elements
ii  libgstreamer0.10-dev                       0.10.18-4ubuntu1                                     GStreamer core development files
ii  totem-gstreamer                            2.22.1-0ubuntu2 


You can test it with this sample file.
http://www.lynnepublishing.com/surround/www_lynnemusic_com_surround_test.ac3

If you want to know you monitor device then type this in a terminal:

pactl list | grep monitor

I think you know that already.

If you need more information, then please let me know.

Regards
Achim
Comment 1 Sebastian Dröge (slomo) 2008-08-11 17:20:28 UTC
Hi,
could you check if this still happens with latest releases (for Ubuntu you can get them at https://launchpad.net/~gstreamer-team/+archive . still not complete yet but gstreamer core and gst-plugins-base should be sufficient).

If it still happens could you install debug packages for libc, glib, gstreamer and gst-plugins-base and run your pipeline with G_DEBUG=fatal_warnings and get a backtrace?
Comment 2 Achim Frase 2008-08-11 18:07:58 UTC
(In reply to comment #1)
> If it still happens could you install debug packages for libc, glib, gstreamer
> and gst-plugins-base and run your pipeline with G_DEBUG=fatal_warnings and get
> a backtrace?

So I hope I did everything right because this was the first time I used a debugger.

This is what I have done.

~$ G_DEBUG=fatal_warnings gdb gst-launch pulsesrc device=alsa_output.pci_8086_284b_sound_card_0_alsa_playback_0.monitor ! queue ! audio/x-raw-float,rate=44100,channels=6 ! audioconvert ! vorbisenc quality=.8 ! oggmux ! filesink location=outtest.ogg


This GDB was configured as "x86_64-linux-gnu"...
/home/achim/pulsesrc: No such file or directory.
(gdb) run
Starting program: /usr/bin/gst-launch 
Executing new program: /usr/bin/gst-launch-0.10
[Thread debugging using libthread_db enabled]
[New Thread 0x7f9eb9ce5780 (LWP 1804)]
FEHLER: Leitung konnte nicht konstruiert werden: Leere Leitung ist nicht erlaubt.

Program exited with code 01.

Regards
Achim
Comment 3 Tim-Philipp Müller 2008-08-12 21:00:35 UTC
> This is what I have done.
> 
> $ G_DEBUG=fatal_warnings gdb gst-launch pulsesrc device=xyz ! ...

Try:

  $ G_DEBUG=fatal_warnings gdb --args gst-launch-0.10 pulsesrc device=xyz ! ...

Comment 4 Achim Frase 2008-08-13 08:03:08 UTC
(In reply to comment #3)
> > This is what I have done.
> > 
> > $ G_DEBUG=fatal_warnings gdb gst-launch pulsesrc device=xyz ! ...
> 
> Try:
> 
>   $ G_DEBUG=fatal_warnings gdb --args gst-launch-0.10 pulsesrc device=xyz ! ...
> 

This time we get a bit more information.

This GDB was configured as "x86_64-linux-gnu"...
(gdb) run
Starting program: /usr/bin/gst-launch pulsesrc device=alsa_output.pci_8086_284b_sound_card_0_alsa_playback_0.monitor \! queue \! audio/x-raw-float,rate=44100,channels=6 \! audioconvert \! vorbisenc quality=.8 \! oggmux \! filesink location=outtest.ogg
Executing new program: /usr/bin/gst-launch-0.10
[Thread debugging using libthread_db enabled]
[New Thread 0x7f0ae6ba2780 (LWP 7143)]
[New Thread 0x40db8950 (LWP 7147)]
Pausiere Leitung ...
[New Thread 0x415b9950 (LWP 7148)]
W: context.c: No cookie loaded. Attempting to connect without.
W: context.c: No cookie loaded. Attempting to connect without.
[New Thread 0x41dba950 (LWP 7149)]

** 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.
aborting...

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7f0ae6ba2780 (LWP 7143)]
0x00007f0ae5a93095 in raise () from /lib/libc.so.6
(gdb) quit
The program is running.  Exit anyway? (y or n) y

Regards
Achim
Comment 5 Sebastian Dröge (slomo) 2008-08-13 09:09:23 UTC
Before "quit" please do "bt"
Comment 6 Achim Frase 2008-08-13 09:21:16 UTC
(In reply to comment #5)
> Before "quit" please do "bt"

(gdb) run
Starting program: /usr/bin/gst-launch pulsesrc device=alsa_output.pci_8086_284b_sound_card_0_alsa_playback_0.monitor \! queue \! audio/x-raw-float,rate=44100,channels=6 \! audioconvert \! vorbisenc quality=.8 \! oggmux \! filesink location=outtest.ogg
Executing new program: /usr/bin/gst-launch-0.10
[Thread debugging using libthread_db enabled]
[New Thread 0x7f8e40d85780 (LWP 20443)]
[New Thread 0x410d8950 (LWP 20447)]
Pausiere Leitung ...
[New Thread 0x4273c950 (LWP 20448)]
W: context.c: No cookie loaded. Attempting to connect without.
W: context.c: No cookie loaded. Attempting to connect without.
[New Thread 0x418d9950 (LWP 20449)]

** 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.
aborting...

Program received signal SIGABRT, Aborted.

Thread 140248950003584 (LWP 20443)

  • #0 raise
    from /lib/libc.so.6
  • #1 abort
    from /lib/libc.so.6
  • #2 g_logv
    from /usr/lib/libglib-2.0.so.0
  • #3 g_log
    from /usr/lib/libglib-2.0.so.0
  • #4 gst_audio_get_channel_positions
    at multichannel.c line 250
  • #5 ??
    from /usr/lib/gstreamer-0.10/libgstpulse.so
  • #6 ??
    from /usr/lib/gstreamer-0.10/libgstpulse.so
  • #7 gst_audioringbuffer_acquire
    at gstaudiosrc.c line 358
  • #8 gst_ring_buffer_acquire
    at gstringbuffer.c line 648
  • #9 gst_base_audio_src_setcaps
    at gstbaseaudiosrc.c line 577
  • #10 gst_pad_set_caps
    at gstpad.c line 2388
  • #11 gst_base_src_default_negotiate
    at gstbasesrc.c line 2313
  • #12 gst_base_src_start
    at gstbasesrc.c line 2339
  • #13 gst_base_src_activate_push
    at gstbasesrc.c line 2591

Comment 7 Sebastian Dröge (slomo) 2008-08-20 17:17:46 UTC
Ok, this is fixed in CVS now.

Usually you should provide a channel layout after pulsesrc to make things work but now it will get a default channel layout from pulseaudio if possible and uses that if none is given by the downstream caps. This will fail in some situations though if pulseaudio doesn't have a default layout for a given number of channels ;)

So better specify which channels you want at which positions :)

2008-08-20  Sebastian Dröge  <sebastian.droege@collabora.co.uk>

        * ext/pulse/pulsesrc.c: (gst_pulsesrc_class_init),
        (gst_pulsesrc_create_stream), (gst_pulsesrc_negotiate),
        (gst_pulsesrc_prepare):
        * ext/pulse/pulseutil.c: (gst_pulse_gst_to_channel_map),
        (gst_pulse_channel_map_to_gst):
        * ext/pulse/pulseutil.h:
        If downstream provides no channel layout and >2 channels should be 
        used use the default layout that pulseaudio chooses and also
        add this layout to the caps. Fixes bug #547258.