Dropouts and disconnections on Icecast

Jim Carter jimc at math.ucla.edu
Fri Oct 28 22:20:10 PDT 2011


I'm trying to play audio from a CGI script executing on the playback
host, keeping things as simple as possible, which turns out to be
amazingly possible with GStreamer.  I'm execing this command line:
     gst-launch playbin "uri=$MRL"
This works excellently with local files and with streaming audio/mpeg
(mp3) or audio/ogg.  However, I'm getting anomalies in two cases, both
involving the output of a FM receiver compressed to either of these
formats.  The rate of production of source content is controlled
by the hardware (and source-side resampling parameters).

I can send the FM stream either as the HTTP response of my webserver
(with HTTP headers and a captured and re-played Vorbis header prepended),
or through an Icecast server which takes care of both those items
professionally.

The first anomaly is seen from both the plain webserver and Icecast.
Occasionally, like once every 1 to 2 hours, playback will fall silent
for about a second, then the audio will continue exactly where it left
off, i.e. I can't hear any missing segment.

The second anomaly is seen only from Icecast: the server logs
"INFO source/send_to_listener Client 346 (192.9.200.208) has fallen too
far behind, removing", whereupon the playbin's input is chopped.  This
happens maybe twice a day, on days that it happens.

My working hypothesis is that the source and sink clocks are not
identical; case 1 happens if the sink is faster, while case 2 means the
source is faster.

Following suggestions and examples in the GStreamer documentation,
I tried: gst-launch-0.10 uridecodebin "uri=$MRL" ! audioconvert ! \
 	audioresample ! autoaudiosink
With an Icecast source while I was watching standard error it produced
one dropout (type 1) and said this:

Setting pipeline to PAUSED ...			#At startup
Pipeline is PREROLLING ...
Prerolled, waiting for buffering to finish...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstPulseSinkClock
Buffering, setting pipeline to PAUSED ...
Prerolled, waiting for buffering to finish...
Done buffering, setting pipeline to PLAYING ...	#Now it plays
Buffering, setting pipeline to PAUSED ...	#Audio pauses
Prerolled, waiting for buffering to finish...
Done buffering, setting pipeline to PLAYING ...	#Audio resumes

I thought that audioresample would match the source and sink clocks.
Does anyone have a suggestion how to resample so as to work around
differing (and possibly slightly variable) source and sink clocks?

Context is gstreamer-0_10-0.10.34 from Packman on OpenSuSE v11.4 Linux.
Audio sink is 0d8c:0103 C-Media Electronics, Inc. CM102-A+/102S+ Audio
Controller via pulseaudio-0.9.22.  Audio source is 06e1:a155 ADS
Technologies, Inc. FM Radio Receiver/Instant FM Music (RDX-155-EF)
via alsa-1.0.24.1 (not pulseaudio).


James F. Carter          Voice 310 825 2897    FAX 310 206 6673
UCLA-Mathnet;  6115 MSA; 405 Hilgard Ave.; Los Angeles, CA, USA 90095-1555
Email: jimc at math.ucla.edu  http://www.math.ucla.edu/~jimc (q.v. for PGP key)


More information about the gstreamer-devel mailing list