Developers Blog

Blog > News of the week - 14

on Apr 06, 2013

A Tryphon week is full of “small” news, let’s try to make a week post :

Darkice

We submitted two patchs to the Darkice project. The first fixes a problem with AAC/AAC+ encoders and the other, a header problem with ShoutCast 2.

The two patches are integrated in Darkice SVN. And Darkice 1.2svn+509 debian package is now available on Tryphon debian repository.

The next releases of StreamBox, StageBox and LinkBox will integrate this Darkice release.

Rivendell

2.4.0 … 2.5.0

Packages 2.4.0-1 are available for test, but Fred released Rivendell 2.5.0 this week. We’re working to upgrade the debian/ubuntu packages. To prepare this release, a new Debian/Ubuntu packages wiki page has been initiated.

Export week report

We have setup with Pascal Vandel from RUN this small script (rivendell-export-srt) to create a csv file containing the “last week” report. rdcatch executes the associated macro each monday night (1AM) to export information of the previous week :

#!/bin/bash

week_of_year=$[`date +%V`-1]

query_file=`mktemp`
cat > $query_file <<EOF
select * INTO OUTFILE '/home/radio/diffusion-semaine-$week_of_year.csv'
 FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\\\' LINES TERMINATED BY '\n' 
from Production_SRT 
where EVENT_DATETIME BETWEEN adddate(curdate(), INTERVAL 2-DAYOFWEEK(curdate()) DAY) 
 and adddate(curdate(), INTERVAL 9-DAYOFWEEK(curdate()) DAY);
EOF

cat $query_file | mysql -u rduser -pletmein Rivendell

You need to add a special permission to mysql user rduser. Something like :

grant file on Rivendell.* to rduser@localhost;

Check the target direction permissions too.

FileWrite

Rivendell includes a Now&Next filewrite module (rlm_filewrite.rlm). It creates/updates/appends a file when rdairplay starts a new cart. We replaced on RUN Rivendell a RN macro by the module (to avoid shell syntax problem).

Here is the filewrite.conf we created :

[File1]
Filename=/tmp/playing.txt
Append=0
FormatString=%t - %a\n

MasterLog=Yes
Aux1Log=Yes
Aux2Log=Yes

You just have to select the rlm_filewrite.rlm module in RdAirPlay admin and specify the configuration filename as argument.

A more completed example file can be found in Rivendell code (or into /usr/share/doc/rivendell/examples/conf/rlm_filewrite.conf in debian/ubuntu packages).

AudioBank

New AudioBank tag selection

A new release AudioBank is about to be released. Several changes will be available like this new user or tag selection :

The AudioBank API will evole too. We release a new gem audiobank-client which provides a command-line and ruby client to AudioBank API.

A simple line will create AudioBank document, upload audio file and confirm the upload (for each specified file).

We’ll certainly add a DropBox mode to upload automatically files added a given directory (the way we used it).

UserVoice widget

Many of our Rails applications use UserVoice. We released a small Rails engine uservoice-widget to integrate the javascript code.

PlayBox

The version playbox-20130217-1506 has been released.

Several changes but the main one is the Console integration. PlayBox owners can see the current status of their boxes :

PlayBox status in Tryphon Console