GNOME Bugzilla – Bug 697984
souphttpsrc: direct stream dump results in broken audio with internet radio
Last modified: 2013-04-14 11:43:47 UTC
I'm using something similar to: gst-launch-1.0 souphttpsrc location=http://ndrstream.ic.llnwd.net/stream/ndrstream_ndrinfo_hi_mp3 ! filesink location=new.mp3 Which produces very choppy sound when played back: kipping presumed frame 0:00:00.158675290 13929 0x7fdd04052320 DEBUG mad gstmad.c:302:gst_mad_parse:<mad0> Added 8 zero guard bytes in the adapter; using fallback buffer of size 426 0:00:00.158756526 13929 0x7fdd04052320 WARN mad gstmad.c:384:gst_mad_parse:<mad0> mad_frame_decode had an error: reserved block_type 0:00:00.158792530 13929 0x7fdd04052320 DEBUG mad gstmad.c:355:gst_mad_parse:<mad0> mad_header_decode had an error: reserved sample frequency value 0:00:00.158817566 13929 0x7fdd04052320 DEBUG mad gstmad.c:355:gst_mad_parse:<mad0> mad_header_decode had an error: forbidden bitrate value 0:00:00.158929663 13929 0x7fdd04052320 DEBUG mad gstmad.c:378:gst_mad_parse:<mad0> bad data ptr, skipping presumed frame 0:00:00.170643223 13929 0x7fdd04052320 DEBUG mad gstmad.c:302:gst_mad_parse:<mad0> Added 8 zero guard bytes in the adapter; using fallback buffer of size 426 0:00:00.171174107 13929 0x7fdd04052320 DEBUG mad gstmad.c:378:gst_mad_parse:<mad0> bad data ptr, skipping presumed frame 0:00:00.785933406 13929 0x7fdd04052320 DEBUG mad gstmad.c:302:gst_mad_parse:<mad0> Added 8 zero guard bytes in the adapter; using fallback buffer of size 426 0:00:00.855400768 13929 0x7fdd04052320 DEBUG mad gstmad.c:378:gst_mad_parse:<mad0> bad data ptr, skipping presumed frame 0:00:01.268061174 13929 0x7fdd04052320 DEBUG mad gstmad.c:302:gst_mad_parse:<mad0> Added 8 zero guard bytes in the adapter; using fallback buffer of size 426 0:00:01.337445248 13929 0x7fdd04052320 DEBUG mad gstmad.c:378:gst_mad_parse:<mad0> bad data ptr, skipping presumed frame 0:00:01.337686795 13929 0x7fdd04052320 DEBUG mad gstmad.c:378:gst_mad_parse:<mad0> bad data ptr, skipping presumed frame 0:00:01.827735453 13929 0x7fdd04052320 DEBUG mad gstmad.c:302:gst_mad_parse:<mad0> Added 8 zero guard bytes in the adapter; using fallback buffer of size 426 0:00:01.840227452 13929 0x7fdd04052320 DEBUG mad gstmad.c:378:gst_mad_parse:<mad0> bad data ptr, skipping presumed frame 0:00:01.840330996 13929 0x7fdd04052320 DEBUG mad gstmad.c:378:gst_mad_parse:<mad0> bad data ptr, skipping presumed frame 0:00:02.319087372 13929 0x7fdd04052320 DEBUG mad gstmad.c:302:gst_mad_parse:<mad0> Added 8 zero guard bytes in the adapter; using fallback buffer of size 426 0:00:02.319244364 13929 0x7fdd04052320 WARN mad gstmad.c:384:gst_mad_parse:<mad0> mad_frame_decode had an error: bad Huffman table select 0:00:02.319347038 13929 0x7fdd04052320 DEBUG mad gstmad.c:378:gst_mad_parse:<mad0> bad data ptr, skipping presumed frame Doing the same with 0.10 works. gst-launch-0.10 souphttpsrc location=http://ndrstream.ic.llnwd.net/stream/ndrstream_ndrinfo_hi_mp3 ! filesink location=old.mp3 Also, using playbin, this sounds fine as well, even with 1.0.
The reason is that the server does not deliver an MP3 stream, but an ICY stream with mp3 data. You have to send special headers to the server to make it send the icy stream, which is what is usually used for mp3 radio streams. In 0.10 you had to explicitly set a property to make souphttpsrc send those headers, in 1.0 this is always done automatically.
Not sure what else we can do really apart from adding a property to disable it: commit 24bc3c46f9ae814d466e165f9d5d0bd113f6671a Author: Tim-Philipp Müller <tim@centricular.net> Date: Sun Apr 14 12:32:06 2013 +0100 souphttpsrc: add back "iradio-mode" property to disable sending of icecast request headers In 1.0 we now always send the icecast request headers by default, which makes the server send icecasts metadata inserted into the stream if it supports that. However, there are some use cases where this is not desirable, like when just saving a radio stream to disk, so add back the "iradio-mode" property to allow people to disable this. https://bugzilla.gnome.org/show_bug.cgi?id=697984 It should also be pointed out that souphttpsrc did/does signal the icy caps to indicate that this is not mp3.