GNOME Bugzilla – Bug 757472
osxaudiosink: Invalid channel positions warning with headerless wav file
Last modified: 2016-06-30 08:48:30 UTC
Created attachment 314632 [details] An example wav file that I have tested with I have tried to playback several WAV files that are mono, PCM but gstreamer can not playback properly. There are various mono audio files that I have tried but couldn't find success case yet, the attachment file is an example for this case. I can not 100% sure but just guess those files are all "headerless pcm .wav file". Test case 1) problematic pipeline gst-launch-1.0 filesrc location=./infloop.wav ! decodebin ! audioconvert ! volume ! autoaudiosink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... ** (gst-launch-1.0:7333): WARNING **: Invalid channel positions ** (gst-launch-1.0:7333): WARNING **: Invalid channel positions ERROR: from element /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstWavParse:wavparse0: Internal data flow error. Additional debug info: gstwavparse.c(2249): gst_wavparse_loop (): /GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstWavParse:wavparse0: streaming task paused, reason not-negotiated (-4) ERROR: pipeline doesn't want to preroll. Setting pipeline to NULL ... ** (gst-launch-1.0:7333): WARNING **: Invalid channel positions Freeing pipeline ... Test case 2) gstreamer makes sound but sounds *really* bad comparing other audio player gst-launch-1.0 filesrc location=./infloop.wav ! decodebin ! autoaudiosink
About test 2, I've tested with mplayer (it jumps) and VLC won't play it at all. GStreamer sound just like aplay (means a lot of static). It would be nice to tell which other player play it right so we have a reference. About test 1, I've also tried (on 1.6.1) with both alsasink and pulsesink (the two options I have for autoaudiosink) and none present the warning you have. It would be nice if you could find out which audio sink is being used, and on which OS you are running this.
My miss not to mention platform and specific plugins. Platform is Mac OS X and osxaudiosink, I didn't think it is related with audiosink, because I thought it is casued by audioconvert or wavparse negotiation problem. in test case 2, I have compared the sound quality with Mac OS X's default "preview" application that properly playback the sample file. and I have also tested this file with Adacity with "import raw data..." Unsigned 8bit PCM, Little-endian, 1 channel (mono), start offset=0 bytes, sample rate 11000 Hz.
Not sure what to do about this. Plays seemingly fine for me on Linux, same as mplayer plays it, same as gst-launch-1.0 filesrc location= /home/tpm/samples/misc/757472-headerless.wav ! audioparse raw-format=u8 channels=1 rate=11000 ! queue ! pulsesink Needs someone to re-test on OS/X I suppose.
For test1, I ran it with latest git master on OSX and it works. Just got an error message regardless of playback. 0:00:00.215131000 61931 0x7fdf118e0ca0 ERROR audioconvert gstaudioconvert.c:585:void gst_audio_convert_fixate_channels(GstBaseTransform *, GstStructure *, GstStructure *):<audioconvert0> Have no default layout for 1 channels For test2, it really makes lots of noise with this pipeline (gst-launch-1.0 filesrc location=./infloop.wav ! decodebin ! osxaudiosink) but it seems to be played well after adding audioconvert and volume element in front of the osxaudiosink. @vador, I don't know that it has been solved recently, but if you're using the previous version of gstreamer could you check it with up-to-date one?
Created attachment 330601 [details] [review] audioconvert: Handle fallback channel mask for mono correctly It's 0 and no mask should be set for mono at all.
Wonchul, the above patch should fix your warnings.
Comment on attachment 330601 [details] [review] audioconvert: Handle fallback channel mask for mono correctly Attachment 330601 [details] pushed as 5de9d58 - audioconvert: Handle fallback channel mask for mono correctly
Sebastian, yup it works with that patch.
So anything else needed here? :)
I think it's enough to close this bug.