Rob, I seem to be losing your drift here, Let me try to explain better in case we have got our threads crossed.
1. Here's what I have found since yesterday * Some Java client code capable of sending my audio and receiving the audio from a servlet * Some server code capable of receiving those same streams * Yes these streams are in RTP under the JMF in Java. * The advantage of JMF (and hence the RTP) is that the audio is (I think from what I understood) compatible with audioStream in Java.sound, at least the players associated with the JMF are using Java.sound for their rendering and I have seen some code to save the streams using those methods * Java.sound code capable of mixing two or multiple AudioStreams, this I will have to combine with the server code mentioned above. * Client code capable or providing mixers client side as well as controls to adjust the audio before being sent and combined into one stream server-side. What I plan to do with all this is have a completely independent application for anyone who wants to contribute to the service. This application would be pure Java and will send and receive the streams for the contributors. I would provide this software and have an installation for it. The contributors would use this application to interact with other users and their interface would be solely provided by the app. The listeners, who don't contribute would however not need the application since all they would want is to listen to the streams through flash. This is where Red5 comes in: I want my servlet to publish the streams to the Red5 server. Which means publishing one combined audio stream to Red5 which visitors could tune into. Amongst the compatible sound formats under JMF and Java.Sound is DVI-ADPCM as I mentioned earlier. I am hoping to be able to piece together a class that provides this AudioStream to red5 for publishing. What I need to know now is how to publish that single stream to red5 for broadcasting. I know that this may seem convoluted, and I would welcome advice as to alternative methods, but it seemed more reasonable to use an independent app and that it be based on something that would allow me to manipulate the audio via Java.sound under an audio stream. So how do I get this feat accomplished. Thanks once again, warmest regards Charles >From: "Rob Schoenaker" <[EMAIL PROTECTED]> >Reply-To: [email protected] >To: <[email protected]> >Subject: Re: [Red5] Combine Multiple Audio Streams to one Broadcast Stream >Date: Tue, 8 May 2007 20:03:09 +0200 > >Charles, > >RTP is substantially different from RTMP. RTP used UDP where RTMP is TCP >based. Have the client side is not a 50% bonus, since you might need a >lot of time creating the server to match it... Good luck on that! > >What you really need is a capturing app for audio and video, which can >be used to send the flash streams direct to the server (my personal >preference) > > >From the Flash FLV file format specification I read: > >"For streaming ADPCM sound, the logic for distributing ADPCM packets >among SWF frames is identical to distributing MP3 frames among SWF >frames. However, for ADPCM sound, there is no concept of SeekSamples or >latency. For this and other reasons, MP3 is a preferable format for SWF >4 or later files." > >However, MP3 puts more strain on the system. > >Also from the specs: > >"A common implementation takes 16-bit linear PCM samples and converts >them to 4-bit codes, yielding a compression rate of 4:1. Public domain C >code written by Jack Jansen is available at >ftp.cwi.nl/pub/audio/adpcm.zip. >The SWF file format extends Jansen's implementation to support 2-, 3-, >4- and 5-bit ADPCM codes. When choosing a code size, there is the usual >trade-off between file size and audio quality. The code tables used in >SWF file format are as follows (note that each structure here provides >only the unique lower half of the range, the upper half being an exact >duplicate): >int indexTable2[2] = {-1, 2}; >int indexTable3[4] = {-1, -1, 2, 4}; >int indexTable4[8] = {-1, -1, -1, -1, 2, 4, 6, 8}; >int indexTable5[16] = {-1, -1, -1, -1, -1, -1, -1, -1, 1, 2, 4, 6, 8, >10, >13, 16};" > >HTH > >/Rob > >_______________________________________________ >Red5 mailing list >[email protected] >http://osflash.org/mailman/listinfo/red5_osflash.org _________________________________________________________________ The next generation of Hotmail is here! http://www.newhotmail.co.uk _______________________________________________ Red5 mailing list [email protected] http://osflash.org/mailman/listinfo/red5_osflash.org
