webrtc lib

Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

webrtc lib

Benoit Chesneau-2
Hi all,

I was about to wrap janus in an erlang app to be able to communicate with browsers, but then I wondered if there isn't a "native" implementation these days ? Also I couldn't find a wrapper but maybe someone already wrote one?

The main goal of using webrtc there is mostly beeing able to handle some UI in a P2P manner.

Benoit

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: webrtc lib

Stefan Hellkvist-2


> 16 maj 2018 kl. 18:44 skrev Benoit Chesneau <[hidden email]>:
>
> Hi all,
>
> I was about to wrap janus in an erlang app to be able to communicate with browsers, but then I wondered if there isn't a "native" implementation these days ? Also I couldn't find a wrapper but maybe someone already wrote one?

I am not sure what you mean with “wrapper” and “wrapping” but if you mean to somehow run Janus inside Erlang or linking to it I have not done that and I am not sure I understand why one would do that.

I have run Janus with an Erlang node controlling it but that Erlang node is just using Janus’ JSONRPC interface over Websocket which is pretty straight forward to implement in Erlang (and any other language). I don’t have much code that I can share from this though sadly and I only implemented the few Janus calls that I needed (setting of calls in audiobridge and videoroom plugins) but it worked ok and I am happy to assist if you have questions.

Janus has some hiccups I must say - there are some segfaults now and then depending on what plugins you use (see the issues on github for instance) but if you spread the calls over many Janus instances a crash will only affect a small set of users at least and not your entire user base. I could also not find the docs for the actual calls towards the plugins so you end up opening the plugin code to understand what parameters to include in the rpc calls.

Stefan



>
> The main goal of using webrtc there is mostly beeing able to handle some UI in a P2P manner.
>
> Benoit
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: webrtc lib

Benoit Chesneau-2
Thanks for the infos. I agrre and was thinking to use the wa transport . But the main idea in wrapping it is to be able to ship it as a standalone software without relying on a container thing. Of course having a native way to it in erlang would be better :)

Benoît

On Wednesday, May 16, 2018, Stefan Hellkvist <[hidden email]> wrote:


> 16 maj 2018 kl. 18:44 skrev Benoit Chesneau <[hidden email]>:
>
> Hi all,
>
> I was about to wrap janus in an erlang app to be able to communicate with browsers, but then I wondered if there isn't a "native" implementation these days ? Also I couldn't find a wrapper but maybe someone already wrote one?

I am not sure what you mean with “wrapper” and “wrapping” but if you mean to somehow run Janus inside Erlang or linking to it I have not done that and I am not sure I understand why one would do that.

I have run Janus with an Erlang node controlling it but that Erlang node is just using Janus’ JSONRPC interface over Websocket which is pretty straight forward to implement in Erlang (and any other language). I don’t have much code that I can share from this though sadly and I only implemented the few Janus calls that I needed (setting of calls in audiobridge and videoroom plugins) but it worked ok and I am happy to assist if you have questions.

Janus has some hiccups I must say - there are some segfaults now and then depending on what plugins you use (see the issues on github for instance) but if you spread the calls over many Janus instances a crash will only affect a small set of users at least and not your entire user base. I could also not find the docs for the actual calls towards the plugins so you end up opening the plugin code to understand what parameters to include in the rpc calls.

Stefan



>
> The main goal of using webrtc there is mostly beeing able to handle some UI in a P2P manner.
>
> Benoit
> _______________________________________________
> erlang-questions mailing list
> [hidden email]
> http://erlang.org/mailman/listinfo/erlang-questions


--
Sent from my Mobile

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: webrtc lib

Max Lapshin-2
Hi.

We have webrtc implementation inside Flussonic.

It is a pure full webrtc implementation, not websocket signalling, but full video/audio transfer.

You are speaking about it?


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: webrtc lib

Stefan Hellkvist-2


> 18 maj 2018 kl. 08:14 skrev Max Lapshin <[hidden email]>:
>
> Hi.
>
> We have webrtc implementation inside Flussonic.
>
> It is a pure full webrtc implementation, not websocket signalling, but full video/audio transfer.
>
> You are speaking about it?

That is interesting. We were actually talking about integrating Janus (https://janus.conf.meetecho.com) with Erlang but it is interesting to hear about an Erlang webrtc implementation. What is exactly that you have implemented? Janus does srtp relaying and does ice negotiation  with STUN/TURN as well as allowing you to write plugins with more specific application logic. What type of webrtc support exists in Flussonic?

Another late development is the added support for webrtc in latest Gstreamer (which also uses libnice ). I’m thinking that, if one were to wrap webrtc into and Erlang environment that perhaps the Gstreamer pipeline is a more flexible integration point than Janus? I have tried the new Gstreamer with some limited simple use cases and it seems to work fine.

Stefan
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: webrtc lib

Benoit Chesneau-2
In reply to this post by Max Lapshin-2
Hi Max,

I knew you had an implementation but it doesn't seem you opensourced it yet, right? At least I didn't found it. If you do that would be really awesome! If you need any help for it, feel free to bug me :)

 I mainly need to have data channels, so if they are missing I could start by adding them. Far better than reinventing the wheel :)

- benoit

On Fri, May 18, 2018 at 8:14 AM, Max Lapshin <[hidden email]> wrote:
Hi.

We have webrtc implementation inside Flussonic.

It is a pure full webrtc implementation, not websocket signalling, but full video/audio transfer.

You are speaking about it?



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: webrtc lib

Max Lapshin-2
I'm completely against writing any wrappers around C network libraries, so we have pure erlang implementation that is a peer in p2p webrtc connection.

We can accept published video or stream video to network, handling  stun, turn, srtp, rtp, rtcp and so on including unpacking frames and packing them back.

We do not have data channels.   Benoit, I will get in touch with you and discuss it.

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: webrtc lib

Benoit Chesneau-2


On Sat, May 19, 2018 at 4:47 PM, Max Lapshin <[hidden email]> wrote:
I'm completely against writing any wrappers around C network libraries, so we have pure erlang implementation that is a peer in p2p webrtc connection.

I concur ...

We can accept published video or stream video to network, handling  stun, turn, srtp, rtp, rtcp and so on including unpacking frames and packing them back.

We do not have data channels.   Benoit, I will get in touch with you and discuss it.

Thanks! Feel free to drop me a mail or contact me on irc any time.



_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: webrtc lib

Max Lapshin-2
There is an obvious problem:  right now webrtc implementation is deeply merged with flussonic internals like:

websocket_info({dtls, key_material, #srtp_params{} = SrtpParams}, Req, #publish{stream_name = StreamName} = State) ->
  % events:debug("Got SRTP params: ~p", [SrtpParams]),
  % {ok, DTS} = live_stream:getattr(StreamName, last_dts),
  % Now = erlang:system_time(milli_seconds),
  MI = live_stream:media_info(StreamName),


live_stream is a internal module and not supposed to be exported to public-available library.

It will take some time to extract.

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

webrtc lib

Benoit Chesneau-2
understood :) are you using the latest version of erlang for dtls or still the fork in flussonic btw?

 

On Sun, May 20, 2018 at 9:38 PM, Max Lapshin <[hidden email]> wrote:
There is an obvious problem:  right now webrtc implementation is deeply merged with flussonic internals like:

websocket_info({dtls, key_material, #srtp_params{} = SrtpParams}, Req, #publish{stream_name = StreamName} = State) ->
  % events:debug("Got SRTP params: ~p", [SrtpParams]),
  % {ok, DTS} = live_stream:getattr(StreamName, last_dts),
  % Now = erlang:system_time(milli_seconds),
  MI = live_stream:media_info(StreamName),


live_stream is a internal module and not supposed to be exported to public-available library.

It will take some time to extract.

That's totally understdanable



--
Sent from my Mobile

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: webrtc lib

Max Lapshin-2
Still fork.

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions