WebRTC peer on NodeJS for saving media stream

6,012 views
Skip to first unread message

Riccardo Tresoldi

unread,
Oct 25, 2013, 5:50:23 AM10/25/13
to discuss...@googlegroups.com
Hi evryone.
I'm searching to develop a server-side application that allow a WebRTC client to "send" its real time stream to the server throw WebRTC API.

I think to use this way because record the stream at the client-side and then send it to the server asynchronously became really hard because the browser cache can't contain lot's of minutes.

I try to understand what libjingle does, but i think it doesn't do something useful for my situation.

Then I try the NodaJS way, and i found lot's of packages for WebRTC, but I can't understand if there a package that allow a server to receive a stream throw client's RTCPerrConection.

Someone can help me?

PS: I know that this is a WebRTC discussion, and not a NodeJS discussion, but I can't find a NodeJS one oriented to the WebRTC.

Ket

unread,
Oct 27, 2013, 10:21:46 PM10/27/13
to discuss...@googlegroups.com
The technology you are looking for doesn't exist yet. You have to create it yourself.

nazmus shakeeb

unread,
Oct 27, 2013, 10:46:56 PM10/27/13
to discuss...@googlegroups.com

Hi Riccardo,

You can easily do this without any programming. You need 2 things in server side. You don't need node.js as asterisk has built in support for websocket. I have used latest software of sipml5 and asterisk.  

 
The extension.conf of Asterisk should have the following lines.


exten => 300,1,Answer
exten => 300,2,Record(/var/lib/asterisk/sounds/en/ntest:ulaw,,20)
exten => 300,3,Wait(3)
exten => 300,4,Playback(ntest)
exten => 300,5,Hangup
  

Although you can install and configure turnserver but you don't need for this purpose.


I have made this for my children and they enjoyed it very much. 
 

Installing sipml5 is very easy. you just need to put it on webserver. Installing asterisk is not straight forward. You need SRTP and ICE support.

You will many get help from internet about installing these. Please verify your asterisk log to be sure that these are working properly.

Thanks,
Shakeeb  

Silvia Pfeiffer

unread,
Oct 27, 2013, 11:56:18 PM10/27/13
to discuss...@googlegroups.com
Is this audio-only?
Silvia.
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "discuss-webrtc" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to discuss-webrt...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Nazmus Shakeeb

unread,
Oct 28, 2013, 12:38:58 AM10/28/13
to discuss...@googlegroups.com
Yes. only with audio.
Shakeeb

nazmus shakeeb

unread,
Oct 28, 2013, 1:08:55 AM10/28/13
to discuss...@googlegroups.com
Yes. for audio only.
Shakeeb

On Monday, October 28, 2013 9:56:18 AM UTC+6, Silvia Pfeiffer wrote:

Riccardo Tresoldi

unread,
Oct 28, 2013, 4:01:45 AM10/28/13
to discuss...@googlegroups.com
Thanks for the replay.
I need specially for save the video. :(

Riccardo Tresoldi

unread,
Oct 28, 2013, 4:04:05 AM10/28/13
to discuss...@googlegroups.com
There's nothing that can simplify my job? like some library?
Do you think that node.js is a correct way to do this?

tom

unread,
Oct 28, 2013, 6:56:45 AM10/28/13
to discuss...@googlegroups.com
Not sure if getUserMedia can provide two events on mediaStream, like
 mediaStram.onVideoData = function(Blob video){}
 mediaStram.onAudioData = function(Blob audio){}

Best regards
  Tom

Warren McDonald

unread,
Oct 28, 2013, 5:30:50 PM10/28/13
to discuss...@googlegroups.com
Hi,

we have experimented with this using several existing components and some integration glue.

The prime thing you need is a conferencing server (which can record) which understands SIP over websockets and can decode VP8, The 2 opensource ones are Licode from Lynckia and Open Telepresence from Doubango. There is also NGVX, a commercial one from Next Gen Bits. 

You need to setup up a conference, with recording on, which will give you a SIP address to call using the SIPml5 client side JS library. How to manage the conference, security and recording varies between implementations. The Open Telepresence server has nice auto conference feature and a simple single file recording output, so I would try that first.

Warren  

Nazmus Shakeeb

unread,
Oct 28, 2013, 11:59:38 PM10/28/13
to discuss...@googlegroups.com

You  can record video by asterisk. You can also do it using node.js. 

For Asterisk you need to modify code to record video encoded using VP8 codec.

For node.js if you don't find any available library or program you have write it.

Shakeeb  

Shachar

unread,
Oct 29, 2013, 8:58:57 AM10/29/13
to discuss...@googlegroups.com
There's this project: https://github.com/helloIAmPau/node-rtc
I believed he'd love all the help he can get

Riccardo Tresoldi

unread,
Oct 29, 2013, 1:03:32 PM10/29/13
to discuss...@googlegroups.com
Thanks a lot! but I don't find any documentation... I don't understand exactly what it does... ;)
Can you explain me please?

Nazmus Shakeeb

unread,
Oct 30, 2013, 1:34:11 AM10/30/13
to discuss...@googlegroups.com
You can also use WebRTC native client. 

To me this is the best option. 

You can download source code of WebRTC from here 


There is an example to make or receive call in the following directory.  

WebRTC/talk/examples/peerconnection

You need to enable auto answer and dump incoming video RTP to a file. 

Shakeeb

Harald Alvestrand

unread,
Oct 30, 2013, 2:24:28 AM10/30/13
to discuss...@googlegroups.com
Tom, what you are looking for is the Recording API.


(folllow the link to the editor's draft)

The bad news: Nobody's implemented it yet.


--

Nazmus Shakeeb

unread,
Apr 20, 2014, 9:55:46 PM4/20/14
to discuss...@googlegroups.com
Hi Riccardo,

I have been able to record( also play) vp8 video at the asterisk end using the following patch.


Thanks,
Shakeeb
Message has been deleted

tash...@gmail.com

unread,
May 10, 2014, 4:49:38 PM5/10/14
to discuss...@googlegroups.com
Hi Nazmus

> You need to enable auto answer and dump incoming video RTP to a file.

I have modified the peerconnection sample so that "server_test.html" streams video to "peerconnection_client.exe".  This is working fine but I am not sure how to dump incoming video RTP to a file.

Please could you tell me how to do that?

Many thanks

Vinay Kumar

unread,
Jun 27, 2017, 1:27:18 AM6/27/17
to discuss-webrtc
hi, did you find any solution for the server side?

Riccardo Tresoldi

unread,
Jun 27, 2017, 4:08:12 AM6/27/17
to discuss...@googlegroups.com
Hi Kumar,
I'm so sorry, but I don't develop on WebRTC since 2 years.

Anyway, I didn't found a solution for that issue.
I had to change the requirements.

Bye!
--

---
You received this message because you are subscribed to a topic in the Google Groups "discuss-webrtc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/discuss-webrtc/NTTq_fq1xSw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/f8709d72-fe8c-45fa-8d77-4ea9b9da35b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sergio Garcia Murillo

unread,
Jun 27, 2017, 9:18:56 AM6/27/17
to discuss...@googlegroups.com
If you want to do recording server side on node you can use my media server:

https://github.com/medooze/media-server-node

It is still in beta stage but that works.. ;)

Best regards
Sergio
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/DAD76D41-5B13-4512-8B1B-5EFA729065DD%40gmail.com.

陈超

unread,
Aug 1, 2017, 4:15:03 AM8/1/17
to discuss-webrtc
can i use it in mac os?

在 2017年6月27日星期二 UTC+8下午9:18:56,Sergio Garcia Murillo写道:
Reply all
Reply to author
Forward
0 new messages