browser to native (C++) using WebRTC

1,212 views
Skip to first unread message

ns.s...@gmail.com

unread,
Aug 5, 2014, 8:40:42 AM8/5/14
to discuss...@googlegroups.com
Hi,

I have seen a lot of native (C++) to browser implementation (like for streaming video files stored on a server to clients using their browsers), but what I'd like to do is native to server (C++) streaming.
I'd like the C++ server to receive the webcam from the browser and perform video processing in real time. I've browsed through the WebRTC code but this is so huge, I don't know where I should start.

I already have built a gstreamer pipeline that can read RTP packets, but I understand the browser send the video stream with DTLS-SRTP encryption. What should I read in the WebRTC source code that could help me accept a connection from a browser and decrypt the RTP packets ?

Benjamin Schwartz

unread,
Aug 5, 2014, 10:50:38 AM8/5/14
to discuss...@googlegroups.com


--

---
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/d/optout.

roxlu

unread,
Aug 5, 2014, 12:19:23 PM8/5/14
to discuss...@googlegroups.com
Hi, 

I'm looking into the same thing: creating a bare-bones server-side implementation. 
At the moment I'm going through the RFCs and implementing it step by step. It's work in 
progress and the api will change, but it's capable of receiving video from Firefox already
and currently I'm trying to make it work in Chrome too.


It's not trying to cover the complete WebRTC stack and features; just streaming video/audio in a 
controlled environment for now.

Cheers
roxlu.

Op dinsdag 5 augustus 2014 14:40:42 UTC+2 schreef ns.s...@gmail.com:

ns.s...@gmail.com

unread,
Aug 6, 2014, 2:47:51 AM8/6/14
to discuss...@googlegroups.com
Thanks for answering me and giving me resources, this is appreciated.

I have browsed rapidly the link you gave me and intend to read it more carefully, but I'd like to ask you something : is it some code example ? By reading it, what will I learn ? Will I lear how to use the libjingle to create one of my own example ? Or it it part of the libjingle itself ?
I'm asking because this is lots to read and I'd like to be as efficient as possible : it would help if I had a clue of what I should have in mind when reading the code.

Thanks again for your time and help.

ns.s...@gmail.com

unread,
Aug 6, 2014, 2:49:49 AM8/6/14
to discuss...@googlegroups.com
Hi,

good ! I've browsed the github. It looks promising. I especially like the ASCII drawing, though I'm not sure I totally understand it.
You say it is able to receive the stream from Firefox ? Wow this is great. How can I try it?
Could you give some instructions or examples of how to use the library ?

Thanks for you answer and I hope your library will work well.

roxlu

unread,
Aug 6, 2014, 3:13:59 AM8/6/14
to discuss...@googlegroups.com
It's not an example of libjingle. It's a standalone minimalistic implementation of the server side of WebRTC. It's still work in 
progress and at this moment it can handle (ice-controlled) stun messages, dtls and gets the media flow from the browser
running (firefox).  Though in Chrome I have an issue on which I'm working right now.  I've put my code on github to share, 
and until I release a beta version it's experimental code that may change. 

Best
roxlu

Op woensdag 6 augustus 2014 08:49:49 UTC+2 schreef ns.s...@gmail.com:

ns.s...@gmail.com

unread,
Aug 6, 2014, 3:29:45 AM8/6/14
to discuss...@googlegroups.com
Ho yeah I understand the confusion : the libjingle question wads for the chromium code that B. Schwarz gave me.

About the WebRTC server, I figured it was indeed not libjingle. I'll take a better look to it, to see.

Regarding my original question (about libjingle), any idea how and where I should start ? I will try to compile the whole thing (I know it takes time, I have already tried once). But when I manage to compile, I don't know how what to do ? Are *all files* really needed? What if I want to begin a server myself, what files can / should I use ?

This is very tricky for me and I'm very lost with libjingle.

Leighton Carr

unread,
Aug 10, 2014, 9:21:29 PM8/10/14
to discuss...@googlegroups.com
I have a libjingle-based C++ implementation that allows multiple websites to connect to a single native.  You don't need to build your project with all of libjingle - just link the libraries you need from where you have built libjingle.

Conceptually it's pretty straightforward.  You need to implement your own signalling first - I use Socket.IO since it's easy on both native and web.  Then you just need to implement your Observer class (which houses the peer connection etc), Constraints class, Videorenderer class, and some other class to do something with the video.  For mine - I re-encode the frames using local hardware and then save .mp4 to disk to make a WebRTC DVR.

Libjingle has some (fairly old) example code in peerconnection_client, which shows you how to some of this (not constraints - that's found in a unit test).

Harout Bulbulian

unread,
Aug 17, 2014, 3:01:17 PM8/17/14
to discuss...@googlegroups.com
can OLE windows object in windows systems load and execute webrtc pages

Lorenzo Miniero

unread,
Aug 18, 2014, 5:45:00 AM8/18/14
to discuss...@googlegroups.com
You might be interested in Janus, which already does something like this in the streaming plugin:


Lorenzo

Luis Lop

unread,
Aug 18, 2014, 6:00:50 AM8/18/14
to discuss...@googlegroups.com
You may be interested in taking a look to http://www.kurento.org. We have implemented a media server on top of GStreamer with WebRTC capabilities. You can integrate easily advanced processing capabilities such as computer vision or augmented reality at the server side just by re-using or creating GStreamer media elements. Take a look to this presentation to see how the high level API for controlling the media server looks like and to access some demos showing some advanced media processing examples:
http://www.slideshare.net/LuisLopez235/developing-rich-multimedia-applications-with-kurento-a-tutorial-for-javascript-developers

Best.

L.
Reply all
Reply to author
Forward
0 new messages