CIT already has a functioning MP3 ShoutCast-like server in the form of Darwin Streaming Server 4 (I’d like at least 5, but our Technical Service Group (TSG) has been busy with other things and hasn’t had time to install it) on quicktime.uvm.edu . But it is only "Shoutcast-Like", and seems to be missing some features of a "real" Shoutcast or Icecast installation. One can argue whether the missing features are important or not. Bottom line is, it works, it is installed and configured, it’s on a bona-fide and blessed CIT server (big old Sun box, same one housing real.uvm.edu).
Network Services can be a bigger PITA to deal with than even me. I haven’t been able to successfully get a firewall waiver from them, and I have my doubts that WRUV will be able to, either, without some UVM staff or faculty member lending their name to the application (and I wouldn’t even recommend my name, because like I said, I haven’t been able to successfully get a firewall waiver myself). So, using a CIT server can save the station a lot of fuss and bother — if they are willing to accept some compromises. Compromises such as getting something not exactly to your specification but perhaps good enough, and dealing with the 800 lump of clay that can be CIT (just big enough to be as unwieldy as an aircraft carrier, yet still understaffed to keep our 11,000+ clients happy. Ever been in our machine room? I was touring Art Students through there yesterday — there has to be 100+ servers in there, and this an upcoming administrative project is going to add another 50 or more — running a mix of AIX, SunOS, Redhat Linux ES, and Fedora Core — and we have but three functioning unix admins).
CIT (Client Service) also officially "supports" Win XP and Mac OSX, but not Linux (don’t blame me).
WRUV either has no money or mismanages what it has. But it does have a 1.25 GHz X-Serve G4 rack mounted server in the engineer’s closet, attached to a big-ass monitor, keyboard, and mouse in the broadcast booth. There is a audio line in from the board to this server via a Griffin iMic USB audio device, as rack mounted servers usually don’t have sound cards. I forget what flavor of OS X was on it, but it apparently was old and unmaintained and getting cranky, so at LJ’s request I wiped it clean recently and fresh-installed OS-X 10.3 (client, not server) and all the updates available at the time, so probably 10.3.4 or so.
OK, so OS X isn’t Linux. But it is Unix, and at the command prompt it is awful hard to tell the difference. My goal was similar to yours: to find a command-line MP3 encoding utility that I could launch during system startup and that would run happily in the background without any user intervention. I could then also launch it to run as owned by the default login user of the said Mac, thus allowing me to write a simple AppleScript interface that would have the proper permissions to relaunch the command-line utility just in case it did crash or lose contact with the streaming server.
Using a test server in my office (weasel.uvm.edu), I cobbled together three utilities. The "Enlightened Sound Daemon" (esd, found at http://www.tux.org/~ricdude/EsounD.html); the lame MP3 encoder (http://lame.sourceforge.net/); and the icecast libshout2 library (http://lame.sourceforge.net/ ).
The Enlightened Sound Daemon is launched first. It grabs the audio from (iirc) /dev/audio , and holds onto it until requested by one of its associated utilities; in particular, esdrec. esdrec outputs from the sound device’s current input. I obtained the "Darwin Ports" version of esd — one that had been hacked to run under Darwin/OS-X
Lame performs the encoding.
the icecast libshout2 library contains an example.c program that implements a simple ices-like source client that sends stuff to a designated icecast or shoutcast server.
My command line, then, after launching the esd daemon, was something like this
usr/local/bin/esdrec | /usr/local/bin/lame -b 128 - - | /usr/local/bin/wruv_ice
where wruv_ice was my version of the libshout2 example program, with various "shout_set_name", "shout_set_host" parameters hard-coded for our Darwin Streaming Server.
It took a couple of days to get this all working right — esd was a bugger (authentication model had little documentation), but by gosh, it worked like a charm: sound was streamed automatically at system boot, and the Applescript utility had a simple interface (click "Start Stream" or "Stop Stream") that any idiot DJ could use if the stream went down (or they could just reboot, if that’s what they wanted to do).
On my Mac. But the Darwin Ports version of esd does not recognize USB sound. So on the Station server, nothing happened.
That was all in early November. I spent a little time trying to find a better esd hack, but came up empty, and I put the project on the back burner.
My backup plan, if time allows and I feel like continuing, was/is to try the semi-commercial Audion 3 application (hidden at http://www.panic.com). That’s what is running now on weasel.uvm.edu, providing the source for http://www.uvm.edu/cit/wruv.pls . But, like any other similar windowed application, it requires user to fill in the blanks and click OK and probably won’t work right if it works at all launched from a command line. I hope to take a crack at running it in the background later this week, if time permits.
And yes, I’d also like to try out icecast server and shoutcast server on weasel.uvm.edu (behind firewall in my office) or badger.uvm.edu (outside firewall in machine room — one and only server there for which I have root access ) before asking TSG if they would be willing to install it somewhere. TSG is feeling a little over-extended right now