webrtc overview

41
WebRTC Overview RouYun Pan 1

Upload: rouyunpan

Post on 07-May-2015

533 views

Category:

Software


3 download

DESCRIPTION

WebRTC Overview

TRANSCRIPT

Page 1: WebRTC overview

1

WebRTC Overview

RouYun Pan

Page 2: WebRTC overview

2

•What is

Page 3: WebRTC overview

3

WebRTC is …?

• WebRTC offers users the ability to conduct a real-time peer-to-peer communication for vioice, video and data.

• Today, WebRTC is still a work in progress.

Page 4: WebRTC overview

4

History- Feb, 2010 Google acquire ON2 Technologies for $124 million, and then release the video engine(VP8).

- May 2010Google acquire Global IP Solutions(GIPS) for $68 million, and then release the source code about audio engine and network.

- Oct 2011First Public Working Draft - W3C

- Feb 2012WebRTC Native APIs 2.0

- June 2012WebRTC Session at Google I/O

- Feb 2013Firefox and Chrome interoperation achieved

Page 5: WebRTC overview

5

What does Webrtc provide?

• Open Source, no royalties, license fees• Real-time flexible voice, video & data

framework in cross platform• Standard Web APIs Interoperable between

browsers• No proprietary plug-in• Security

Page 6: WebRTC overview

6

Low entry barriers

P2P VoIP

WebRTC

PSTN

Entry barrier: complexity

Time

VoIP

Circuit-switched Electric gear Dedicated lines

SIP, IP-based Somewhat

interoperable IMS core (for carriers) Complex systems

Pure IP Peer-to-peer (P2P) Need client software „Walled garden“

HTML5 No plugin needed No client software Fully interoperable

Page 7: WebRTC overview

Standardization

7

IETF*RTCWEB WG formed after BOF at IETF 80, April 2011*Focus on protocols and interoperability.

W3C*W3C WEBRTC WG created May 2011*High level APIs and device control (mic, camera, network)*PeerConnection API proposal originally proposed in WHATWG currently being discussed: http://dev.w3.org/2011/webrtc/editor/webrtc.html

Page 8: WebRTC overview

WebRTC supported on >4bn devices by 2016

8

Page 9: WebRTC overview

9

What’s inside WebRTC

Page 10: WebRTC overview

10

For developer

• It is built into browsers and Using SDKs and APIs of WebRTC can be integrated into Android and iOS apps– Session management– Codec handling– Peer to peer communication– Security– Bandwidth estimation– Signaling and backend are not part of WebRTC

Page 11: WebRTC overview

11

Peer to peer, Server still be required?

Client A Client B

Page 12: WebRTC overview

12

Webrtc need these severs• Signaling Server • ICE Servers• Media Servers (optional)

Page 13: WebRTC overview

13

Signaling plane

• Signaling is the process of coordinating communication. In order for a “WebRTC Call”, its clients may need to exchange information:– Session control messages used to open or close

communication.– Error messages.– Media metadata such as codec settings, bandwidth and

media types.– Key data, used to establish secure connections.– Network data, such as a host's IP address and port as seen

by the outside world.

Page 14: WebRTC overview

14

• SIP/SDP• XMPP/Jingle• Websockets• XHR/Comet

Signaling option in WebRTC

Page 15: WebRTC overview

15

For Example: SDP(conti.) Session Origin Information

Network Information

Audio Information

ICE Candidate for audio

Page 16: WebRTC overview

16

For Example: SDP(conti.)

• http://tools.ietf.org/id/draft-nandakumar-rtcweb-sdp-01.html#rfc.section.5

Indicates NACK RTCP feedback support

Video information

ICE Candidate for video

RTCP setting

data channel information

ICE Candidate for data

Page 17: WebRTC overview

17

WebRTC Signaling triangle

PeerConnection(audio, video and/or data)

Web/Signaling server

Client A Client B

Signaling Signaling

Page 18: WebRTC overview

18

Webrtc Signaling trapezoid

Peerconnection(audio,and video and/or data)

Server A

Client A Client B

Server BJingle or Sip

Signaling Signaling

Page 19: WebRTC overview

19

WebRTC & SIP

PeerConnection(audio and/or video)

Server A

Client A SIP Phone

SIP Serversip

sipSignaling

Page 20: WebRTC overview

20

WebRTC & Jingle

PeerConnection(audio and/or video)

Server A

Client AJingle client

XMPP ServerJingle

jingleSignaling

Page 21: WebRTC overview

21

WebRTC & PSTN

PeerConnection(audio)

Server

Client A Phone BGateway

Signaling sip

analog

Page 22: WebRTC overview

22

WebRTC protocol

Page 23: WebRTC overview

23

RFC Documents

• ICE: Interactive Connectivity Establishment (RFC 5245)– STUN: Session Traversal Utilities for NAT (RFC 5389)– TURN: Traversal Using Relays around NAT (RFC 5766)

• SDP: Session Description Protocol (RFC 4566)• XMPP: Extensible Messaging and Presence Protocol

(RFC 3921)• DTLS: Datagram Transport Layer Security (RFC 6347)• SCTP: Stream Control Transport Protocol (RFC 4960)• SRTP: Secure Real-Time Transport Protocol (RFC 3711)

Page 24: WebRTC overview

24

For example: Secure pathways

Data(SCTP)

Web/Signaling server

Client A Client B

Audio/video(SRTP)

Signaling(https) Signaling(https)

Page 25: WebRTC overview

25

NAT traversal

Client A NAT NAT

Signaling Signaling

Page 26: WebRTC overview

26

Interactive Connectivity Establishment (ICE)

• A framework for connecting peers, it tries to find the best path for each call.– Direct– STUN (Session Traversal Utilities for NAT)– TURN (Traversal Using Relays around NAT)

Page 27: WebRTC overview

27

STUN Server

Client A NAT NAT

Signaling Signaling

Stun server

Media

Page 28: WebRTC overview

28

TURN Server

Client A NAT NAT

Signaling Signaling

Stun server

Media

Turn server

Media

Page 29: WebRTC overview

29

Media engine

Page 30: WebRTC overview

30

VoiceEngine

• OPUS (RFC6716)• G.711(RFC3551)• NetEQ for Voice• Acoustic Echo Canceler• Noise Reduction

* 8 kHz to 48 kHz * Bitrate is about 6- 510 Kbps

Page 31: WebRTC overview

31

VideoEngine

• VP8(RFC6386)• Video Jitter Buffer & Packet Loss• Image enhancements

*1080P at 30 FPS: 2.5+ Mbps*720p at 30 FPS: 1.0~2.0 Mbps*360p at 30 FPS: 0.5~1.0 Mbps*180p at 30 FPS: 0.1~0.5 Mbps

Page 32: WebRTC overview

32

Set up a callApplicaption PeerConnectionfactory

PeerConnectionfactory()

CreatLocolMediaStream()CreatLocolVideoTrack()CreatLocolAudioTrack()(add the tracks to stream)

AddSream()

PeerConnection

CommitStreamChanges()

OnSingalingMessage() - Offer

Get Answer from the remote peer

Remote Peer

Send Offer to the remote peer

Media

OnAddSream()

Page 33: WebRTC overview

33

Receive a callApplicaption PeerConnectionfactory

CreatLocolMediaStream()CreatLocolVideoTrack()CreatLocolAudioTrack()(add the tracks to stream)

AddSream()

PeerConnection

CommitStreamChanges()

Send Answer to the remote peer

Remote Peer

Reciever Offer from the remote peer

ProcessingSingalingMessage() - Offer

Media

OnSinglingMessages() - answer

PeerConnectionfactory()

OnAddStream()

Page 34: WebRTC overview

34

Close a callApplicaption

Close

PeerConnection

OnStateChanges()

Get OK from the remote peer

Remote Peer

Send Shutdown to the remote peer

RemoveStream()

OnSignalingMessgae() - Shutdown

ProcessingMessage() - OK

OnStateChanges()

Page 35: WebRTC overview

35

Comparison with VoIPClassic VoIP WebRTC

Signaling SIP or H.323 Undefined

Media transport RTP/RTCP RTP/RTCP

Security SRTP in SIPH.235 in H.323

SRTP

NAT traversal STUN/TURN/ICE in SIPH.450.x in H.323

STUN/TURN/ICE

Video codec H.263, H.264 VP8

Voice codec G.7xx series G.711, Opus, iLAB, iSAC

Page 36: WebRTC overview

36

What can we do with WebRTC?

Page 37: WebRTC overview

37

Technical support

Page 38: WebRTC overview

38

Home health care

Page 39: WebRTC overview

39

Game streaming

Page 40: WebRTC overview

40

Spy Camera? Wearable device

Page 41: WebRTC overview

41

Q&A