Maxwell'sSilverLART asks:
"I work for a University's Aviation Department. For several years now, we've run a streaming audio server to rebroadcast air traffic control communications over the web as an educational service to our students. This job had been handled by Winamp + SHOUTcast. We've just added a second channel to the system (we're now rebroadcasting approach control, in addition to the local tower), which means I need to find a way to get a second live audio stream into the system (signal comes from radio receivers tuned to the appropriate frequency), encoded (we're using 8-bit, 22kHz mono MP3, which is more than adequate given the source), and broadcast. Has anybody done this before? Surely I'm not the first to want to encode multiple live streams. How did you do it, and what were the pros/cons? Does anybody know of a good hardware device at a reasonable price (I'd need to sell my boss on two of them)? Ideas are always welcome."
"I thought about setting up a Linux box with two sound cards, but I know that can be problematic, and I was also having trouble finding streaming software that would work with multiple soundcards (LiveIce only seems to support one). I would prefer not to use multiple machines. I was looking for software, and it occurred to me that I might be going about this the wrong way--perhaps a hardware encoder/server would be better. I poked around on the web, and only found one (for $2800--I'll pass). If I do end up using a PC, I want the system to be daemonized, and initialize at startup; I'm sick of having to restart Winamp every time the power cycles. (I inherited this system; I would have done things differently)"
World famous perl hacker Lincoln Stein has apache::mp3 availabile for using apache as your mp3/ogg stream server. Apache is a daemon so now more reboot worries. Now you have to figure out how to feed two audio streams to their respective filehandle(s). Are you wanting two seperate streams or the two channels overlaid into a single stream, if it is the second option a simple 2-1 (Y) cable should be sufficent.
09f911029d74e35bd84156c5635688c0
I recommend putting channel one in the left side and the second channel in the right side. Make sure you encode in Stereo (as opposed to joint), and then let the listener pan to get their desired channel. Put on the headphones and you can listen to two conversations as once.
A PCI/onboard sound card and a TV tuner card could do the trick, just feed the 2nd audio stream into a VCR and the output to the coax on the back of the TV card, split the L/R channels and you are golden.
09f911029d74e35bd84156c5635688c0
First, the obvious: If you're happy with what you've got, why not multiply it by 2? Toss another similar machine on the network, and operate it just as you have been the first one.
;)
/dev/dsp) are hard-coded, in which case you can just compile two different LiveICE binaries. You've got the source, and it really is trivial to replace /dev/dsp with a more appropriate identifier.
Of course, this costs money, both short and long term, as boxes aren't free and hardware problems become twice as likely to pop up. But, given your background in ATC, I doubt such juggling would be much burden.
You could always run two instances of Winamp on the same machine, with the primary difficulty being the ability to instruct each to record from a different card. Winamp is really not built for this sort of work, so it may be trivial, or nearly insurmountable - I've not tried.
Multiple soundcards are nowhere near as much of a problem with Linux as they are with Windows. Use ALSA as a sound driver, which will merrily provide excellent support for as many cards as you can physically squeeze into the machine. The stock kernel drivers work nearly as well, as does paid-for OSS from 4front. FreeBSD's stock drivers would also suffice nicely, if you want to avoid Linux.
It doesn't matter that LiveICE doesn't support more than one card - just run two copies of it, each with different configs, one for each stream. The worst-case scenario is that the device names (ie,
IceCast, the server-side component of *NIX MP3 streaming, will gladly support multiple streams out-of-the-box, so that's not an issue.
Whatever you do, though, go ahead and increase the bit-depth from 8- to 16-bit. Running with 16-bit costs you nothing, and increases dynamic range and overall fidelity. Whether or not it matters given the sort of audio you're encoding is not relevent; everything is going to end up as 16-bit anyway, whether by action of your local MP3 encoder or the player on the other end, irrespective of what it begins as. The MP3 format itself is bit-depth agnostic.
Good luck.
Kid-proof tablet..
2 sound cards
either:
xmms + Output stacker, both shoutcast servers configured for differnt ports
or:
two versions of xmms, using each differnt sound card
I'm a big retard who forgot to log out of Slashdot on Mike's computer! LOOK AT ME.
There's nothing to this. You probably don't need additional hardware. Maybe a sound card. I have a 500 Mhz P3 box simultaneously encoding two video+audio streams full time. One is Windows Media and one is Real. The box is more than enough. You're talking about encoding just audio. One computer should do fine.
Get & install two soundcards. Connect the outputs of each source into the line in of each.
Get a copy of Darwin Streaming Server or Helix Server or any of the shoutcast MP3 streaming things.
The benefit to using Darwin or Helix is that they're made to record from live input rather than just streaming files on the drive.
Mr. Coward
Interesting concept, running two mono channels into a single stereo stream, but not quite what I'm looking for here. The two streams are totally independent, and that would be confusing to say the least (at least to most listeners). The listeners have been e-mailing me for two weeks asking my why they can't connect, when I've posted, at the top of the page, in boldface, that the server is temporarily down. Call me an elitist, but if they can't read that, I sincerely doubt they'll pick up on instructions to adjust the balance control. Good thinking, though; I hadn't even considered that sort of solution.
bofhkentucky:
Two separate channels, feeding two separate streams; mixing them would be bad. It'd be like trying to listen to two radio stations at the same time. While pilots do tend to step on each others' transmissions (frequently), I'd rather not make it worse.
adolf:
Lots of good points in your post; thanks for the good response. To clarify a few things:
seann:
I'm trying to avoid XMMS and other programs that want a display. Daemons are good here. That said, what's Output Stacker? I haven't heard of it, and I've poked around quite a bit.
Rob (and everybody): .confs/sources). When I said hardware, I was thinking of a dedicated device. The only one I found was the Telos Systems Audioactive live MP3 streamer, but at $2800 a copy, it's a bit out of my price range (we don't spend that much on aircraft radios!). I was looking for something that's a dedicated, single-purpose, plug and play device; configure it once, and that's the last I see or hear of it. I'm a lazy admin--the less I have to touch it, the happier I am. I didn't mean to imply that I was looking for special computer hardware, but for a standalone audio device.
I have a box that can handle it, if I can get the software working. I looked at Darwin Streaming Server, and it appears to be comparable to SHOUTcast and IceCast. I'm not having trouble finding a server, the problem lies in the source; I can't find a good program to connect the line-in to the streaming server. LiveIce appears to do what I want, but I don't know how it would handle multiple instances on the same machine, being fed by multiple sound cards (adolf: I'll have a look at the
All: thanks for the suggestions. At the moment, it looks like I'm going to stick with Linux + two cards, if I can figure out how to get IceCast working (I've been having a bear of a time getting it to play nice; I honestly believe I'm cursed when Linux and sound are involved). If anybody else has any thoughts, I'd certainly love to hear them.
Moderate drunk! It's more fun that way!
Basically, just make sure you're using kernel modules for your sound card, and most of the sound card drivers support more than one card (you might need to read the documentation in the kernel source, or do some googling to figure out if any special parameters are needed).
Then, you have
eg:Whee. Easy peasy. The command formats from above are almost certainly wrong, but it should be enough to give you an idea. In the end, though, I would recommend the "stereo, 1 station per ear" method, because that's a lot easier / cheaper than any of the other solutions.
--Robert
This would immediately seem obvious even to you, but the solution you are looking for -- indeed the simplest and cheapest solution is to put two or more sound cards into the machine. All major OS's support multiple sound devices, though some of the drivers out there struggle with two of the same card.
For instance, the Linux driver for the SB128, Live series, and Audigy series' cards supports multiple devices just fine, but the Windows drivers do not. A lot of the less inexpensive (But not dirt cheap) Windows sound cards will support multiple cards just fine. I have used Aureal, Trident, Turtle Beach cards successfully in multiple configurations. Using SBLive series cards in conjunction with another soundcard often seems to cause weird PCI problems, so I'd recommend avoiding a configuration such as that.
The other good solution is to use USB audio devices. You can get anywhere between 4 to 8 of them on the same USB bus doing 44.1khz stereo without problems, and 100% of the drivers I have seen can cope with multiple USB audio devices of the same type. You also get the (wonderful) benefit of not having to worry about IRQ or DMA starvation that can be caused by more than 2 internal soundcards. USB audio devices are the solution I use currently.
Finally, when you get your two or three audio IO sources on your machine, just set your encoder to record from the right device. Audio software that won't let you select your sound card device either in Windows or Linux or MacOS is probably shitty software anyway. There are plenty of different soutcast encoders on many platforms, so if the one you are using now doesn't work for you, then get another one -- one that encodes multiple bitrates from the same source, for instance. You don't have to use winamp to run a shoutcast encoder. Get one that can be automated.
~GoRK
Why not just build an N-track analog mixer, and mix them in analog, then pipe it into your soundcard? Then you can adjust the gain and equalization on a per-channel basis. Its also more modular: signals know nothing about their mixing, mixing knows nothing about the encoding... down the road you can swap out components and leave the rest of the system as-is.
I want to delete my account but Slashdot doesn't allow it.