Slashdot Log In
Best Live Streaming MP3 Solution?
Posted by
Cliff
on Sun Apr 09, 2000 12:43 PM
from the is-it-live-or-MP3? dept.
from the is-it-live-or-MP3? dept.
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?
This discussion has been archived.
No new comments can be posted.
Best Live Streaming MP3 Solution?
|
Log In/Create an Account
| Top
| 117 comments
(Spill at 50!) | Index Only
| Search Discussion
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
|
2
(1)
|
2
What about Darwin Streaming Server? (Score:3)
http://www.publicsource.apple.com/projects/stre
This might avoid the MP3 licensing concerns.
I am not a lawyer nor an expert on audio streaming. I just think that if you are looking only for MP3 servers and not any audio streaming technology you may be limiting yourself and not end up with the best tool for the job.
Just my two cents
Icecast. (Score:3)
Easy (Score:3)
Re:I'm Not Sure (Score:3)
This is evident in Gogo, a free (speech, not beer) encoder, which on my K6-2 350 can encode 16-bit 44.1kHz Stereo audio to a 192kbps MP3 at a rate of 4.5 times real-time. When I encode my CDs, I get a song converted in about a minute. That should be evidence that AMD's processors are more than able to do real-time MP3 encoding, and more than one at a time.
--
go with icecast (Score:3)
Some people have suggested Real Player. That is not a viable solution for you. Real costs an arm and a leg and uses proprietary file format for which players are only available for windows. There is a beta version of RealPlayer for Linux, but it is beta and it is not Real's priority to release full-featured version. On the other hand, icecast is Free (so you're not locked into any licensing schemes), and mp3 players are available for every platform (so your listeners are not confined to windows).
Hardware is not an issue here. You can encode 192 Kbit/s mp3's faster than realtime on a Celeron 300 using Lame or BladeEnc. Since you want to stream it on the internet, you'll need to use lower bitrate (like 32Kbit/s), which requires less work of the CPU. I guesstimate that at this bitrate even Pentium 100 will do the job.
Your major issue will be bandwidth. With a T1, you'll have enough bandwidth to have only 48 cuncurrent streams... (assuming 32Kbit/s bitrate)
___
Quick and dirty and totally non-linux soliation (Score:3)
When I wanted to broadcast my radio shows onto the net live, I got all over icecast but in the end it never did the job for me.. Live365 is a commerical endevor, but provides a good service IMO.. I'm sure it's possible to use a linux encodeer to stream to it, but I just couldn't be bothered in the end.
Streaming MP3, and Live Data (Score:3)
My reccomendation would be to build 2 or (possibly) more medium size systems, assign one the task of encoding the audio, and pushing it to the public serving machine(s). This can be done inexpensively (relatively, but everything is relative) and has the added benefit of permitting you to push your content to repeater sites (donated, bartered,purhcased) permitting you to reach a larger audience. It also permits you to go a bit lighter on the bandwidth costs to your location and consider higher bandwidth/lower cost solutions for the public facing "broadcasting" servers should your audience be large enough.
Re:Random brainstorming (Score:3)
The hard part is doing this under Linux, of course.
Wrong answer. Playing with audio streams under Linux is easy as pie. Shoutcast makes a plug-in available in their package called "LiveIce". You install LAME, install IceCast, start it, then run LiveIce. It even has a tcl/tk interface for configuring it.
So, getting this running is just as easy under Linux as it is under Windows NT. Just because you're not familiar with the interface doesn't mean this would be "hard" under Linux.
Oh, by the way, BladeEnc would suck for this application. To get a good encode, you would have to stream it out at 192kbps. LAME is the best way to remedy this, it handles a 24kbps/22 kHz stream well.
Re:A related question (Score:3)
HTH
Yertman
An idea (Score:3)
You may of course contact me personally for any advice on this issue, but I'd recommend that you get hold of the following packages:
1). Icecast
2). GoGo
Use GoGo (a free[dom] mp3 encoder which is as fast as xing's - I know, I use both) to do realtime mp3 encoding on any PII box from a mic input or whatever.
Then pipe the audio out of that process into a fifo which gets broadcast by Icecast.
I've played with this idea and I think it can work nicely. You probably want to encode the mp3 on one box and broadcast on another - otherwise you run the risk of too many hits slowing down the machine so much that the sound skips. Or simply limit the number of connections.
This will work nicely, just plan it carefully.
Jonathan.
Re:Streaming media is what's ruining the internet. (Score:3)
The internet was designed to move TEXT around. TEXT, and plain ol' ASCII text (none of this WORD, .doc file crap). Then someone created uuencode, the beginning of the end. Now there's streaming audio, Real Audio, streaming video, "vmail", Microsoft Net Meeting, the <whatever> cam, etc. All of this is grinding the net to a halt.
Guess what's been around since TCP/IP was invented? UDP. What was UDP designed for? Packet radio.
Gee, guess what Realaudio and the like boil down to? Packet radio running over UDP.
-Lx?
Re:I'm Not Sure (Score:3)
You probably would if you were doing a 128kbit/sec stream, but that's hardly necessary for a live voice broadcast...not to mention nobody with a modem would be able to stream it at that bitrate. 22-28kbit/sec would likely work just fine.
The free REAL products work out fairly well. (Score:3)
btw Did you realize the Hocus Pocus comes from "Hoc est corpus"?.
From one who does weekly live broadcasts w/Linux. (Score:3)
Regardless whether you have a Shoutcast or Icecast server handling the broadcasting part of it for you (Icecast works great, and apparantly smokes Shoutcast in the performance department), you'll need to get the icecast package from icecast.org to get the liveice and shout utilities (liveice handles the encoding of input from your sound card and fires it off to the shout/icecast server, where shout will play pre-recorded mp3s as a live stream to a shout/icecast server).
If you're planning on using a slow modem-capable bitrate, such as 24Kbit or 32Kbit, I'd recommend the Xing Encoder [xingtech.com], which has vastly superior quality over the free encoders at low bitrates. It may not be free, but it's definitely worth the $19.95. Yes, you will have to patch your kernel to make it work with liveice, too, but the patch appears to work just fine.
If you'd like an example of a show done in exactly this fashion, have a listen to Does Humour Belong in Technology? [bccs.net] Our encoder box is a dual Celeron 400, and doing the dual encoding it runs approximately 5-10% CPU.
It's just that easy.
YEs - Linux was teh first OS to do this! (Score:4)
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 [arm.ac.uk].
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 [myplay.com])
icecast (Score:4)
---
Real Life Solution (Score:4)
try vorbis by Xiphophorus (Score:4)
http://www.xiph.org/ main site
http://www.xiph.org/ogg/vorbis/index.html vorbis page
I run a live show... (Score:5)
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
Re:Icecast. (Score:5)
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.
Another icecast example (Score:5)
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 [sourceforge.net].
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 [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 [bigfreakinserver.com] 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 [bwscampus.com] and click "about" on the lower left corner.
- the mad diPPer!
----
I'm not stoned, I just chugged a pack of fUN dIP!
My PC (Score:5)
So just about any PII, Celeron, or PIII class machine today can get the job done.
-AS
Random brainstorming (Score:5)
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
resources to check out (Score:5)
1. As mentioned above the premeir open-source on is www.icecast.org [icecast.org], The original is www.shoutcast.com [shoutcast.com], for additional resources and to talk to people their is www.shoutclub.com [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 [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 [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 [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.