WebRTC is one of the main trends on the multimedia arena in the last few years. The ability of bringing real-time audio and video to WWW browsers opens new horizons for developers to create context aware customized applications for inter-human communications. However, for WebRTC technologies to work seamlessly in WWW applications, it’s necessary to manage with a number of present and future complex challenges.
In this talk, we present the experience of the Kurento Media Server team in creating a WebRTC endpoint for GStreamer. We describe the main problems and limitations basing on current GStreamer status describing which parts of WebRTC standards can be currently implemented with GStreamer and which parts require further evolutions and efforts from the community. We will also describe the plans and drafts that are emerging at different standardization groups, including the WebRTC WG at W3C and the RTCWeb WG at IETF. Basing on this, we will try to forecast how WebRTC technologies in particular, but also how real-time multimedia communications in general, may be evolving in the next couple of years and the activities that the GStreamer community should be considering for adapting to these evolutions.
In particular, we shall introduce in detail topics such as the following:
• The evolution of ICE (Interactive Connectivity Establishment).
• Congestion control for RTC streams.
• Implementing WebRTC security securely
• Implementing and optimizing the AVPF profile for RTP
• Benchmarking WebRTC: stats metrics
• Managing sensor data through DataChannels.
Delhi Call Girls Rohini 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Implementing a WebRTC endpoint in GStreamer: challenges, problems and perspectives
1. Implementing a WebRTC
endpoint in GStreamer:
challenges, problems and
perspectives
8-9 October 2015
Dublin, Ireland
Conference 2015
Miguel París
Jose A. Santos
santoscadenas@gmail.com
mparisdiaz@gmail.com
2. 2
Who we are
José Antonio Santos Cadenas
●
Software Engineer
●
Telematic Systems Master's
●
Developer at Naevatec (Madrid,
Spain)
●
Kurento Media Server (KMS)
manager
●
Integrating with client APIs
●
santoscadenas@gmail.com
Miguel París
●
Software Engineer
●
Telematic Systems Master's
●
Researcher at Universidad Rey
Juan Carlos (Madrid, Spain)
●
Kurento real-time manager
●
mparisdiaz@gmail.com
●
Twitter: @mparisdiaz
3. What is WebRTC
3
●
WebRTC is a new movement bringing RTC to the WWW
●
It is based on standards
●
Supported by Chrome & Firefox
●
Windows Edge added partial support recently
●
Safari is rumored to be on the way of providing it
●
FOSS implementations for Smartphone platforms (iOS and Android)
●
More tan 1B devices currently support WebRTC
Developing
RTC applications
for the WWW
Before WebRTC After WebRTC
Begin End
• Unified APIs
• Standards
• FOSS
• Multiplatform
4. WebRTC standards
4
●
Standard APIs: Standardized by the WebRTC WG at W3C
Media Capture APIs
●
Standardize APIs for media capture
PeerConnection APIs (WebRTC 1.0 almost finished)
●
Standardize API for P2P media communications
●
Media = Audio + Video + Data
●
DataChannel API: low latency
WebRTC stats
●
RTP stats for inbound and outbound directions
●
encode/decode stats
●
DataChannel stats
5. Implementing WebRTC in GStreamer
5
●
Deep interest in the GStreamer community
●
Several implementations
OpenWebRTC (Ericsson)
●
Design for working as part of client applications
Kurento Media Server (Kurento.org)
●
Design for working as part of media server infrastructures
Main differences between them:
OpenWebRTC captures media from camera and mic. KMS doesn't
OpenWebRTC renders to display and speakers. KMS doesn't
OpenWebRTC encodes/decodes audio/video. KMS only if needed.
7. Interactive Connectivity Establishment
ICE I
7
●
Using libnice (NiceSrc and NiceSink)
Involved RFCs:
RFC 5245: Interactive Connectivity Establishment
(ICE): A Protocol for Network Address Translator (NAT)
Traversal for Offer/Answer Protocols
RFC 5389: Session Traversal Utilities for NAT (STUN)
RFC 5766: Traversal Using Relays around NAT (TURN):
Relay Extensions to Session Traversal Utilities for NAT
(STUN)
8. Interactive Connectivity Establishment
ICE II
8
●
Our experience with libnice
0.1.7 version seem to be stable, but lack many
required features
0.1.10 version incorporate relevant features but seem
not to provide the appropriate stability yet
●
Leaks of TCP sockets
●
Connection states
●
Connectivity problems (Fails 1/1000)
Fixed in 0.1.13 ? (we have to check it)
9. ICE III
9
●
What next needed in ICE for WebRTC?
IPv6 shall be mandatory in WebRTC.
We need to check IPv6 support in libnice
draft-ietf-rtcweb-transports-09 (mandates IPv6 support)
HTTP CONNECT protocol for TURN might be important in
corporate networks (connectivity)
draft-hutton-httpbis-connect-protocol-00
STUN consent freshness may become mandatory for
WebRTC. This may require some adjustments on libnice for
supporting consent negotiation (security)
Draft-ietf-rtcweb-stun-consent-freshness-16
ICE stated published through events
ICE state should be reported as specified in the WebRTC
1.0 WG draft
10. DTLS / SRTP I
10
●
Using dtlssrtp(dec|enc) bins
dtls(dec|enc) manages DTLS handshake
srtp(dec|enc) decrypts/encrypts RTP packets
●
Involved RFCs:
RFC 5764: Datagram Transport Security (DTLS)
Extension to Establish Keys for the Secure Real-time
Protocol (SRTP)
RFC 3711: The Secure Real-time Transport Protocol
(SRTP)
11. DTLS / SRTP II
11
●
What next for WebRTC?
New cryptographic framework for group communications
This is under definition at the Privacy Enhanced RTP Conferencing (PERC) IETF
WG
Only early drafts here
draft-jones-perc-private-media-framework-00
draft-jones-perc-private-media-reqts-00
draft-mattsson-perc-srtp-cloud-00
draft-westerlund-perc-webrtc-use-case-00
PERC shall provide in the next few months (improve efficiency)
Enabling unicast group communications without requiring infrastructure to
decipher
New mechanisms enabling unicast group communications without
requiring infrastructure to cipher once per RTC session.
These may require re-factoring of current DTLS stack
DTLS state published through events.
Full connectivity requires ICE connectivity + successful DTLS handshake.
DTLS is being incorporated by the W3C in the WebRTC 1.0 spec as event
generator dealing with connection health
12. Congestion control I
12
●
This is an essential feature for providing satisfactory QoE for WebRTC users
How does it work?
Bandwidth estimator
Based on packet delay (useful RTP ExtHdr: abs-send-time)
Based on packet loss
REMB (Receiver Estimated Maximum Bitrate)
GStreamer does not provide any kind of features for this off the self
How Kurento estimates bandwidth?
on-sending-rtcp
Get packet-loss, bytes-sent, etc. from RtpSession stats
Advantages: simple
Drawbacks
Reactive and not predictive
Requires packet loss to detect BW constraints
Getting RtpSession stats quite inefficient
13. Congestion control II
13
●
For having satisfactory congestion control we should look to the following
drafts
draft-alvestrand-rmcat-remb-03: REMB mechanism implemented by
Chrome
draft-ietf-rmcat-cc-requirements-09: Congestion Control Requirements
for Interactive Real-Time Media
draft-ietf-avtcore-rtp-circuit-breakers-10: Multimedia Congestion Control:
Circuit Breakers for Unicast RTP Sessions
●
In summary, congestion control should:
be predictive
be efficient
be fair
"break the circuit" (drop the BW) in case of evidence of huge congestion
This is to avoid breaking other types of traffic.
14. DataChannels
14
●
Kurento has DataChannels support
●
Protocols: DTLS-SCTP
●
Drafts
draft-ietf-rtcweb-data-channel
draft-ietf-rtcweb-data-protocol
draft-ietf-mmusic-data-channel-sdpneg
Impl. based on sctp(dec|enc) provided by Ericsson
What have Kurento done?
Fixed problems when using Gstreamer 1.4
Fixed a lot of bugs
Implementation of the DataChannel protocol
AppSrc, AppSink
15. Thank you
Suggestions, comments and complains:
mparisdiaz@gmail.com
santoscadenas@gmail.com
http://www.kurento.org
http://www.github.com/kurento
info@kurento.org
Twitter: @kurentoms
http://www.nubomedia.eu
http://www.fi-ware.org
http://ec.europa.eu