[SOLVED] How to configure external Icecast2 server
  • I have just installed Airtime 1.9.4 at Ubuntu Studio 10.04 (lucid) with .deb packages.

    I lived Icecast2 uninstalled and unconfigured to use my EXTERNAL server, but I have not success to configure it.

    In particular I have the exact problem like this post. I configured /etc/airtime/liquidsoap.cfg but it do not works.

    I check it with command line:


    $ /usr/lib/airtime/pypo/bin/liquidsoap_bin/liquidsoap 'output.icecast(%mp3, mount="test.ogg", host="164.73.XX.XX", port=8888, password="Pass", sine())'
    2011/10/20 20:12:28 >>> LOG START
    2011/10/20 20:12:28 [protocols.external:3] Didn't find "ufetch".
    2011/10/20 20:12:28 [protocols.external:3] Found "/usr/bin/wget".
    2011/10/20 20:12:28 [main:3] Liquidsoap 1.0.0-beta2
    2011/10/20 20:12:28 [main:3] Using: pcre=6.0.1 dtools=0.2.2 duppy=0.4.0 duppy.syntax=0.4.0 cry=0.2.0 mm=0.1.0 xmlplaylist=0.1.2 ogg=0.4.2 vorbis=0.6.0 mad=0.4.2 flac=0.1.0 flac.ogg=0.1.0 lame=0.3.0 alsa=0.2.1 samplerate=0.1.1 taglib=0.1.4 camomile=0.7.1 portaudio=@VERSION ladspa=0.1.2
    2011/10/20 20:12:28 [dynamic.loader:2] Could not load plugins in directory /usr/local/lib/liquidsoap/1.0.0-beta2/plugins.
    2011/10/20 20:12:28 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
    2011/10/20 20:12:28 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
    2011/10/20 20:12:28 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
    2011/10/20 20:12:28 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
    2011/10/20 20:12:28 [threads:3] Created thread "generic queue #1".
    2011/10/20 20:12:28 [test(dot)ogg:3] Connecting mount test.ogg for source@164.73.XX.XX...
    2011/10/20 20:12:28 [test(dot)ogg:3] Connection setup was successful.
    2011/10/20 20:12:28 [threads:3] Created thread "wallclock_main" (1 total).
    2011/10/20 20:12:28 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.


    Can you please tell me how I configure a external Icecast2 server?

    (I have seen documentation and wiki and forum, but perhaps I have not seen the right document)
    Post edited by Rodolfo Pilas at 2011-11-08 17:14:08
  • 13 Comments sorted by
  • Make that line

    /usr/lib/airtime/pypo/bin/liquidsoap_bin/liquidsoap 'output.icecast(%vorbis, host = "localhost", port = 8000, password = "hackme", mount = "liq.ogg", mksafe(single("/path/to/mp3")))'
    Airtime Pro Hosting: http://airtime.pro
  • SOLVED!!

    The radios is ON AIR now, and streaming thought a remote icecast server.

    Thank you very much Martin and Paul.

    I will add Uniradio http://www.uniradio.edu.uy, the first University Radio of Uruguay, (South America), as soon it become online with Airtime.


  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    > I have just installed Airtime 1.9.4 at Ubuntu Studio 10.04 (lucid) with
    > .deb packages.
    >
    > I lived Icecast2 uninstalled and unconfigured to use my EXTERNAL server,
    > but I have not success to configure it.
    >
    > In particular I have the exact problem like this post<http://forum.sourcefabric.org/index.php/t/3994/>.
    > I configured /etc/airtime/liquidsoap.cfg but it do not works.
    >

    That should be all you need to do...can you send the liquidsoap.cfg file to
    us and the results of airtime-check-system?

  • Thank you Paul.

    Here it is the airtime-check-system


    CPU = Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz
    Total RAM = 2047540 kB
    Free RAM = 597004 kB
    OS = Ubuntu 10.04.3 LTS x86-64
    AIRTIME_CONFIG_FILES = OK
    POSTGRESQL_DATABASE = OK
    PYTHON_KOMBU_VERSION = 1.2.0
    PYTHON_POSTER_VERSION = 0.8.1
    PYTHON_MUTAGEN_VERSION = 1.20
    PYTHON_PYINOTIFY_VERSION = 0.9.2
    RABBITMQ_SERVER = OK
    AIRTIME_VERSION_URL = http://localhost:80/api/version/api_key/%%api_key%%
    APACHE_CONFIGURED = YES
    AIRTIME_VERSION = 1.9.4
    PLAYOUT_ENGINE_PROCESS_ID = 6398
    PLAYOUT_ENGINE_RUNNING_SECONDS = 680234
    LIQUIDSOAP_PROCESS_ID =
    LIQUIDSOAP_RUNNING_SECONDS = 0
    -- WARNING! It looks like the Liquidsoap engine is continually restarting.
    -- 2011/10/20 19:18:54 [airtime(dot)ogg:3] Connection failed, will try again in 5 sec.
    -- 2011/10/20 19:19:00 [airtime(dot)ogg:3] Connecting mount airtime.ogg for source@127.0.0.1...
    -- 2011/10/20 19:19:00 [airtime(dot)ogg:2] Connection failed: could not connect to host: Connection refused in connect()!
    -- 2011/10/20 19:19:00 [airtime(dot)ogg:3] Connection failed, will try again in 5 sec.
    -- 2011/10/20 19:19:05 [main:3] Shutdown started!
    -- 2011/10/20 19:19:05 [main:3] Waiting for threads to terminate...
    -- 2011/10/20 19:19:05 [clock.wallclock_main:3] Streaming loop stopped.
    -- 2011/10/20 19:19:05 [threads:3] Thread "wallclock_main" terminated (0 remaining).
    -- 2011/10/20 19:19:05 [main:3] Cleaning downloaded files...
    -- 2011/10/20 19:19:05 >>> LOG END
    MEDIA_MONITOR_PROCESS_ID = 10320
    MEDIA_MONITOR_RUNNING_SECONDS = 3
    SHOW_RECORDER_PROCESS_ID = 1234
    SHOW_RECORDER_RUNNING_SECONDS = 682363
    ICECAST_PROCESS_ID = FAILED

    -- There appears to be problems with your setup. Please visit
    -- http://wiki.sourcefabric.org/x/HABQ for troubleshooting info.


    and here the /etc/airtime/liquidsoap.cfg


    ###########################################
    # Liquidsoap config file #
    ###########################################

    ###########################################
    # Output settings #
    ###########################################
    output_sound_device = false
    output_icecast_vorbis = false
    output_icecast_mp3 = true
    output_shoutcast = false

    output_bitrate = 64
    output_samplerate = 22050
    output_stereo = true

    ###########################################
    # Logging settings #
    ###########################################
    log_file = "/var/log/airtime/pypo-liquidsoap/<script>.log"
    #log_level = 3

    ###########################################
    # Icecast Stream settings #
    ###########################################
    icecast_host = "164.73.XX.XX"
    icecast_port = 8888
    icecast_pass = "Pass"

    # Icecast mountpoint names
    mount_point_mp3 = "uniradio.mp3"
    mount_point_vorbis = "uniradio.ogg"

    # Webstream metadata settings
    icecast_url = "http://radio.uniradio.edu.uy"
    icecast_description = "UNI Radio"
    icecast_genre = "broadcast"

    # Audio stream metadata for vorbis/ogg is disabled by default
    # due to a number of client media players that disconnect
    # when the metadata changes to a new track. Some versions of
    # mplayer and VLC have this problem. Enable this option at your
    # own risk!
    output_icecast_vorbis_metadata = false


    ###########################################
    # Shoutcast Stream settings #
    ###########################################
    shoutcast_host = "164.73.XX.XX"
    shoutcast_port = 8888
    shoutcast_pass = "Pass"

    # Webstream metadata settings
    shoutcast_url = "http://radio.uniradio.edu.uy"
    shoutcast_genre = "broadcast"


    (port + password is changed)

    As you may see at the first post, the server has proper connection to broadcasting Icecast server.

    Thank you for your help.

    Rodolfo
  • Hi,

    Please try the following from the command line

    liquidsoap 'output.icecast(%vorbis, host = "localhost", port = 8000, password = "hackme", mount = "liq.ogg", mksafe(single("/path/to/mp3")))'

    with your custom parameters set up. Does it work then?
    Airtime Pro Hosting: http://airtime.pro
  • I receive an error form command:

    $ /usr/lib/airtime/pypo/bin/liquidsoap_bin/liquidsoap 'output.icecast(%mp3, mount="test.ogg", host="164.73.X.X", port=8888, password="Pass", mksafe(single("/var/lib/airtime/tmp/airtime_mvc/application/models/tests/test10003.mp3")))'
    At line 1, char 101: the variable mksafe used here has not been previously
      defined.

    I also have tryed change mksafe() with sine(). as I seen into other example at this formum:

    $ /usr/lib/airtime/pypo/bin/liquidsoap_bin/liquidsoap 'output.icecast(%mp3, mount="test.ogg", host="164.73.X.X", port=8888, password="Pass", sine())'
    2011/11/03 22:53:31 >>> LOG START
    2011/11/03 22:53:30 [protocols.external:3] Didn't find "ufetch".
    2011/11/03 22:53:30 [protocols.external:3] Found "/usr/bin/wget".
    2011/11/03 22:53:31 [main:3] Liquidsoap 1.0.0-beta2
    2011/11/03 22:53:31 [main:3] Using: pcre=6.0.1 dtools=0.2.2 duppy=0.4.0 duppy.syntax=0.4.0 cry=0.2.0 mm=0.1.0 xmlplaylist=0.1.2 ogg=0.4.2 vorbis=0.6.0 mad=0.4.2 flac=0.1.0 flac.ogg=0.1.0 lame=0.3.0 alsa=0.2.1 samplerate=0.1.1 taglib=0.1.4 camomile=0.7.1 portaudio=@VERSION ladspa=0.1.2
    2011/11/03 22:53:31 [dynamic.loader:2] Could not load plugins in directory /usr/local/lib/liquidsoap/1.0.0-beta2/plugins.
    2011/11/03 22:53:31 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
    2011/11/03 22:53:31 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
    2011/11/03 22:53:31 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
    2011/11/03 22:53:31 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
    2011/11/03 22:53:31 [threads:3] Created thread "generic queue #1".
    2011/11/03 22:53:31 [test(dot)ogg:3] Connecting mount test.ogg for source@164.73.2.137...
    2011/11/03 22:53:31 [test(dot)ogg:3] Connection setup was successful.
    2011/11/03 22:53:31 [threads:3] Created thread "wallclock_main" (1 total).
    2011/11/03 22:53:31 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.




    Post edited by Rodolfo Pilas at 2011-11-03 20:58:35
  • Sorry, the previous command was missing something. Try this:



    /usr/lib/airtime/pypo/bin/liquidsoap_bin/liquidsoap /usr/lib/airtime/pypo/bin/liquidsoap_scripts/library/pervasives.liq 'output.icecast(%vorbis, host = "localhost", port = 8000, password = "hackme", mount = "liq.ogg", mksafe(single("/var/lib/airtime/tmp/airtime_mvc/application/models/tests/test10003.mp3")))'
    Airtime Pro Hosting: http://airtime.pro
  • Thank you Martin.  I understand that the command connects and starts the source to the icecast server:

    $ /usr/lib/airtime/pypo/bin/liquidsoap_bin/liquidsoap /usr/lib/airtime/pypo/bin/liquidsoap_scripts/library/pervasives.liq 'output.icecast(%vorbis, host = "164.73.X.X", port = 8888, password = "Pass", mount = "liq.ogg", mksafe(single("/var/lib/airtime/tmp/airtime_mvc/application/models/tests/test10003.mp3")))'
    2011/11/06 12:34:13 >>> LOG START
    2011/11/06 12:34:13 [protocols.external:3] Didn't find "ufetch".
    2011/11/06 12:34:13 [protocols.external:3] Found "/usr/bin/wget".
    2011/11/06 12:34:13 [main:3] Liquidsoap 1.0.0-beta2
    2011/11/06 12:34:13 [main:3] Using: pcre=6.0.1 dtools=0.2.2 duppy=0.4.0 duppy.syntax=0.4.0 cry=0.2.0 mm=0.1.0 xmlplaylist=0.1.2 ogg=0.4.2 vorbis=0.6.0 mad=0.4.2 flac=0.1.0 flac.ogg=0.1.0 lame=0.3.0 alsa=0.2.1 samplerate=0.1.1 taglib=0.1.4 camomile=0.7.1 portaudio=@VERSION ladspa=0.1.2
    2011/11/06 12:34:13 [dynamic.loader:2] Could not load plugins in directory /usr/local/lib/liquidsoap/1.0.0-beta2/plugins.
    2011/11/06 12:34:13 [lang:3] Lastfm/audioscrobbler support was not compiled.
    2011/11/06 12:34:13 [decoder:3] Method "MP3" accepted "/var/lib/airtime/tmp/airtime_mvc/application/models/tests/test10003.mp3".
    2011/11/06 12:34:13 [single:3] "/var/lib/airtime/tmp/airtime_mvc/application/models/tests/test10003.mp3" is static, resolving once for all...
    2011/11/06 12:34:13 [frame:3] Using 44100Hz audio, 25Hz video, 44100Hz master.
    2011/11/06 12:34:13 [frame:3] Frame size must be a multiple of 1764 ticks = 1764 audio samples = 1 video samples.
    2011/11/06 12:34:13 [frame:3] Targetting 'frame.duration': 0.04s = 1764 audio samples = 1764 ticks.
    2011/11/06 12:34:13 [frame:3] Frames last 0.04s = 1764 audio samples = 1 video samples = 1764 ticks.
    2011/11/06 12:34:13 [threads:3] Created thread "generic queue #1".
    2011/11/06 12:34:13 [single_9914:3] Prepared "/var/lib/airtime/tmp/airtime_mvc/application/models/tests/test10003.mp3" (RID 0).
    2011/11/06 12:34:13 [liq(dot)ogg:3] Connecting mount liq.ogg for source@164.73.X.X...
    2011/11/06 12:34:14 [liq(dot)ogg:3] Connection setup was successful.
    2011/11/06 12:34:14 [threads:3] Created thread "wallclock_main" (1 total).
    2011/11/06 12:34:14 [clock.wallclock_main:3] Streaming loop starts, synchronized with wallclock.
    2011/11/06 12:34:14 [mksafe:3] Switch to single_9914.
    2011/11/06 12:34:25 [single_9914:3] Finished with "/var/lib/airtime/tmp/airtime_mvc/application/models/tests/test10003.mp3".
    2011/11/06 12:34:25 [single_9914:3] Prepared "/var/lib/airtime/tmp/airtime_mvc/application/models/tests/test10003.mp3" (RID 0).
    2011/11/06 12:34:37 [single_9914:3] Finished with "/var/lib/airtime/tmp/airtime_mvc/application/models/tests/test10003.mp3".


    The server shows a new mount point /liq.ogg as follows:

    • Stream Title:  liq.ogg
    • Stream Description:  Liquidsoap Radio!
    • Content Type:   application/ogg

    Post edited by Rodolfo Pilas at 2011-11-06 09:44:09
  • This is really strange. Everything looks perfectly set up. Please run the following command:

    /usr/lib/airtime/pypo/bin/airtime-liquidsoap

    and post the entire output.
    Airtime Pro Hosting: http://airtime.pro
  • OK...  when I run the command as user, it can not include cfg file because it is root read-only.

    $ /usr/lib/airtime/pypo/bin/airtime-liquidsoap
    Line 2, char 39: cannot %include, file "/etc/airtime/liquidsoap.cfg" doesn't exist.
    $ ls -al /etc/airtime/liquidsoap.cfg
    -rw-r----- 1 root pypo 1715 Oct 28 17:02 /etc/airtime/liquidsoap.cfg
    $ sudo su -
    [sudo] password:
    # /usr/lib/airtime/pypo/bin/airtime-liquidsoap
    At file /etc/airtime/liquidsoap.cfg, line 15, character 15: The variable
      output_stereo defined here is not used anywhere in its scope.
      Use ignore(...) instead of output_stereo = ... if you meant to not use it.
      Otherwise, this may be a typo or a sign that your script does not do
      what you intend.
    #

    I have played, and when I change
    /etc/airtime/liquidsoap.cfg permission to 644 it works!!   I have now a running LIQUIDSOAP process.

    Let me do several test before to label this post as SOLVED.


  • Did you fix it by putting the comment back in front of "output_stereo" variable in /etc/airtime/liquidsoap.cfg?

    It looks like this variable isn't used anymore, and we should have removed it in 1.9.4.
    Airtime Pro Hosting: http://airtime.pro
  • No, I lived the /etc/airtime/liquidsoap.cfg unchanged, at it is showed before.

    I just changed the file permission to 0644.


  • THANK YOU VERY MUCH Martin!