You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Pat Chang - 1973 <pa...@gmail.com> on 2007/09/05 08:17:00 UTC

P2P Audio / Video streaming

Hi Friends,

We are planning to build a P2P audio / video, client / server application.

The question is:
Here, since we are not sending data in blocks using session.write(), we need
to stream the audio / video data as they arrive from the microphones. Taking
the same chat example, would it be possible for us to build a P2P audio /
video streaming client / server? What do you advise?

Pat
-- 
View this message in context: http://www.nabble.com/P2P-Audio---Video-streaming-tf4382175s16868.html#a12492300
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: P2P Audio / Video streaming

Posted by Pat Chang - 1973 <pa...@gmail.com>.
Thanks Norman for your reply.

Interesting!!

Since we are trying to build both client and server which work on a P2P
model, I was wondering if anyone had tried building something similar in the
past.

We have to simulate streaming the same on both the P2P server and the client
as well using Mina. Server will have to reforward the incoming stream from
the client to other clients in the session.

Some sample code would help.
Pat


Norman Maurer-3 wrote:
> 
> Hi,
> 
> maybe its a bit diffrent but I wrote a TCPSoundStreamer with MINA. I use 
> "BARIX" Hardware on the other side which handle raw TCP Streams and 
> stream the mp3 via MINA as client. I use  the StreanerWriteFilter to  
> stream the mp3 ( which is stored in mysql).
> If you have concrete questions just ask ;-)
> 
> bye
> Norman
> 
> Pat Chang - 1973 schrieb:
>> I think streaming the data over UDP is the solution. I am not too sure
>> how to
>> do it with Mina though! Block wise of shooting data will probably
>> deteriorate the performance down and may not be the optimal way to do it.
>>
>> I think Java provides a interesting way to do the audio / video
>> streaming.
>> Since Mina offers a nice platform to program, we have considered it.
>>
>>
>> Adam Fisk-3 wrote:
>>   
>>> Don't you still need to write it in some form of blocks, though?  What
>>> would
>>> you do with raw UDP sockets that would be any different?
>>>
>>> On 9/5/07, Pat Chang - 1973 <pa...@gmail.com> wrote:
>>>     
>>>> Hi Friends,
>>>>
>>>> We are planning to build a P2P audio / video, client / server
>>>> application.
>>>>
>>>> The question is:
>>>> Here, since we are not sending data in blocks using session.write(), we
>>>> need
>>>> to stream the audio / video data as they arrive from the microphones.
>>>> Taking
>>>> the same chat example, would it be possible for us to build a P2P audio
>>>> /
>>>> video streaming client / server? What do you advise?
>>>>
>>>> Pat
>>>> --
>>>> View this message in context:
>>>> http://www.nabble.com/P2P-Audio---Video-streaming-tf4382175s16868.html#a12492300
>>>> Sent from the Apache MINA Support Forum mailing list archive at
>>>> Nabble.com
>>>> .
>>>>
>>>>
>>>>       
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/P2P-Audio---Video-streaming-tf4382175s16868.html#a12516249
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: P2P Audio / Video streaming

Posted by Norman Maurer <no...@apache.org>.
Hi,

maybe its a bit diffrent but I wrote a TCPSoundStreamer with MINA. I use 
"BARIX" Hardware on the other side which handle raw TCP Streams and 
stream the mp3 via MINA as client. I use  the StreanerWriteFilter to  
stream the mp3 ( which is stored in mysql).
If you have concrete questions just ask ;-)

bye
Norman

Pat Chang - 1973 schrieb:
> I think streaming the data over UDP is the solution. I am not too sure how to
> do it with Mina though! Block wise of shooting data will probably
> deteriorate the performance down and may not be the optimal way to do it.
>
> I think Java provides a interesting way to do the audio / video streaming.
> Since Mina offers a nice platform to program, we have considered it.
>
>
> Adam Fisk-3 wrote:
>   
>> Don't you still need to write it in some form of blocks, though?  What
>> would
>> you do with raw UDP sockets that would be any different?
>>
>> On 9/5/07, Pat Chang - 1973 <pa...@gmail.com> wrote:
>>     
>>> Hi Friends,
>>>
>>> We are planning to build a P2P audio / video, client / server
>>> application.
>>>
>>> The question is:
>>> Here, since we are not sending data in blocks using session.write(), we
>>> need
>>> to stream the audio / video data as they arrive from the microphones.
>>> Taking
>>> the same chat example, would it be possible for us to build a P2P audio /
>>> video streaming client / server? What do you advise?
>>>
>>> Pat
>>> --
>>> View this message in context:
>>> http://www.nabble.com/P2P-Audio---Video-streaming-tf4382175s16868.html#a12492300
>>> Sent from the Apache MINA Support Forum mailing list archive at
>>> Nabble.com
>>> .
>>>
>>>
>>>       
>>     
>
>   


Re: P2P Audio / Video streaming

Posted by Pat Chang - 1973 <pa...@gmail.com>.
I think streaming the data over UDP is the solution. I am not too sure how to
do it with Mina though! Block wise of shooting data will probably
deteriorate the performance down and may not be the optimal way to do it.

I think Java provides a interesting way to do the audio / video streaming.
Since Mina offers a nice platform to program, we have considered it.


Adam Fisk-3 wrote:
> 
> Don't you still need to write it in some form of blocks, though?  What
> would
> you do with raw UDP sockets that would be any different?
> 
> On 9/5/07, Pat Chang - 1973 <pa...@gmail.com> wrote:
>>
>>
>> Hi Friends,
>>
>> We are planning to build a P2P audio / video, client / server
>> application.
>>
>> The question is:
>> Here, since we are not sending data in blocks using session.write(), we
>> need
>> to stream the audio / video data as they arrive from the microphones.
>> Taking
>> the same chat example, would it be possible for us to build a P2P audio /
>> video streaming client / server? What do you advise?
>>
>> Pat
>> --
>> View this message in context:
>> http://www.nabble.com/P2P-Audio---Video-streaming-tf4382175s16868.html#a12492300
>> Sent from the Apache MINA Support Forum mailing list archive at
>> Nabble.com
>> .
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/P2P-Audio---Video-streaming-tf4382175s16868.html#a12507167
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.


Re: P2P Audio / Video streaming

Posted by Adam Fisk <a...@lastbamboo.org>.
Don't you still need to write it in some form of blocks, though?  What would
you do with raw UDP sockets that would be any different?

On 9/5/07, Pat Chang - 1973 <pa...@gmail.com> wrote:
>
>
> Hi Friends,
>
> We are planning to build a P2P audio / video, client / server application.
>
> The question is:
> Here, since we are not sending data in blocks using session.write(), we
> need
> to stream the audio / video data as they arrive from the microphones.
> Taking
> the same chat example, would it be possible for us to build a P2P audio /
> video streaming client / server? What do you advise?
>
> Pat
> --
> View this message in context:
> http://www.nabble.com/P2P-Audio---Video-streaming-tf4382175s16868.html#a12492300
> Sent from the Apache MINA Support Forum mailing list archive at Nabble.com
> .
>
>

Re: P2P Audio / Video streaming

Posted by Julien Vermillard <jv...@archean.fr>.
On Tue, 4 Sep 2007 23:17:00 -0700 (PDT)
Pat Chang - 1973 <pa...@gmail.com> wrote:

> 
> Hi Friends,
> 
> We are planning to build a P2P audio / video, client / server
> application.
> 
> The question is:
> Here, since we are not sending data in blocks using session.write(),
> we need to stream the audio / video data as they arrive from the
> microphones. Taking the same chat example, would it be possible for
> us to build a P2P audio / video streaming client / server? What do
> you advise?
> 
> Pat

Hi,

If you write/read sound samples from a sound board, it will be in form
of a buffer of fixed length with "interlaced" channels
(mono,stereo,5.1,etc..) . So you can put those buffer in UDP packets,
it'll basically works if you are on a reliable (and fast) network. For
more advanced streaming you could take a look at protocols like RTP for
help you to deliver samples over UDP in orders.

Julien

P.S. : My main business is to write audio streaming devices/software, I
got a small device streaming voice over IP, with multicast capabilities
ready if you want :)