jwz - MP3 streaming from OSX, and stuff [entries|archive|friends|userinfo]
jwz

  www.jwz.org
  userinfo
  archive
  rss

Links
[»| [DNA Lounge] [Blog] [iCal] ]
[»| [DNA Lounge Legal Defense Fund] ]
[»| [WebCollage] [LJ WebCollage] ]

MP3 streaming from OSX, and stuff [Mon, 1-May-2006 2:54 PM]
Previous Entry Add to Memories Tell a Friend Next Entry
[Tags|, , , , ]
[music |Echo and the Bunnymen -- Happy Death Men]

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.

Suggestions?

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.)

Poll #720645 dna media
This poll is closed.
Open to: All, detailed results viewable to: All, participants: 50

Audio:

View Answers

I listen to the "live" MP3 streams when the club is open.
33 (71.7%)

I listen to the "live" MP3 streams when the club is closed.
25 (54.3%)

I intentionally listen to the 96kbps live MP3 stream.
18 (39.1%)

I intentionally listen to the 64kbps live MP3 stream.
2 (4.3%)

I intentionally listen to the 32kbps live MP3 stream.
0 (0.0%)

I intentionally listen to the 24kbps live MP3 stream.
2 (4.3%)

Video:

View Answers

I watch the 30 second JPEG slideshow.
20 (54.1%)

I watch the RealVideo stream when the club is open.
24 (64.9%)

I watch the RealVideo stream when the club is closed.
6 (16.2%)

I care about the audio on the RealVideo stream when the club is closed, and would be annoyed if it was silent then.
4 (10.8%)

linkReply

Comments:
From: [info]weirdbitch
Mon, 1-May-2006 10:10 PM (UTC)

(Link)

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.

http://www.apple.com/quicktime/streamingserver/
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 sf.net ?

good luck,
bauke
[User Picture]From: [info]valentwine
Mon, 1-May-2006 10:11 PM (UTC)

(Link)

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.
[User Picture]From: [info]crackmonkey
Mon, 1-May-2006 10:29 PM (UTC)

Lesser, suckier options

(Link)

http://homepage.mac.com/benshan/

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.
[User Picture]From: [info]bluknight
Mon, 1-May-2006 10:54 PM (UTC)

(Link)

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.
[User Picture]From: [info]grahams
Mon, 1-May-2006 11:37 PM (UTC)

(Link)

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.
properties
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)
[User Picture]From: [info]bluknight
Mon, 1-May-2006 11:40 PM (UTC)

(Link)

Do the AppleScript hooks support input switching, however... Say, line-level input versus iTunes DB versus whatever else?
[User Picture]From: [info]jkow
Wed, 3-May-2006 9:57 PM (UTC)

(Link)

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.
[User Picture]From: [info]bluknight
Wed, 3-May-2006 10:03 PM (UTC)

(Link)

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.
[User Picture]From: [info]loosechanj
Tue, 2-May-2006 12:00 AM (UTC)

(Link)

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.
[User Picture]From: [info]grumpy_sysadmin
Fri, 5-May-2006 12:47 AM (UTC)

(Link)

And tattooed on the inside of the eyeballs of anyone writing audio software for any open source-esque OS anywhere ever.
[User Picture]From: [info]grumpy_sysadmin
Fri, 5-May-2006 12:48 AM (UTC)

(Link)

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.
[User Picture]From: [info]evan
Tue, 2-May-2006 1:26 AM (UTC)

(Link)

Now that you're an OS X programming wizard, a new hobby project that isn't a screensaver just landed in your lap.
[User Picture]From: [info]fantasygoat
Tue, 2-May-2006 5:21 AM (UTC)

(Link)

He did claim to have a lot of free time the other day.