MP3 streaming from OSX, and stuff

So let's say, just for the sake of argument, that I was thinking about switching to a Mac Mini or something for the DNA audio streams. What software would I use?

Right now I'm running Icecast 2.2.0, and I get audio into it by using the Perl "Shout" library. The MP3 bits come from one of two places:

  • When the club isn't open, the audio just comes out of mp3 files on disk. This part's easy.
  • When we're open, the audio comes from the sound card via "arecord -q -f cd | lame ..."

So I could continue just using Icecast 2.2.0 (it's somewhat of a pain in the ass, but I'm familiar with its failings by now), but what's the OSX replacement for that "arecord" command? I've googled up a few recipes that involve installing esound, but there's just no fuckin' way that's the sane answer.

Nicecast ($40) looks nice and simple, but I don't think it does what I need: it doesn't seem to be non-interactive enough. In particular, I need to switch back and forth between "live" and "archive" from cron.

Though, you know, I'm not sure anyone actually cares about that... Right now the live streams (and by extension, the Real stream) re-broadcast audio from the saved archives during the day when we're not open. I guess I could just give up on that and have them be silent during the day, and assume that people who want to listen to the archives will do so explicitly.


Also: does a MacOS version of RealProducer even exist any more? I can't tell what all this "Helix" nonsense is about, but it looks like it all stopped in 2004. (Please note, I'm talking about RealProducer, not RealServer: Producer is the software that reads from the video card, encodes video, and sends a single stream up to RealServer for re-broadcast.)

(And before you ask, switching from Real to Quicktime is not an option, because GrooveFactory, the folks who are generously donating video bandwidth and re-broadcasting to us, only do Real, not QT.)

[ LJ Poll 720645 ]

Tags: , , , , ,

13 Responses:

  1. weirdbitch says:

    if i'm correct, the QT server which is enclosed in Darwin works with all kind of different streams. For the servers sake you could use the windows platform to encode and a mac (mini) for distribution.
    there are links on that page to the open source version also, as well as the technical library.

    the real-codec on mac is kind of sh1tty at this point. I still use the producer on os 9 (works in classic mode). maybe more on ?

    good luck,

  2. valentwine says:

    I've had pretty good experience using DarkIce to capture and encode live audio. It would replace your whole arecord piped to lame command line in one binary and send the audio directly on to icecast. It supports both Linux and OS X, though I have yet to use it on OS X. It links agains the Jack audio library on OS X, so you'll need that, which is thankfully a sane .pkg install.

    FWIW, I help maintain the late Gene Kan's Litestream mp3 streaming server, which is significantly simpler, smaller and more stable than icecast. In the places I use it, the stream generally stays up as long as the computer it's running on does. We haven't updated it in a good long while, mostly because it works well and is dead simple to compile. No external dependencies, just a handful of C files and one Makefile. You might hate it less than icecast.

  3. crackmonkey says:

    Quick and dirty app. The best integration you'll get is through AppleScript. So far, looks worse than the other options on here, but it might be a decent fallback.

  4. bluknight says:

    Having used NiceCast a lot previously, I'm a big fan of it. Works great, and if you're running iTunes, or something else to manage a backend DB of previous shows, you can stream out of it pretty well. I don't think you can auto-script switching between live and archive mode, but my thought on the matter (and I'm not running a club, so I'm automatically WRONG) would be you would WANT manual switching, lest you have dead air on times you don't want it. Otherwise, I think with a small bit of work, you can script some auto-switching. Might be worth your time to ask the Nicecast developers.

  5. grahams says:

    It looks like NiceCast has some AppleScript (ugh) hooks to do stuff like starting and stopping, which you can invoke via cron using the 'osascript' binary. I hate AppleScript too, but it seems that tolerating some of it is unfortunately necessary in OSX-land.

    start archiving v : Starts the audio archiver

    start broadcast v : Starts the broadcast

    stop archiving v : Stops the audio archiver

    stop broadcast v : Stops the broadcast

    application n [inh. item; see also Standard Suite] : Nicecast's top level scripting object.
    archiving (boolean, r/o) : State of the audio archiver
    broadcasting (boolean, r/o) : State of the broadcast
    recent track titles (list, r/o) : List of recently broadcasted tracks (if avaliable)
    track title (Unicode text, r/o) : Name of current track broadcasting (if avaliable)

    • bluknight says:

      Do the AppleScript hooks support input switching, however... Say, line-level input versus iTunes DB versus whatever else?

      • jkow says:

        Why not run two processes of NiceCast, one using the archive as input, the other using line-in. Applescript be used to de/activate either one.

        • bluknight says:

          That would work, as long as you can specify config files on the command line so that you aren't having to do wierd, on-the-fly shit.

  6. loosechanj says:

    I've googled up a few recipes that involve installing esound, but there's just no fuckin' way that's the sane answer.

    This should be the quote on the xmms page.

    • grumpy_sysadmin says:

      And tattooed on the inside of the eyeballs of anyone writing audio software for any open source-esque OS anywhere ever.

      • grumpy_sysadmin says:

        Um, I meant the inside of their eyelids. But, really, I'm okay with tattooing the inside of their eyeballs too when it comes down to it.

  7. evan says:

    Now that you're an OS X programming wizard, a new hobby project that isn't a screensaver just landed in your lap.