How does NACK works in webrtc? - webrtc

I would like to ask how does NACK work in webrtc. I know that we can receive NACK packets. But I don't know if we need to resend rtp packets manually or it done automatically by webrtc and we just need to enable or disable NACK. Also i don't know if it's enabled from the beginning. From sdp I see that there is something like
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
I'm not sure but from these lines I understand that NACK is enabled.
So if yes, do I need to resend rtp packets manually or it done automatically by webrtc? Thank you for any help.

It depends on whether you are writing a WebRTC native client or simply using the WebRTC Javascript API within a web browser. Most use cases are the latter, and in these cases the browser’s WebRTC implementation handles NACKs for you — you don’t need to worry about it.
If you’re writing a native client, then it would help to implement NACKs as the quality will improve, but it’s not strictly necessary.

Related

Do I need SIP + WebRTC

I am working on the webRTC application. Which can receive a call from browsers, The caller's source can be from any phone number or the extension dialed from the webRTC application. I am using the FreeSwitch server for this purpose.
Can anyone help me to know if this is achievable using only WebRTC or do I need SIP + webRTC like sip.JS, jsSIP
You can create a calling application using WebRTC without SIP but you will need to create or choose some form of signalling protocol. WebRTC can transport the audio and video packets for you but it does not specify how to set up the connection between two peers.
Given you're intending to use FreeSWITCH you may find that using SIP is the easiest option for you. FreeSWITCH plus one of the SIP javascript libraries you've mentioned solves your signalling requirements.

Can Janus WebRTC server implement server-side peer?

I've been reading about Janus, looked at the examples. I'm looking for a webRTC component that I can use in the following way:
Receive RTP video packets from some external sender
Become a WebRTC peer and connect to an external WebRTC signaling server, STUN, TURN, the usuals
Send the incoming RTP packets as a coherent video via the WebRTC peer connection to some other peer on a browser on the Internet
Is Janus the right tool? Maybe there are other tools? Would appreciate some directions..
Thanks!
I am not sure about Janus.
You can achieve these functionalities with LM Tools (lmtools.com) with easy configuration. It can receive RTP packets from external sender and can send those packets as per WebRTC specification to other peer.
Please note LM tools is not free software like JSON, though you can have free trial for 1 month.
Disclaimer: I work for LM Tools.
Can Janus WebRTC server implement server-side peer?
Yes, can can do that. What you are looking for is an RTP forwarding and you will get more context, and expert opinion from their community friendly google group page.
I hope you are looking for a Gateway solution.
(RTP/RTCP separate streams are converted to webrtc RTP/RTCP mux)
For this you need to make changes in the Janus code or use some plugin supporting RTP/RTSP.
Current Janus server relays RTP/RTCP and messages between browsers.
https://janus.conf.meetecho.com/docs/

Videochat without using webrtc?

I say "without" using webrtc because, webrtc currently supports very few codecs, I would like to make a videochat using a custom or experimental codecs, so I'm starting with implementing basic udp websockets, but how do I implement something like SDP? Since the ip of the clients will keep changing, how do I maintain connection? Can anyone point me to a decent way of implementing this?

Disposing kurento webrtc endpoints from java and javascript doesn't remove it from chrome webrtcinternals

We are releasing the webrtc endpoints when user leaves the group call and same on the java script side (disposing the webrtc peer).
In the java logs I also get a callback for successful release of webrtc endpoints.
However, that webrtc peer is not getting removed when we monitor Chrome's webrtc internals. But, those peers don't show any traffic.
Is this an issue with Chrome's webrtc internals that it is not getting cleared from the list?
-Thanks.
It is an issue when releasing RTCPeerConnection resources. The standard does not specify when those resources must be freed, so they stay there until you reload the page. There's little we can do about that, sorry!
Unless of course we are doing something wrong ;-)

Twilio WebRTC vs DIY WebRTC

Is WebRTC going to be free for web developers to set up video calls on web pages?
why does Twilio having pricing 25c per mins for video calls,
is it going to be too expensive for the small guy to mange video calls on web hosting servers?
any advice from anyone deep into WebRTC already?
Some of the comments above are not well informed.
Someone wrote, since the bandwidth needed in case of media relay is higher as well. This is not entirely true, transmission happens between Peers(Browsers), servers are used just for signalling(relaying IP addresses of connecting peers and some more info), you can ROUTE your transmission from central server(for fail overs), but can surely do without it for free.
WebRTC is Free and you can setup the whole thing on your own without having to shell out even a penny. It is a bit hard and mitigating fail-overs is really difficult, but you can certainly do it for free.
Tokbox or Twilio charge money because these tools abstract some very rigid complexities of setting up, running and managing fail-overs in a WebRTC application.
In TokBox's Case:
You don't need to setup STUN, TURN servers, you don't have to worry
about integration with android or IOS clients, they provide a plugin
for IE too, so out of box you get everything and you just have to
concentrate on your application logic rather than WebRTC nuances.
This is a big plus.
Both RELAY and ROUTED schemes came in the box hence you can write
fail-over scenarios if RELAY communication fails. Although there are
some good JavaScript based frameworks that do this in a much cleaner
manner.
It adds slew of other goodies which help in building android and IOS
clients without any pain.
STUN or TURN Servers are used only for Signalling Purpose, and this signalling happens before any actual transmission. This signal is very small and carries the IP address of both the browsers(machines running browsers). For Transmission the communication is done between Browsers(Peer to Peer) themselves, so no server is involved.
Your relay is not happening from a central server so you don't have
to pay for the outgoing bandwidth cost.
To Setup Turn Server,
Use this server, build it and put it into a Rackspace/Amazon Web
Services instance and you are Good with your TURN
Server. That is It, setup your application and have fun with WebRTC
for FREE.
rfc5766-turn-server
If you wish to Use some more free framework to ease yourself more, check out: EasyRTC and PeerJS
Enjoy Developing with WebRTC....
Twilio developer evangelist here.
Your link at the end of your question points to our WebRTC page, which currently talks about the product Twilio Client. Twilio Client briefly is a way that, using WebRTC within browsers and mobile applications you can make phone calls to real phone numbers. This product does not allow you to conduct video calls.
Twilio Client has a cost because of the ability to call out from a browser to a telephone number. The cost is not in the WebRTC portion, but delivering those minutes to the other leg of the call.
Notably, it's not 25 cents ($0.25) a minute, instead it is just a quarter of a cent ($0.0025) a minute.
With regards to video calls with WebRTC, you can now access the public beta of Twilio Video, a platform to make setting up WebRTC calls much easier.
Twilio Video costs for the signalling infrastructure and you can see the prices here. If a WebRTC connection requires a TURN server to relay the media, that also costs per gigabyte of transfer. Usage of the STUN server is free, the costs for the TURN relay are available here.
Please get in touch with me at philnash#twilio.com if you have any other questions about WebRTC.
WebRTC is a technology placed in a browser. It requires backend infrastructure to support it - specifically, STUN and TURN servers as well as signaling servers.
This boils down to the fact that you pay for WebRTC - same as you pay for hosting your website on a server. The price is higher, since the bandwidth needed in case of media relay is higher as well.
To understand more about WebRTC and how it works (as well as why there's a price tag associated with services such as Twilio for it), you can check this free report: https://bloggeek.me/webrtc-business-people/
WebRTC is already free for developers to use. When we added WebRTC to our product, we used this example code, which made it very simple to build a WebRTC client:
https://shanetully.com/2014/09/a-dead-simple-webrtc-example/
Google and Mozilla provide free STUN servers, and it is easy to set up a TURN server. Most clients will be able to connect via STUN, so you won't end up using too much bandwidth on your TURN server.
To set up your own TURN server, coturn seems to be the easiest to set up:
https://github.com/coturn/coturn
Make sure you read the "WEBRTC USAGE" section in the README.turnserver file.
"STUN or TURN Servers are used only for Signalling Purpose, and this signalling happens before any actual transmission. This signal is very small and carries the IP address of both the browsers(machines running browsers). For Transmission the communication is done between Browsers(Peer to Peer) themselves, so no server is involved."
if that is the case, then you should be able to do this on a standard web server using Java/php. PHP will get the IP address of the guys connected to it. Then its just a matter of storing them in MySQL, then making a javascript that would run when the user go to that page in the site.
I've been looking for a solution around using a VPS because running a dedicated server for signaling is like golfing with a Ferrari instead of a golf cart. I still don't think node is efficient. Its single threaded. so node's fararri can only go 5mph.
Since they went to the web site, the php service already can get their ip address what else does it need? All of the above solutions so far require you to pay for a dedicated app to run on a server connected to the web separately for what 5k of data? What a waste of electrons.
But I'm going to start a new thread that is going to be based on getting webrtc without the buy a "VPS" because we want a VPS-less solution.