miércoles, 31 de agosto de 2016

Building Liquidsoap from Source (For Airtime)



The guide of building process at Airtime's Wiki was removed, so I recovered the text from an archive and replaced Liquidsoap's Git with a legacy package as latest builds of Liquidsoap requires OCaml 4.02+, not included in Debian Jessie or Ubuntu less than 16.04 (xenial uses php7.0 so Airtime won't install via packages)

This page is necessary to add AAC+ Support to Airtime 

---------

Compilation

On Ubuntu 10.04 or newer install the following packages:
sudo 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

#backported opus 1.0+ packages from apt.sourcefabric.org
sudo apt-get install libopus-dev

#add festival dev packages for say: protocol support
sudo apt-get install festival-dev
  
#AAC encoder - only for Ubuntu versions 11.10 and up
sudo apt-get install libvo-aacenc-dev
## **** Liquidsoap must be compiled in a non-root user ! ****
rm -rf liquidsoap-full
#git clone https://github.com/savonet/liquidsoap-full
# Replaced Git to Liquidsoap 1.1.1 sources
wget http://downloads.sourceforge.net/project/savonet/liquidsoap/1.1.1/liquidsoap-1.1.1-full.tar.gz
tar -xvf liquidsoap-1.1.1-full.tar.gz
#cd liquidsoap-full
cd liquidsoap-1.1.1-full
#make init
#make update

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

#Also enable ocaml-opus after installing backported dev packages
sed -i "s/#ocaml-opus/ocaml-opus/g" PACKAGES

#ocaml-voaacenc is not available on Lucid
sed -i "s/#ocaml-voaacenc/ocaml-voaacenc/g" PACKAGES

#AAC+ support full instructions here: https://wiki.sourcefabric.org/x/NgPQ
#Remove the hash '#' symbol from the following line to enable AAC+ 
#sed -i "s/#ocaml-fdkaac/ocaml-fdkaac/g" PACKAGES


./bootstrap
./configure
make

Create source package

  cd..
  cp -r liquidsoap-full/ /tmp/
  cd /tmp/liquidsoap-full/
  rm -rf .git .gitignore .gitmodules
  cd ..
  tar -czf liquidsoap-1.1.1.tar.gz liquidsoap-full/

Installation

The compiled liquidsoap binary will now be present in liquidsoap-full/liquidsoap/src
On Airtime 2.3 and lower, run

sudo service airtime-liquidsoap stop
sudo cp liquidsoap-full/liquidsoap/src/liquidsoap /usr/bin/liquidsoap
sudo service airtime-liquidsoap start 


On Airtime 2.4 and higher, run

sudo service airtime-liquidsoap stop-with-monit
sudo cp liquidsoap-full/liquidsoap/src/liquidsoap /usr/bin/liquidsoap
sudo service airtime-liquidsoap start-with-monit 
Your new Liquidsoap installation is now done!

Testing

To test Icecast:

cd liquidsoap/src
./liquidsoap 'output.icecast(%vorbis, mount="test.ogg", sine())'
mplayer http://localhost:8000/test.ogg

To test direct soundcard output:

cd liquidsoap/src
./liquidsoap 'output.ao(sine())'

In both of the options above, you should hear a constant buzzing noise that is generated by the input sine wave.


No hay comentarios:

Publicar un comentario