Best Live Streaming MP3 Solution?
kasparov asks: "I am in a position where I need to be able to stream live audio broadcasts for a church's weekly services. I am considering using streaming mp3 under Linux. Is this a viable option? If so what's the best way to go about this? Is there a way to plug the stereo out of a mixing board to the stereo in of a sound card and encode the incoming analog signal to mp3 and stream it?" Particularly, if you were looking to do something like this from scratch what equipment would you need? What do you all recommend?
Nowadays though, I'd suggest you use Icecast + Liveice - there are a few websites already doing this. But - as the author of Liveice I must admit that my documentation sucks, so if you have any problems then I'm always available for answers. Somtimes I even do hacks to order.
Liveice supports Soundcard Input, as well as multichannel mixing of mp3/wav/whatever. It can run as daemon and also supports almost every encoder available for linux. It also permits you to stream the same input at multiple bitrates - something which is probably essential if you're to cater for everyone. I've also got a plugin for xmms, but since there's no line in input plugin it's not so much use for live stuff just yet.
One major bit of advice I give to everyone - Get the latest version from my web page.
I'm terrible with CVS which is why most of my changes/improvements aren't in the tarballs/CVS on iceacst.org - one day when I have time to clean it up for a proper release.
(And while you're at it - why not listen to my latest selection of Scottish Music)
Try icecast. it supposedly works well. www.icecast.org
---
-
ping -f 255.255.255.255 # if only
As an engineer for 3 radio stations, all of which are streaming online, I would recomend Microsoft Media Encoder, which is embeeded in 2000 Advanced Server, or can be run on NT 4. When deciding which format we would like to stream, sound quality per amount of bandwidth was our most important consideration. Real player just sounded bad, so it was hardly considered. Icecast/Shoutcast was considered, but many people using it have found it unstable. We needed stations that were up 24/7. However, we do not use the default asf format with Microsoft Media Encoder, it tends to produce a very annoying wavy/wahwah/flange effect, but if you dig into the settings, it will stream MP3, which does not sound bad, even with a bitrate low enough that a 33.6 can connect reliably. If you do not expect a large number of hits, the machine encoding can serve as well, but otherwise, use a second machine as a redirecter. As others have said, bandwidth is king, celerons can encode fine, as can any of the faster PII and PIIIs. Please do not flame this, Microsoft Media Encoder is a product that fit our needs better than any other product available, It stills does not make me partial to Microsoft.
-- the computer doesn't want any beer, no matter how much you think it does. NEVER, EVER feed your computer beer.
vorbis is higher quality density than mp3 and it doesn't have encumbering patents and licencing.
http://www.xiph.org/ main site
http://www.xiph.org/ogg/vorbis/index.html vorbis page
Don't be mean or my friend Oog will smash your head
I have a Linux box running Icecast which serves streams directly and I also send a stream to Live365 to use Live365 as a relay. They have a lot more bandwidth than I so I direct most listeners there. The Linux box is a 75 MHz Pentium with 32 megs of memory. All it does is stream. I rarely get more than two or three listeners at a time on this box since Live365 does relay so it is able to handle the load.
I use a Windows box to create the source stream. I have Winamp loaded with the Shoutcast DSP module and the linerec:// plug in to be able to record from the Line In on the sound card.
Some people on here have stated than anything less than 56kb doesn't sound good. I would agree with them if the 56kb stream is in stereo. Remeber if you broadcast in stereo, that stream has two hold one stream for left, one stream for right. So if you decided to broadcast in 24Kbps stereo, you only have 12Kbps per channel (more or less).
We broadcast in mono at 24kbps and still sounds really good. There really is no need for stereo in our broadcast since more of our broadcast is talk and we would rather have good sound quality than stereo for those small bits we play music. Also 24kbps only requires a 33.3K modem to listen if that much. It sounds like really clear AM radio.
As for the rest of our setup, we have a mixing board into which we plug our microphones. We then plug the mixing board's line out into the sound card's line in. This required a stereo RCA to stereo 1/8" plug converter. You can get this at Radio Shack.
We also take the line out of the sound card and hook it up to a stereo where we can plug in headphones. I highly recommend this. First off, you need to be able to hear what you are broadcasting directly (not through speakers). Secondly, headphones will allow you to hear any kind of hum that might be created by your setup.
None of what we are doing requires any high end hardware. Since we aren't broadcasting anywhere near CD-quality sound, we don't need a big machine to encode the stream and since we don't server a high number of simulataneous streams, we don't need a big icecast server. Live365 can handle the load if need be.
Chris
This is fixed in the latest beta, which seems to be stable. The problem appears in both Linux and Win32 servers in my experience, I haven't verified it for other platforms.
/ \
\ / ASCII ribbon campaign for peace
x
/ \
I originally tried using the 25-user free version of the RealAudio server, but it had too many technical limitations, crashed frequently, limited our listenership, and stopped me from adding/changing features in the program, since it's binary only. Since then, I've been using icecast, which has 4 identical streams of differing quality (one for the intranet, 3 for modems). I'm using LAME to encode the MP3s, and liveice is setup to save the live broadcasts to an MP3 on the hard disk for archiving purposes. Afterhours, we rebroadcast the previous day's archive.mp3 using icecast's shout program. The transition from broadcasting the archives w/ shout to broadcasting live with liveice is handled by a couple cron scripts.
There's no keyboard on the server, but it has a perl script continuously running on tty10, displaying the current number of listeners, total listeners per day, average listening time, etc (all this is obtained from the icecast logfile).
We also keep about a week's worth of archives available for listeners to download on demand, and they are accessible through a little perl program I wrote called MP3 Report Generator.
When we started out, we thought bandwidth would be a problem if we had too many simultaneous listeners, so we signed up for a free account at live365.com, which relays our broadcast to up to 365 users. This worked out well, since we could redirect all our listeners to the live365 server and reduce the load on ours. I just found a funky little tool here that monitors your live365 stats (i haven't tried this yet, but i probably will).
If you're curious about more of the server stats, go to www.bwscampus.com/KBWS and click "about" on the lower left corner.
- the mad diPPer!
----
I'm not stoned, I just chugged a pack of fUN dIP!
is a Pentium Pro 200 and can compress CD quality music at 192kbps in real time; IE, it finishes compressing before the song is over(I'm crazy enough to listen to the CD while I'm compressing)
So just about any PII, Celeron, or PIII class machine today can get the job done.
-AS
-AS
*Pikachu*
Hmmm.
I have a PPro 200->233(OC) and it can to realtime encoding; IE, the CDs I encode are done, on a per song basis, before the CD finished playing them. Yes, I'm stupid enough to actually listen to the CD while I encode them. I can get away with this, I think, because I have a SCSI subsystem. Ripping the CD and writing to the HD (twice, wav and mp3) only takes 5% of my CPU time.
Of course, encoding to 192kbps takes a good 67% of the CPU.
But lets say you code down to something more reasonable. You still have to be careful that disk IO doesn't suck up all your CPU time, what with the realtime capture of audio off your soundcard, which may or may not be CPU intensive in of itself, and the realtime encoding of the mp3, as well as the realtime broadcast.
I'm not sure, but I think you may need custom software, unless someone already wrote it. Are you interested in actually storing your work? In archiving it? The wav file needs to be continually broken up and discarded on a regular basis, and the mp3s should prolly not be saved as one honking big 400 mb 12 hour session. Of course, I'm exaggeratting. I don't expect you're actually going to broadcast 24x7, right?
Anyway, an easier alternative is delayed broadcast, by even a minute. You could prolly easily rig software to grab 1 minute chunk dumps of audio output, and get the encoder and streamer to dump that in realtime to your audience.
The hard part is doing this under Linux, of course. I run WinNT, and could prolly get this going. Anyone want to elaborate from the Linux front?
For example, under NT, and I imagine Linux, BladEnc could do the encoding trivially; especially if scripted or cronned to continually convert fresh material in a dump directory.
Is dumping audio under Linux as easy as some sort of cat > file from an audio device? The problem I see is that BladEnc will finish encoding before the file is finished, and quit... while new materially continues to get written to disk.
Anyone else?
-AS
-AS
*Pikachu*
1. As mentioned above the premeir open-source on is www.icecast.org, The original is www.shoutcast.com, for additional resources and to talk to people their is www.shoutclub.com.
2. If you want to stream *live* audio then liveice (which is part of icecast) shout work, if you on windows then use the SC plugin for winamp.
3.One of the biggest problems isnt software its bandwidth!! A decent sounding stream is at least 56K minimum, even with a T1 your nadwidth can max out quickly, if your stream is non-commercial then look into www.live365.com which provides free bandwidth for non-commercial streams along with a slew of tools.
4. If you need more advice then check out www.bigfreakinserver.com. This is our site we have a forum which we monitor frequently and will be happy to answer any streaming questions. bigfreak pipes out 3 streams over a 768Kbps DSL line, running on a dual proc Celercon, running FreeBSD :).
5. Finally here is a little fun tools for all you stream listeners, called streamripper located at www.bigfreakinserver.com (Look in the PROJECTS section). Which allows you to hook up to an mp3 and rip the tracks directly to your hardrive :). very fun indeed.
Well enjoy the resources.