<commit_before>.. _icecast:

*******
Icecast
*******

If you want to play the audio on another computer than the one running Mopidy,
you can stream the audio from Mopidy through an Icecast audio streaming server.
Multiple media players can then be connected to the streaming server
simultaneously. To use the Icecast output, do the following:

.. warning::

    Ubuntu 20.04 ships with a bugged version of libshout that renders the
    shout2send sink broken and unusable. You cannot stream from Mopidy via
    Icecast with the below method if running on Ubuntu 20.04.

#. Install, configure and start the Icecast server. It can be found in the
   ``icecast2`` package in Debian/Ubuntu.

#. Set the :confval:`audio/output` config value to encode the output audio to
   MP3 (``lamemp3enc``) or Ogg Vorbis (``audioresample ! audioconvert !
   vorbisenc ! oggmux``) and send it to Icecast (``shout2send``).

   You might also need to change the ``shout2send`` default settings, run
   ``gst-inspect-1.0 shout2send`` to see the available settings. Most likely
   you want to change ``ip``, ``username``, ``password``, and ``mount``.
<commit_msg>docs: more specifics regarding libshout problem<commit_after>.. _icecast:

*******
Icecast
*******

If you want to play the audio on another computer than the one running Mopidy,
you can stream the audio from Mopidy through an Icecast audio streaming server.
Multiple media players can then be connected to the streaming server
simultaneously. To use the Icecast output, do the following:

.. warning::

    The last known working version of libshout3 is v2.4.1, this is the version
    available in Debian Buster. Newer versions of this library, such as those
    found in Ubuntu 20.04 and Debian Bullseye are bugged and render GStreamer's
    shout2send sink `broken
    <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/issues/848>`_
    and unusable. You cannot stream from Mopidy via Icecast with the below
    method when using Ubuntu 20.04 or Debian Bullseye. Consider `Snapcast
    <https://github.com/badaix/snapcast>`_ as an alternative solution.

#. Install, configure and start the Icecast server. It can be found in the
   ``icecast2`` package in Debian/Ubuntu.

#. Set the :confval:`audio/output` config value to encode the output audio to
   MP3 (``lamemp3enc``) or Ogg Vorbis (``audioresample ! audioconvert !
   vorbisenc ! oggmux``) and send it to Icecast (``shout2send``).

   You might also need to change the ``shout2send`` default settings, run
   ``gst-inspect-1.0 shout2send`` to see the available settings. Most likely
   you want to change ``ip``, ``username``, ``password``, and ``mount``.

{'fraction_non_alphanumeric': 0.09179467965530161, 'fraction_numerical': 0.015361558636193332, 'mean_word_length': 4.037735849056604, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '867019', 'n_tokens_mistral': 816, 'n_tokens_neox': 764, 'n_words': 356}