AAC+ FAQ update
  • Vote Up1Vote Down VerheekVerheek
    Posts: 158Member
    Re: How do I add an AAC stream?

    http://wiki.sourcefabric.org/display/CC/FAQ+and+Support

    For version 1.8.2 I made these path corrections:

    Original:
    Quote:
    Go to ~/airtime/pypo/liquidsoap/ and backup liquidsoap32.

    Copy the newly compiled liquidsoap from liquidsoap/src to ~/airtime/pypo/liquidsoap/liquidsoap32

    Then I modified my ~/airtime/pypo/scripts/ls_config.liq where it shows "###". Remove the "###" for it to work.

    Then add the following to the end of ~/airtime/pypo/scripts/ls_scripts.liq:


    Update:
    Quote:
    Go to ~/airtime/python_apps/pypo/liquidsoap/ and backup liquidsoap32 (or liquidsoap64 on a 64bit install).

    Copy the newly compiled liquidsoap from ~/savonet/liquidsoap/src to ~/airtime/python_apps/pypo/liquidsoap/liquidsoap32 (or liquidsoap64 on a 64bit install).

    Then I modified my ~/airtime/python_apps/pypo/scripts/ls_scripts.liq where it shows "###". Remove the "###" for it to work.

    Then add the following to the end of ~/airtime/python_apps/pypo/scripts/ls_scripts.liq:


    Hope I caught everything.
  • 27 Comments sorted by
  • You can run 

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

    and see what error messages appear.
    Airtime Pro Hosting: http://airtime.pro
  • Ah ok,

    I thought you already replaced the Airtime Liquidsoap with your own version. Yes you need to do that, since we didn't compile AAC support into our Liquidsoap.

    Simply overwrite /usr/lib/airtime/pypo/bin/liquidsoap_bin/liquidsoap with your custom version.
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up1Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    I'm reading it

    a little thing

    music = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/users/music")
    jingles = playlist(mode='randomize',reload=1,reload_mode="rounds", "/srv/users/jingles/")
    default = rotate(weights=[1,5], [jingles, music])

    randomize and round are better than random (cf liquidsoap wiki)

    and you can do :

    jingles = playlist(mode='randomize',reload=1,reload_mode="rounds", "/home/server/muzyka/jingles")
    music_zaiks = playlist(mode='randomize',reload=1,reload_mode="rounds" "/home/server/muzyka/zaiks")
    music_cc = playlist(mode='randomize',reload=1,reload_mode="rounds" "/home/server/muzyka/cc")

    default_zaiks_cc = rotate(weights=[1,3,1,3], [jingles, music_zaiks, jingles, music_cc])
    Post edited by Albert FR at 2011-11-17 05:35:29
  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    Thanks! I've updated the wiki.


    Post edited by Jakub Górnicki at 2011-11-17 07:07:00
  • Hello!
    I have tried this but that does not work. I done this in that way:
    I have tested by command ./liquidsoap 'output.icecast(%aac+, mount="test.aacp", sine())'
    And it is working!

    2. I made entry in /etc/airtime/liquidsoap.cfg
    mount_point_aacplus = "airtime.aacp"
    output_icecast_aacplus = true

    3. Entry in /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq
    And here I'm not sure if I did it correctly

    if output_icecast_aacplus then

        ignore(output.icecast(%aac+,
                encoding = "UTF-8",
                host = icecast_host,
                port = icecast_port,
                password = icecast_pass,
                mount = mount_point_mp3,
                fallible = true,
                restart = true,
                restart_delay = 5,
                url = icecast_url,
                description = icecast_description,
                genre = icecast_genre,
                s)
            )
    end
    ------------------------------------------------------------------------------------------------------------------------------------------------------
    So It's look ok, but don't work. Any idea?
    Post edited by krzakx at 2011-11-16 19:10:46
  • Your mount should use the "mount_point_aacplus" variable.
    Post edited by Martin Konecny at 2011-11-16 19:12:40
    Airtime Pro Hosting: http://airtime.pro
  • aaa... yeap! I just discover it too...
    But it still do not work.

    There was script to check ls_script.liq how to run it?
  • And everything is clear 
    krzakx@krzakx:~/savonet/liquidsoap/src$ sudo -u pypo /usr/lib/airtime/pypo/bin/airtime-liquidsoap
    Invalid value at line 78, char 27-31: No encoder found for that format.
    krzakx@krzakx:~/savonet/liquidsoap/src$ sudo gedit /usr/lib/airtime/pypo/bin/liquidsoap_scripts/ls_script.liq 

    But why ./liquidsoap 'output.icecast(%aac+, mount="test.aacp", sine())'  is working?

    The problem is with compiled liquidsoap?
  • Let us know if it works, I have a feeling that even though Liquidsoap will play it, we may need to change Airtime to allow an extensions other than mp3/ogg. 
    Post edited by Martin Konecny at 2011-11-16 21:06:42
    Airtime Pro Hosting: http://airtime.pro
  • eh...
    I do not understand

    krzakx@krzakx:/usr/lib/airtime/pypo/bin$ sudo -u pypo /usr/lib/airtime/pypo/bin/airtime-liquidsoap
    At /usr/lib/airtime/pypo/bin/liquidsoap_scripts/library/shoutcast.liq, line 41, char 20:
      cannot apply that parameter because the function
      (at /usr/lib/airtime/pypo/bin/liquidsoap_scripts/library/shoutcast.liq, line 36, char 17)
      has no argument labeled "restart"!
    krzakx@krzakx:/usr/lib/airtime/pypo/bin$ 

    I do not have active Shoutcast, I am using only Icecast
    eh... is so difficult.
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    check your ls_script.liq
    some errors inside
  • eh.... it seems OK for me. Please check http://wklej.org/id/629231/

  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    but effectively is not for a switching system ;)
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    what said
    /usr/lib/airtime/pypo/bin/airtime-liquidsoap
  • krzakx@krzakx:/usr/lib/airtime/pypo/bin$ /usr/lib/airtime/pypo/bin/airtime-liquidsoap
    Line 2, char 39: cannot %include, file "/etc/airtime/liquidsoap.cfg" doesn't exist.

    and....

    sudo cat /etc/airtime/liquidsoap.cfg
    [sudo] password for krzakx: 
    ###########################################
    # Liquidsoap config file                  #
    ###########################################

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


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

    ###########################################
    # Icecast Stream settings                 #
    ###########################################
    icecast_host = "127.0.0.1"
    icecast_port = 8000
    icecast_pass = "hackme"
    # Icecast mountpoint names
    mount_point_mp3 = "airtime.mp3"
    mount_point_aacplus = "airtime.aacp"
    mount_point_vorbis = "airtime.ogg"

    # Webstream metadata settings
    icecast_description = "Airtime Radio!"
    icecast_genre = "genre"

    # 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 = "127.0.0.1"
    #shoutcast_pass = "testing"

    # Webstream metadata settings

    Everything I am doing on my laptop for a test reasons.
    Post edited by krzakx at 2011-11-17 06:16:29
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    humm...

    the first thing to do :

    change
    #output_shoutcast = false

    into
    output_shoutcast = false

    and how do you install your last airtime ?
    mannually ? or by apt-get ?
    You have recompiled liquidsoap for AAC support, but have you replaced the old one ?
    Post edited by Albert FR at 2011-11-17 06:20:47
  • 1. Done now is output_shoutcast = false  (it was before like this, but I have tried many options and I hashed it)

    2. Last AirTime is from repo by apt-get

    3.yeap, a copy new compiled liquidsoap with AAC package to /usr/lib/airtime/pypo/bin/liquidsoap_bin and from here I can do this ./liquidsoap 'output.icecast(%aac+, mount="test.aacp", sine())'
    And it's work!

    Albert FR I am making new system admin user for you :) on server that will be quicker.
    Also please take look in randomize and round are better than random (cf liquidsoap wiki), becasue I have do in this way and.... not working.

  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    krzakx
    that's really strange because randomize and round work really for my servers ...
    Ok for admin user
    I'll looking that this evening


  • By the way, the latest stable LS (1.0.0) seems really doesn't have restart and restart_delay option in output.icecast(...)


    Check output.icecast(...)

    i was fighting this for some days before i got it work.
    Post edited by Romeo at 2011-11-17 09:32:30
  • Yes Romeo is right, you will have to remove the restart and restart_delay parameters. Everywhere from the code. After that it should work.


    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    Martin, Romeo we are agree with the fact that's only work/bug with 1.0.0 and not 1.0 beta2 (available on ubuntu LTS /debian 6) ?
    isn't it ?
    Post edited by Albert FR at 2011-11-17 10:59:27
  • It's not a bug for 1.0, it's just that there were some changes to the Liquidsoap API, and restart, restart_delay aren't required anymore.
    Airtime Pro Hosting: http://airtime.pro
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    for 1.0.0 (stable) then
    and not for 1.0 beta2 (ubuntu 10.04 LTS / debian 6) or 1.0 beta3 (ubuntu 11.04 & 11.10)

    do you plan to distribute an liquidsoap up of date with airtime in a near future (debian/ubuntu package) ?

    krzakx
    , is good for you now ?

  • Vote Up0Vote Down Paul BaranowskiPaul Baranowski
    Posts: 389Member, Administrator, Sourcefabric Team
    "do you plan to distribute an liquidsoap up of date with airtime in a near future (debian/ubuntu package) ?"

    Yes :)
  • Vote Up0Vote Down Albert FRAlbert FR
    Posts: 1,978Member, Airtime Moderator
    that's a really good news !!!
  • Hello everyone again!
    How was the holiday season? At this free time I was little work around the ACC+ support and... I still don't get this working.
    By the way after after returning to this topic, it is hard to find me because system of points/votecomments destroyed posts chronological. Is there any solutions to disabled it?

    Back to ACC+
    I have done every steps one more time on another fresh Ubuntu machine.
    1.Installed AirTime from repo.

    2. Build LiquidSoap like here https://wiki.sourcefabric.org/display/CC/Building+Liquidsoap+from+Mercurial with ACC+ PACKAGE.
    And tested it ./liquidsoap 'output.icecast(%aac+, mount="test.aacp", sine())' .It's working.

    3.I had overwrite /usr/lib/airtime/pypo/bin/liquidsoap_bin/liquidsoap with my custom version.
    And removed from everywhere in code restart and restart_delay parameters

    And it doesn't work :(

    krzakx@krzakx-laptop:~/savonet/liquidsoap/src$ sudo -u pypo /usr/lib/airtime/pypo/bin/airtime-liquidsoap
    At line 54, char 23: the variable output.alsa used here has not been
      previously defined.

    EDIT!
    I get it workin! I hashed the parameters connected with alsa device in liquadsoap.cfg and ls_script.liq. And now is working, but for what are these parameters? And can they be hashed?


    Fisrt attached file is broken.

    Post edited by krzakx at 2011-12-27 03:16:55
  • Glad to hear it's working.

    I have not played with this since 1.8.2 so I can't comment.  I did try experimenting in 2.x.x but found that more work was needed as the settings were made in the web browser and one of these needed to be modified to accept AAC+.

    Jeremy