# Mopidy is not playing with icecast2

**URL:** https://discourse.mopidy.com/t/mopidy-is-not-playing-with-icecast2/2469
**Category:** Misc
**Created:** [May 5, 2018, 9:20am UTC](https://discourse.mopidy.com/t/mopidy-is-not-playing-with-icecast2/2469 "2018-05-05T09:20:16Z")
**Posts on this page:** 1
**Showing post:** 44

<div class="post-metadata">

### Author: ![kingosticks](https://avatars.discourse-cdn.com/v4/letter/k/858c86/32.png) [@kingosticks](https://discourse.mopidy.com/u/kingosticks)
#### Post date: [January 9, 2019, 1:05am UTC](https://discourse.mopidy.com/t/mopidy-is-not-playing-with-icecast2/2469/44 "2019-01-09T01:05:05Z")

</div>

So, my working Ubuntu system uses avdec (from gstreamer1.0-libav) for decoding the mp3 whereas the broken Ubuntu system uses mpg123. I can fix the broken system by installing gstreamer1.0-libav; and break the working system by removing it.

mpg123 logs a couple of the following messages which might be relevant:

> cannot decode yet, need more data → no output buffer to push

Perhaps the manual seek operation puts enough data through the decoder that it can get going. Or maybe the seek has some other affect.

So then I tried to reproduce it with gst-launch:

```auto
gst-launch-1.0 playbin uri=file:///home/nick/Music/Architects/Daybreaker/The_Bitter_End.mp3 audio-sink="tee name=t ! queue ! fakesink sync=true t. ! queue ! lamemp3enc ! shout2send mount=mopidy ip=127.0.0.1 port=8000 password=hackme"
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
^Chandling interrupt.
Interrupt: Stopping pipeline ...
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

```

So that didn’t work out. But removing the fakesink does and it plays just fine:

```auto
gst-launch-1.0 playbin uri=file:///home/nick/Music/Architects/Daybreaker/The_Bitter_End.mp3 audio-sink="tee name=t ! queue ! lamemp3enc ! shout2send mount=mopidy ip=127.0.0.1 port=8000 password=hackme"
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:21.681471553
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

```

So I hacked the fakesink out of Mopidy’s pipeline and that worked too. I don’t think we actually need the fakesink since we don’t (currently) support dynamic outputs. So that might be a reasonable work-around. But we still need to understand why that is. @adamcik, are you around?

EDIT:  
And for completeness:

- fakesink works fine along with autoaudiosink:

```auto
... audio-sink="tee name=t ! queue ! fakesink sync=true t. ! queue ! autoaudiosink"

```

- And fakesink also works fine with shout2send when gstreamer1.0-libav (avdec instead of mpg123) is installed:

```auto
... audio-sink="tee name=t ! queue ! fakesink sync=true t. ! queue ! lamemp3enc ! shout2send mount=mopidy ip=127.0.0.1 port=8000 password=hackme"

```

---

_[View the full topic](https://discourse.mopidy.com/t/mopidy-is-not-playing-with-icecast2/2469)._
