Icecast 2 streams only and no aac!

Hello
I am on Libretime for few days and i have 2 problems with the streams :slight_smile:
1- I can’t open 3 streams. Only 2 works (Icecast)
2- aac doesn’t work (i write aac, not aac+)

I would like to have the 3 streams working (2 with high bitrate and 1 in low bitrate and if possible with aac)

I am on Ubuntu 20.04 LTS (i was on 18.04 LTS but it had the same problems) and Libretime 3. alpha12

I would like someone help me to make Libretime as fantastic as i think.
Before i was on airtime which is always good for me but a little much buggy.

Thank in advance
yours
Patrick

Hi Patrick,

For your first question, you’ll only need to add more inputs in the icecast2 configuration. Open the icecast2 configuration:

sudo nano /etc/icecast2/icecast.xml

near the top, you’ll see some lines like:

  <limits>
    <clients>100</clients>
    <sources>2</sources>
    <queue-size>524288</queue-size>
    <client-timeout>30</client-timeout>
    <header-timeout>15</header-timeout>
    <source-timeout>10</source-timeout>

…change the number of “sources” to 3 or whatever you desire. Save your changes and restart icecast2 service:

sudo service icecast2 restart

Now when you create a 3rd stream in Libretime it will work fine.

For enabling AAC—for a stock Ubuntu 20.04 you are probably running on icecast v.2.44, which does seem to support AAC. Does for me anyway.

But I notice that the stock liquidsoap for that release is v.1.4.2. When I query mine for what input and output codecs are included I get:


+ stream decoding
** Stream decoding methods.**

  • AAC
    Use libfaad to decode any stream with an appropriate MIME type.
  • AIFF
    Decode a AIFF stream with an appropriate MIME type.
  • FFMPEG
    Use ffmpeg/libav to decode any stream with an appropriate MIME type.
  • FLAC
    Use libflac to decode any stream with an appropriate MIME type.
  • MAD
    Use libmad to decode any stream with an appropriate MIME type.
  • OGG
    Decode as OGG any stream with an appropriate MIME type.
  • PCM/BASIC
    Decode audio/basic as headerless stereo U8 PCM at 8kHz.
  • RAW AUDIO
    Decode audio/x-raw.
  • WAV
    Decode a WAV stream with an appropriate MIME type.

+ stream encoding formats
** Methods to encode streams.**

  • AVI
    (no doc)
  • EXTERNAL
    (no doc)
  • FFMPEG
    (no doc)
  • FLAC
    (no doc)
  • GSTREAMER
    (no doc)
  • MP3/LIBLAME/BUILTIN
    (no doc)
  • OGG
    (no doc)
  • SHINE
    (no doc)
  • WAV
    (no doc)
  • video converters
    Methods for converting video frames.
  • ffmpeg
    (no doc)
  • gavl
    (no doc)
  • native
    (no doc)**

From this it looks as though the stock liquidsoap shipped with Ubuntu 20.04 is equipped to decode AAC but I don’t see any encoder listed. I don’t know why.

You could explore compiling your own liquidsoap and including a AAC encoder. I have to tell you that I’ve tried that myself and I did not succeed at getting my compiled liquidsoap to work with Libretime. It’s possible that I simply was not persistent enough at ferreting out file paths and such but it was very daunting to me.

If you would like to include an audio stream with better quality than mp3 have you considered OPUS? OPUS seems to work out of the box with Libretime Alpha12.

Perhaps someone else here has succeeded at custom-compiling liquidsoap and then connecting it in as a daemon service as is required for Libretime and they can share how to do that.

I too used Airtime for about 5 years. It worked…with some issues…and my experience for the past two years is that Libretime is a lot more stable and predictable.

Hello
a big thank you for your long explanation. I have my 3 streams ok now .

For the AAC I will look at to find a solution. I must find something. (and if I find, i will come back here to share my experience and solution).

So maybe the team will add the aac in a next devel of Libretime. It would be great.

When I put a stream with opus. I see it’s connected but there is no sound.

so i thank you again. I’m happy with my 3 streams.

Regards
Patrick

I experimented a little more with this and I did get a custom compiled version of liquidsoap (v.2.0.3-1) running with Libretime which includes the needed fdkaac encoder which I thought would allow AAC streaming in Libretime.

Ogg, Opus and MP3 all work with this newer, custom compiled liquidsoap—but not AAC.

If anyone would like to play with this in a sandbox development environment and solve it—I found a very nice recipe for compiling and enabling a custom configured, newer liquidsoap here:
https://wizworks.net/setting-up-liquidsoap-for-aac-streaming/

It was just this part that is needed:

sudo apt install opam screen
opam init
opam switch create 4.10.0
opam depext taglib mad lame ffmpeg vorbis cry samplerate ocurl liquidsoap fdkaac alsa
opam install taglib mad lame ffmpeg vorbis cry samplerate ocurl liquidsoap fdkaac alsa
sudo ln -s ~/.opam/4.10.0/bin/liquidsoap /sbin/liquidsoap

It seems as though this is something in Libretime that is not allowing AAC. I tried adding AAC as a mime type to Apache but that wasn’t it. Apologies if this is covered somewhere else.