Robby Dermody
2004-Dec-25 18:08 UTC
[Icecast-dev] is this an appropiate use of icecast/libboost?
Hi guys, I'm writing an application that will sniff audio streams going across the network and allow a seperate client application to listen into one of these streams. I was looking into ways to distribute the captured stream media to a client for listening, and icecast came to mind. Icecast, as I understand it, is usually used for streaming a few data sources to MANY clients. As I want to use it, I would be streaming MANY data sources with one client per source (1:1 correspondence). Furthermore, for this to be possible with icecast, I would need to be able to dynamically set up and take down 'streams', and direct clients to these streams. I would also need to be able to push the captured voice data to these streams for distribution (it seems libshout does this). Streams would be set up on an individual basis as stated above, i.e. 1 client per stream, and taken down when that client is done with listening to that stream or is inactive too long. After looking at how icecast works a bit, it seems that I would do this by configuring it with X mount points for X client listeners maximum. In my program, I would keep track of which mount points are currently being "used" (i.e. data is being sent to them via libshout send()) and which ones are not. When a client requests to listen to a new sniffed stream, I would pick one of the mount points not being used, and log into it with libshout. I would give the client the URL of this mountpoint on the shoutcast server, and then start streaming data to it as the client connects (maybe there are better ways to time this part so the client gets the entire stream from the start, but that's all in the details for now). When the stream is done or the client stops listening to it and tells the server, or the client times out,etc. I would simply stop any streaming I am doing to that mount point, and add it back to the unused list of mountpoints. My question is: is icecast appropriate for this kind of usage? If not, might there be some other open source media server that is more fit for this? Is there a limit on the maximum number of mountpoints an icecast process may have? (I see threads back in 2001 pegging a limit at 25-50 mountpoints, but I hear icecast has been rewritten since then.) I figure you guys have put so much work into making a good streaming media server and overcoming all the technical hurdles with this that I would be dumb to not go with a solution like this if it was at all technically possible. Thanks for any input, Robby
Geoff Shang
2004-Dec-25 23:26 UTC
[Icecast-dev] is this an appropiate use of icecast/libboost?
Robby Dermody wrote:> Is > there a limit on the maximum number of mountpoints an icecast process may > have?Well, don't know of any technical limit, but do bare in mind that you need to configure the number of sources. Though I don't know if there's a hardcoded limit if you don't specify a value for this. Geoff.
Is Ogg Speex streaming support planned for icecast? I didn't see mention of speex support for it anywhere (including the source). Looking through the source, it looks like such support would be somewhat trivial for someone that knew what they were doing. Would I be correct in my assumption that the easiest way to do this would be to write a format_speex.c and .h file from format_vorbis.c/.h that conforms to the Speex in Ogg encapsulation spec at http://www.speex.org/manual2/node7.html#SECTION00073000000000000000 ? It also seems that libshout would require some slight modifications (e.x. a new FORMAT_ specified for SPEEX). Thanks, Robby
On Mon, 2004-12-27 at 02:48, Robby Dermody wrote:> Is Ogg Speex streaming support planned for icecast? I didn't see mention > of speex support for it anywhere (including the source). Looking through > the source, it looks like such support would be somewhat trivial for > someone that knew what they were doing. Would I be correct in my > assumption that the easiest way to do this would be to write a > format_speex.c and .h file from format_vorbis.c/.h that conforms to the > Speex in Ogg encapsulation spec at > http://www.speex.org/manual2/node7.html#SECTION00073000000000000000 ? > It also seems that libshout would require some slight modifications > (e.x. a new FORMAT_ specified for SPEEX).speex can be added easily enough, I already have it in my branch. I haven't had any feedback on it yet although the processing of it is very trivial. karl.