How Can I get the stream data from WebRTC?

660 views
Skip to first unread message

Tom Mac

unread,
Aug 30, 2012, 1:17:23 PM8/30/12
to discuss...@googlegroups.com
I am using node.js on the backend and I would like to use WebRTC to have a camera stream data to a websocket on node.js.    
Then I would like to tweak/duplicate/record that stream.   But I cant figure out how to get direct access to the streams data. 

Also As my app is not peer to peer but peer to server I dont need to do all of the handshaking/firewall stuff.   Is there a way to disable that? 

The way that I wanted to set it up is to have a web browser connect directly to the server and have the server say store that video.   Can you recommend the steps to do this? 

Regards,
Tom 


Bryan Donnovan

unread,
Aug 30, 2012, 2:23:11 PM8/30/12
to discuss...@googlegroups.com
If your offer SDP already contains the server address as a candidate, you can create a PC to the server like so:
new webkitPeerConnection(null,function(){}); // no stun server

I think that web rtc does not provide client side access to the encoded data, however, if you are already streaming it to the server, then there's no need to send it on a web socket.

I wonder if it might be possible to use FileReader to consume data directly from a LocalMediaStream or Object URL.  Haven't tried it yet, though. 

Ket

unread,
Sep 6, 2012, 9:52:21 AM9/6/12
to discuss...@googlegroups.com
Chrome stop supporting MP4 video format. I used to grab MP4 video from the <video> tag to <canvas>. Now it's no longer working.

On Tuesday, September 4, 2012 7:14:31 PM UTC+7, dayaftereh wrote:
I have pretty much the same problem. I want to send the Audio-Date from the microphone MediaStream direct to the Server via Websockets, because I need to analyze the Audio-Data on the Server side, but I can't get the Audio-Date from the MediaStream.I found a  solution for sending the Video MediaStream direct to the Server, but not the Audio mediaStream. For sending the Video MediaStream simple render the <video> Tag to a Canvas and get from the Canvas an Image.This Image need than send to the Server.  this Article shows how it works. For getting Audio MediaStream, I can't use PeerConnection because there are only for Browser to Browser connection!
Reply all
Reply to author
Forward
0 new messages