Radio Calafou

From FouWiki
Revision as of 23:20, 9 December 2020 by B01 (talk | contribs) (How To use Radio Calafou)
Jump to navigation Jump to search

Radio Calafou ?

A FM and stream radio based in Calafou that broadcast very locally on 107 Mhz and on (you can't listen to it from outside calafou, local network)

Radiocalafou anarchaserver.redim.jpg

Global set-up

Radiocalaflowschema.png The PiBox read the stream that comes from Libretime and play it to the transmitter

IMG 2919.redim.JPG

What can we do with it ?

Libretime Threw Media Builder

  • Possible to add any type of audio file, the library already include all the files that are stored in ftp://omnius.calafou/MEDIATECA/0_audio/music/ and create a playlist
  • Possible to create a smart playlist that randomly include files from the library in function of criterias (genre, album name, langage, BPM, last played, year, ...)
  • Possible to create a webstream program from any type of stream (.mp3, .ogg, .opus, ...)

Threw Calendar

  • Possible to create a show that can be repeated in different manner and can be filled with playlist, smart playlist or webstream
  • Possible to set up a live show where someone can broadcast from her home sending a stream to a specific mountpoint

Threw Master Source

  • Possible to take the control of the direct broadcast with a specific mountpoint



  • Possible to play sounds located in the Pi, to play a stream, to play the live input of the sound card
  • Possible to listen to a sonification on the output of the integrated soundcard
  • Possible to shout in the radio threw a microphone plugged into the input of the external soundcar
IMG 2916.redim.JPG

How To use Radio Calafou


SmartPhone journalism

It is possible to use Airtime with a smartphone, see

SmartPhone streaming applications

Taking the control live with a smartphone

As mentionned, it is possible to take the control of the radio with a specific mountpoint (the master source mountpoint), it is also possible with an (android) smartphone with the application "Broadcast Myself" (see before) that allow one to stream the mic of the smartphone or files

The settings > Output settings :

  • Hostname :
  • Port : 8001
  • Path : /master
  • Username : master
  • Password : master
  • MP3 Encoder Bitrate (as you wish) : 96 Kbit/s

Re-stream the output of airtime on another server

In theory, you can set up several output to an icecast server with Airtime Settings, in practive, it doesn't alway work, so you can also do :

avconv -i http://radio.calafou:8000/airtime_128.ogg -f ogg -|oggfwd -p -d "Hack The Earth" -g "Ecochonies" -u "https://calafoorg/ca/content/hack-earth-2017" 8000 ****** /hacktheearth.ogg

Hardware installation

  • Omnius server is in the hacklab
  • Pibox and the transmiter is in anarchaserver
  • The antenna is on the roof of anarchaserver

Software installation

AirTime > Libretime

Airtime is a simple, open source platform that lets you broadcast streaming radio on the web. (also see this fork :

Now we installed a Libretime (fork of Airtime)

It is installed on essun :

To install it, install dependencies :

sudo apt-get install postgresql-9.4 python-virtualenv apache2 coreutils curl ecasound flac gzip libapache2-mod-php5 libcamomile-ocaml-data liquidsoap locales lsof monit mp3gain multitail patch php5-cli php5-curl php5-gd php5-json php5-pgsql php5-fpm php-apc php-pear pwgen python rabbitmq-server silan sudo sysv-rc tar unzip vorbisgain vorbis-tools zendframework icecast2
/!\ for debian jessie, you must install postgresql-9.4 and not postgresql without -9.4 else the calendar does'nt show up /!\

Clone the repository and launch the installer :

git clone
cd Airtime
sudo ./install

Follow the configuration process, at the end, you'll see the IP adress of the pibox on wich you can connect with a browser to finish the configuration threw the proposed interface


See documentation here :

For the moment (see troubleshouting), 2 script are launched by /etc/rc.local :

/home/pi/ 2> /home/pi/streamlog.txt >/dev/null &
/home/pi/ 2> /home/pi/streamlog.txt >/dev/null & :

while true;do
 AUDIODEV=hw:0,0 play -t ogg http://radio.calafou:8000/omniussonification.ogg
 sleep 3

while true;do
 AUDIODEV=hw:1,0 play -t ogg http://radio.calafou:8000/airtime_128.ogg
 sleep 3



Libretime doesn't seems to play sound, show the media builder or eat new sounds

The 3 magic command to restart everything (you have to be logged in omnius :

sudo service airtime-media-monitor restart
sudo service airtime-liquidsoap stop
sudo service airtime-liquidsoap start
/!\ it appears that 'restart' doesn't work, liquidsoap doesn't take the modifications made in System > Streams
sudo service airtime-playout restart

also, see the logs in /var/log/airtime/

Libretime doesn't take into account the modifications made in System > Streams

Relaunching liquidsoap seems necessary :

sudo service airtime-liquidsoap stop
sudo service airtime-liquidsoap start

Test a stream configuration

liquidsoap 'output.icecast(%vorbis, host = "radio.calafou", port = 8000, user = "source" password = "hackme", mount = "liq.ogg", sine())'

Airtime doesn't alway wait for the end of the track

Don't know why ...

The master mount point 8001 can't be reached when Libretime is inside a LXC container

add these iptables rules (the container ip is

iptables -I FORWARD -p tcp -d --dport 8001 -j ACCEPT
iptables -A INPUT -p tcp --dport 8001 -j ACCEPT
iptables -t nat -A PREROUTING -p tcp --dport 8001 -j DNAT --to-destination


The tube on which I was planning to fix the antenna is about to fall !

So I used instead a solid metal piece fixed to the wall, but the antenna is only fixed in one point with plastic bracelets (colson) and 2 wires fixed to 2 solid metal points

I'm not sure it is really good on a long time perspective ...

Audio sources - web radios