GNOME Bugzilla – Bug 676425
aiffparse: fails to extract channel layout for multichannel files
Last modified: 2016-02-21 12:29:42 UTC
I've tried to convert multi-channel audio files with SoundConverter, and it wasn't able to handle them. So I created a minimal command to reproduce the problem: gst-launch filesrc location=8Ch_Wind_8sek_test04.wav ! decodebin ! audioconvert ! wavenc ! filesink location=test8ch.wav Which gives me the following message: Setting pipeline to PAUSED ... Pipeline is PREROLLING ... ** (gst-launch-0.10:3728): 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:3728): 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. Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock Got EOS from element "pipeline0". Execution ended after 54176448 ns. Setting pipeline to PAUSED ... Setting pipeline to READY ... Setting pipeline to NULL ... Freeing pipeline ... "Please file a bug"... Done :) In fact, audiorate and audioresample seem to have the same problem. SoundConverter launchpad entry and example file: https://bugs.launchpad.net/soundconverter/+bug/1001820
Woops, forgot to mention. It does work if I remove the audioconvert element.
> Woops, forgot to mention. It does work if I remove the audioconvert element. That looks like a bug actually, it should error out with not-negotiated because wavenc only supports mono or stereo. In any case, aiffparse is not setting a channel layout in the caps, that's where it starts.
Created attachment 318438 [details] [review] aiffparse: fix negotiation errors with multi-channel files This patch makes it play, but it doesn't add full/proper multichannel handling yet, for that we'd have to parse the CHAN tag. This file doesn't have any CHAN tag anyway though, so I'm not sure how we're supposed to deduce the channel layout here, and the specs I found only specify some default layouts up to 6 channels, but this file has 8 channels. Patch simply makes it use some fallback layout for now.
Well, this improves the situation and plays the file at least. Not sure how it's supposed to pick up the channel layout here. commit a3019ffb63b1213cbad10abafa4e0ee9cd53c66b Author: Tim-Philipp Müller <tim@centricular.com> Date: Thu Jan 7 18:26:26 2016 +0000 aiffparse: fix negotiation errors with multi-channel files Set fallback channel layout on files with more than two channels. Not clear where to retrieve the real layout from or what the default layout is for AIFF files, the spec only seems to specify some layout for up to 6 channels and the file in question doesn't have a CHAN chunk. https://bugzilla.gnome.org/show_bug.cgi?id=676425