savonet / liquidsoap-full

[DEPRECATED] Former main repository with all in-house bindings
GNU General Public License v2.0
49 stars 22 forks source link

LiquidSoap 1.1.1 on Ubuntu 14.04 LTS #11

Closed clarkerz closed 8 years ago

clarkerz commented 10 years ago

Firstly, I have only just learnt of LiquidSoap (OK, where have been hiding, I know) and have been streaming separate streams for Severn FM since 2011 which I now found to be a very inefficient way of streaming my hobby radio station. I installed Liquidsoap last week and had it running a treat on my VPS.net test machine and it integrated well with my Icecast2 server (2.3.3). The internal AAC worked well although it sounded a little "mushy" at 64Kbs so I have tried to configure either the internal AAC+ encoder and then FDK-AAC. I've given up for now as I've tried installing FDK-AAC and LiquidSoap using different methods (compiling etc) and have just trashed the machine so it's back to a clean install of Ubuntu 14.04 LTS and ICecast2.3.3 until I can do this properly. I do have full root access on the VPS.

Any help would be greatly appreciated in getting LiquidSoap 1.1.1 to work with the FDK-AAC encoder for AAC+.

Thanks in advance.

Clarkerz

clarkerz commented 9 years ago

Have spent all weekend try again..but have finally given up...Looks like it's mp3 only for me :(

bradisbell commented 9 years ago

@clarkerz The problem is that libfdk-aac is no longer maintained so it isn't in the package manager anymore.

Here's my script for provisioning a new Ubuntu 14.04 LTS box with several codecs. You may need to add more to this. Just check your PACKAGES file for more.

#!/usr/bin/env bash

apt-get update

apt-get -y --force-yes install \
  git-core \
  ocaml-findlib \
  libao-ocaml-dev \
  libportaudio-ocaml-dev \
  libmad-ocaml-dev \
  libtaglib-ocaml-dev \
  libalsa-ocaml-dev \
  libvorbis-ocaml-dev \
  libladspa-ocaml-dev \
  libxmlplaylist-ocaml-dev \
  libflac-dev libxml-dom-perl \
  libxml-dom-xpath-perl \
  patch \
  autoconf \
  libmp3lame-dev \
  libcamomile-ocaml-dev \
  libcamlimages-ocaml-dev \
  libtool \
  libpulse-dev \
  camlidl \
  libfaad-dev \
  libpcre-ocaml-dev \
  libopus-dev \
  festival-dev \
  libvo-aacenc-dev \

cd /tmp
wget https://launchpad.net/ubuntu/+archive/primary/+files/libfdk-aac0_0.1.2-1_amd64.deb
dpkg -i libfdk-aac0_0.1.2-1_amd64.deb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libfdk-aac-dev_0.1.2-1_amd64.deb
dpkg -i libfdk-aac-dev_0.1.2-1_amd64.deb

## Liquidsoap
su vagrant << EOF
cd /tmp
git clone https://github.com/savonet/liquidsoap-full
cd liquidsoap-full
make init
cp PACKAGES.minimal PACKAGES
sed -i "s/#ocaml-portaudio/ocaml-portaudio/g" PACKAGES
sed -i "s/#ocaml-alsa/ocaml-alsa/g" PACKAGES
sed -i "s/#ocaml-pulseaudio/ocaml-pulseaudio/g" PACKAGES
sed -i "s/#ocaml-faad/ocaml-faad/g" PACKAGES
sed -i "s/#ocaml-opus/ocaml-opus/g" PACKAGES
sed -i "s/#ocaml-voaacenc/ocaml-voaacenc/g" PACKAGES
sed -i "s/#ocaml-fdkaac/ocaml-fdkaac/g" PACKAGES
./bootstrap
./configure
make
EOF

cd /tmp/liquidsoap-full
make install

mkdir /var/log/liquidsoap
chmod 777 /var/log/liquidsoap
clarkerz commented 9 years ago

Hi bradisbell ,

Thanks so much for this. I am going to do a clean install of Ubuntu and then I'll give this a go.

Thanks again,

CLarkerz

clarkerz commented 9 years ago

Hi bradisbell, It all seemed to install OK with no errors.

I was trying to run it as a service which I could under root before but bow I need to login as another user and then type the full command. Does fdkaac support aac+. Is there a way to run as a service on boot?

Thanks for sorting this out for me though!!

Cheers

Clarkerz

bradisbell commented 9 years ago

I was trying to run it as a service which I could under root before but bow I need to login as another user and then type the full command.

You should be able to run:

sudo service liquidsoap start

There should be an /etc/liquidsoap directory with all of your .liq config files. The default init.d script will run them. I have had issues with restarting using the default init.d script. You can either find a new script to replace that one, write your own, or skip using it at all. In any case, if it isn't already running on startup, adding it is just like any other script. Check this out: http://superuser.com/questions/449805/init-d-script-not-running-on-startup

Does fdkaac support aac+.

It does. Try something like this:

encoder_heaac_64k = %fdkaac(channels=2, samplerate=44100, bitrate=64, aot="mpeg2_he_aac_v2", transmux="adts")
clarkerz commented 9 years ago

Thanks - I got it going with this:

%fdkaac(channels=2, samplerate=44100, bitrate=64, afterburner=false, aot="mpeg4_he_aac_v2", transmux="adts", sbr_mode=false),

although it says audio/aac in my icecast stream but it sounds bloody good!! :)

There is something weird with the directory structure on this new install. My old install had a /etc/liquidsoap and /etc/init.d/liquidsoap directories however the new install has put the .liq config files into /usr/local/etc/liquidsoap and there is no liquidsoap script in /etc/init.d.

Just noticed the binary isn't in /usr/bin but in /usr/local/bin instead. Not sure why? I'll continue "playing"...Thanks for all the advice!

Clarkerz

clarkerz commented 9 years ago

got it sorted... ! :)

typed make -service install which copied over the script to /etc/init.d the var log and run are in /etc/local/ and I couldn't get the init.d script to work with liquidsoap user but I've got it going using this as the binary is in the local/bin as well:

user=clarkerz group=sudo prefix=/usr/local exec_prefix=${prefix} confdir=/etc/liquidsoap liquidsoap=${exec_prefix}/bin/liquidsoap rundir=${prefix}/var/run/liquidsoap

onykage commented 8 years ago

Hi

Using Ubuntu 14.04lts

check here. https://github.com/savonet/liquidsoap-full/issues/15

using opam seems to fix it.