This is what I use at several stations. This script runs on a box running an icecast server fed with darkice instances, one for each station to be airchecked. A copy of this script is customized for each station and launched at the top of each hour by cron. It works very well.

At one station I am recording 384 kbps mp2 so the recordings can be used for rebroadcast.


#!/usr/bin/perl

# ==>   AIRCHECK SCRIPT


sub log {
  my $a = shift;
  my $time = localtime(time);
  if (open (LOG,">>$LOG")) {
    print (LOG "$time: $a\n");
    close LOG;
  }
}


sub purge {
  my $a = '';
  my @stat = ();
  my $ptime = time - 86400 * $RETAIN;
  if (opendir (ROOT,$ROOT)) {
    while ($a = readdir ROOT) {
      @stat = stat("$ROOT/$a");
      if ($stat[9] < $ptime) {
        if (system("rm -rf $ROOT/$a")) {
          &log("FAILED: rm -rf $ROOT/$a");
        } else {
          &log("$ROOT/$a purged");
        }
      }
    }
    closedir ROOT;
  }
}


# ==>   MAIN PROGRAM

@MON = ('jan','feb','mar','apr','may','jun','jul','aug','sep',
'oct','nov','dec');
@DAY = ('sun','mon','tue','wed','thu','fri','sat','sun');
@HOUR = ('12mid','1am','2am','3am','4am','5am','6am','7am','8am',
'9am','10am','11am','12noon','1pm','2pm','3pm','4pm','5pm','6pm',
'7pm','8pm','9pm','10pm','11pm');
$ROOT = '/var/aircheck/wbyy';   # where the airchecks are stored
$RETAIN = 120;                  # retain for 120 days then delete
$LOG = '/var/aircheck/wbyy.aircheck.log';       # location of log
$PERIOD = 3600; # 1 hour        # airchecks are 1 hour segments
$URL = "http://localhost:8000/wbyy.ogg";;      # stream to capture

if ($a = fork) {
  $count = 0;
  while ($count < $PERIOD) {
    $count++;
    sleep 1;
  }
  kill 9,$a;
  wait();
  print "exiting\n";
} else {
  &purge;
  @time = localtime(time);
  $wday = $DAY[$time[6]];
  $year = 1900 + $time[5];
  $mon = $MON[$time[4]];
  $day = $time[3];
  $hour = $HOUR[$time[2]];
  $dir = "$ROOT/$wday\_$mon\_$day\_$year";
  if (! (-d $dir)) {system("mkdir $dir")}
  exec("wget $URL -O $dir/$hour.ogg");
}





On Fri, 9 Nov 2012, Alessio Elmi wrote:

As we are little bit off topic..
I was looking for something similar to Rotter - easier in a sort of
way - which simply dump a mp3 streaming (no need of encoding, just
dump our webradio) into a specific folder and removes older files.
I was thinking about using command-line VLC, something like adding in
/etc/crontab an every-hour script.
Do you think it would be trustable?

2012/11/8 Nathan Steele <[email protected]>:
That helps immensely,

Thank you,

Nathaniel C. Steele
Assistant Chief Engineer/Technical Director
WTRM-FM / TheCrossFM

On 11/8/2012 4:48 PM, Wayne Merricks wrote:

Hi,

You can run multiple rotters on different jack ports.  The standard set up
is something like:

ROTFORMAT="mp3" #Encoding format
ROTBITRATE=192 #Bit rate
ROTCHANNELS=2 #2 = Stereo
JACKNAME="rotter1"
ROTDELETEHOURS=2400 #Delete audio after x hours (2400 = 100 days)
ROTBUFFER=10 #Rotter internal buffer, increase if you have problems
ROTDIRSTRUCTURE="dailydir" #Organisation format man rotter for more info
LEFTJACKINPUT="system:capture_1" #Left Channel for rotter to connect to in
the format of client:port
RIGHTJACKINPUT="system:capture_2" #Right Channel for rotter
ROTAUDIODIR="/var/audio" #Directory to store audio

rotter -f $ROTFORMAT -b $ROTBITRATE -c $ROTCHANNELS -n $JACKNAME -d
$ROTDELETEHOURS -R $ROTBUFFER -L $ROTDIRSTRUCTURE -v -l $LEFTJACKINPUT -r
$RIGHTJACKINPUT $ROTAUDIODIR

Obviously if you're running two change JACKNAME, [L & R]JACKINPUT and
ROTAUDIODIR.

Out of all the random software I've ever used rotter has been the only thing
thats never crashed on me in over a year of use (liquidsoap is nearly at
2months of uptime which is my next most reliable excluding riv of course).

Hope this helps,

Wayne

-----Original Message-----
From: [email protected] on behalf of Nathan
Steele
Sent: Thu 08/11/2012 21:15
To: User discussion about the Rivendell Radio Automation System
Subject: Re: [RDD] OT: Rotter question

Yeah, that could work.

The stations are stereo, but I only need mono for logging purposes. well
I guess I'll have to try.

Nathaniel C. Steele
Assistant Chief Engineer/Technical Director
WTRM-FM / TheCrossFM

On 11/8/2012 4:13 PM, Fernando Della Torre wrote:

If you need 2 mono stations, why don't you simply record it to a
single stereo stream? One station per channel.

I never tried, but I think you can run multiple instances of rotter in
the same jack server.



Atenciosamente,

*Fernando Della Torre*

Tecnologia da Informação

(: +55 16 8137-1240

(: +55 16 9137-2886

*: [email protected] <mailto:[email protected]>_

V.D.I.T. Soluções em Virtualização

A utilização deste e-mail não implica em autorização ou outorga de
poderes para seu usuário praticar qualquer ato em nome das empresas
citadas, cuja representação considera-se válida se praticada
exclusivamente por representante legal ou procurador devidamente
constituído, na forma estabelecida em seu respectivo estatuto ou
contrato social




2012/11/8 Nathan Steele <[email protected]
<mailto:[email protected]>>

    Can I run two instances of rotter at the same time connected to
    different inputs in jack?

    I haven't delved into jack at all either......

    Thanks for the input. I may just have to try it, but don't want it
    to be  total waste of time if someone knows it wont work. I'd
    really like to use one box for both stations.

    Nathaniel C. Steele
    Assistant Chief Engineer/Technical Director
    WTRM-FM / TheCrossFM

    On 11/8/2012 2:18 PM, Robert Orr wrote:

    I'm not sure about two stations.
    Mono is easy use -c1
    Here's my statement (I think it just uses lame parameters man lame)

    rotter -a -f mp3 -d672 -j -b96 -L flat -c1 /var/archives
    Robert


    On Thu, Nov 8, 2012 at 11:22 AM, Nathan Steele
    <[email protected]
    <mailto:[email protected]>> wrote:

        I know some of you use rotter to log your ouput so I was
        wondering if
        anyone knows if I have an audio card with multiple (stereo)
        inputs can I
        record the ouput of two stations simultaneously? Also does it
        support
        recording to a mono file to save drivespace? I can't seem to
        find much
        info on it, other than it uses jack to connect.

        --
        Nathaniel C. Steele
        Assistant Chief Engineer/Technical Director
        WTRM-FM / TheCrossFM

        _______________________________________________
        Rivendell-dev mailing list
        [email protected]
        <mailto:[email protected]>
        http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev




    _______________________________________________
    Rivendell-dev mailing list
    [email protected]
<mailto:[email protected]>
    http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev

    _______________________________________________
    Rivendell-dev mailing list
    [email protected]
    <mailto:[email protected]>
    http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev




_______________________________________________
Rivendell-dev mailing list
[email protected]
http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev



#######################
Scanned by MailMarshal
#######################

############

Attention:

The information contained in this message is confidential and intended
for the addressee(s) only. If you have received this message in error
or there are any problems, please notify the originator immediately.
The unauthorised use, disclosure, copying or alteration of this message
is strictly forbidden. Christian Vision or any of its subsidiaries will
not be liable for direct, special, indirect or consequential damages
arising from alteration of the contents of this message by a third party
or as a result of any virus being passed on. Please note that we reserve
the right to monitor and read any e-mails sent or received by the
company under the Telecommunications (Lawful Business Practice)
(Interception of Communications) Regulation 2000. Christian Vision is
registered in England as a limited company 2842414 and as a charity
1031031

############



_______________________________________________
Rivendell-dev mailing list
[email protected]
http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev



_______________________________________________
Rivendell-dev mailing list
[email protected]
http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev

_______________________________________________
Rivendell-dev mailing list
[email protected]
http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev
_______________________________________________
Rivendell-dev mailing list
[email protected]
http://lists.rivendellaudio.org/mailman/listinfo/rivendell-dev

Reply via email to