SlideShare une entreprise Scribd logo
1  sur  33
mediasoup
Powerful WebRTC SFU for Node.js
IÑAKI BAZ CASTIL
SOMETHING ABOUT IT
WHAT IS MEDIASOUP?
A WebRTC SFU “Selective Forwarding Unit”
▸Handles the media layer
▸Doesn’t mix audio/video streams
A multi-party video solution for Node.js
▸Not a standalone media server
▸A server-side Node.js module
▸JavaScript ES6 API (core written in C++)
TOPOLOGIE
MULTI-PARTY VIDEO CONFERENCING
TOPOLOGIES
FULL MESH
▸ Each participant sends his audio and
video to all other participants
▸ Each participant receives all the streams
from all other participants
No media server needed
Low latency
Lot of encodings in each participant
High uplink bandwidth required
TOPOLOGIES
MCU: MULTIPOINT
CONTROL UNIT▸ Each participant sends his streams to a media server
▸ The server mixes all the streams and composes a
single one
▸ Example: Asterisk meetme
Simple at client side: single audio/video mixed stream
from the server
Interoperability: the server can transcode
Low bandwidth required
CPU expensive decoding/encoding in server side
(high latency)
Non flexible client side applications
TOPOLOGIES
SFU: SELECTIVE
FORWARDING UNIT▸ Participant sends his streams to a media server
▸ The media server routes the streams to all other
participants
▸ Each participant receives many streams
High throughput, low latency
Low CPU at server side (no decoding/encoding)
Good uplink bandwidth usage
The client side application can render each
remote video stream as desired
Simulcast/SVC required for real scenarios
THE MAN IN THE
MOUNTAINS
SIMULCAST / SVC
A MULTI-PARTY FAMILY VIDEOCONFERENCE
Manu
▸At parents’ house
▸Antisystem
▸…but owns an iPhone 6
▸Excellent Wi-Fi connection
Beatriz
▸At home
▸Conservative
▸MacBook Air
▸Excellent Wi-Fi connection
Roberto
▸In the mountains
▸Unknown ideology
▸HTC Desire (2010)
▸Poor 3G connection
A MULTI-PARTY FAMILY VIDEOCONFERENCE
THE PROBLEM
▸Roberto has not a good
bandwidth
▸Roberto can not receive HD
video from Manu and
Beatriz
OUGH
!
A MULTI-PARTY FAMILY VIDEOCONFERENCE
POSSIBLE SOLUTIONS
1. Drop Roberto from the conference
2. Limit the video quality of Manu and Beatriz
3. …
A MULTI-PARTY FAMILY VIDEOCONFERENCE
SOLUTION: SIMULCAST / SVC
▸Manu and Beatriz send
different “quality” video
layers
▸The SFU chooses the
appropriate ones for
Roberto
TOPOLOGIES
FULL MESH MCU SFU
Client uplink Very high Low Low
Client downlink Very high Low High
Client CPU usage Very high Low Medium
Server CPU usage - Very high Very low
Latency None High Low
Can transcode - Yes No
Requires simulcast/SVC - - Yes
Flexible video layout Yes No Yes
MEDIASOUP
IS AN SFU
YES!
MEDIASOU
P IS
MINIMALIS
T
MEDIASOUP IS MINIMALIST
WHAT IS *NOT* MEDIASOUP?
▸It is NOT a standalone server
▸It does NOT have “init” scripts for Debian or CentOS
▸It does NOT have a “config” file
▸It does NOT implement the SIP protocol
▸It does NOT implement ANY signaling protocol
▸It does NOT provide an “admin” web interface
▸It does NOT provide a client SDK
MEDIASOUP IS A
NODE.JS MODULE
Yours truly
REMEMBER
SO
WHAT
OK…
$ npm install —save mediasoup
MEDIASOUP & NODE.JS
A NODE.JS MODULE
▸A Node.js module is a dependency/library within a project
▸You create your Node.js based project/application
▸You add mediasoup as a module into it
MEDIASOUP & NODE.JS
A PACKAGE.JSON EXAMPLE
{
"name": "my-amazing-multiconference-server-app",
"version": "1.0.0",
"description": "Enterprise conferencing application",
"main": "index.js",
"author": "My Great Company",
"license": "UNLICENSED",
"dependencies": {
"express": "^4.14.0",
"mediasoup": "^1.0.0",
"socket.io": "^1.5.0"
}
}
WHY NODE.JS?
ASK THEM
MEDIASOUP
EXPOSES A
JAVASCRIPT
// Load mediasoup module
const mediasoup = require('mediasoup');
// Create a mediasoup Server
let server = mediasoup.Server();
// Options for the mediasoup Room
const roomOptions = {
mediaCodecs: [
{
kind : 'audio',
name : 'audio/opus',
clockRate : 48000
},
{
kind : 'video',
name : 'video/vp8',
clockRate : 90000
}
]
};
// Create a mediasoup Room
server.createRoom(roomOptions)
.then((room) => {
// Got the Room instance
handleRoom(room);
});
MEDIASOUP API
LOW LEVEL API
mediasoup exposes a low level API similar to ORTC
// Create a Peer
let peer = room.Peer('alice');
// Create a ICE+DTLS Transport
peer.createTransport(options)
.then((transport) => {
transport.setRemoteDtlsParameters(data);
});
// Create a RtpReceiver to handle audio from the browser
let audioReceiver = peer.RtpReceiver('audio', transport);
// Create a RtpReceiver to handle video from the browser
let videoReceiver = peer.RtpReceiver('video', transport);
MEDIASOUP API
HIGH LEVEL API
mediasoup also exposes a high level API similar to WebRTC 1.0
// Create a PeerConnection
let peerconnection = new mediasoup.webrtc.RTCPeerConnection(room, 'alice');
// Set the remote SDP offer
peerconnection.setRemoteDescription(desc)
.then(() => {
return peerconnection.createAnswer();
})
.then((desc) => {
return peerconnection.setLocalDescription(desc);
})
.then(() => {
// Answer the participant request with the SDP answer
request.accept({
sdp: peerconnection.localDescription.sdp
});
});
MEDIASOUP JUST
FORWARDS MEDIA
REMEMBER
Sincerely yours
MEDIASOUP API
JUST MEDIA
▸mediasoup does NOT talk the SIP protocol
▸…nor it talks ANY signaling protocol
▸You can use socket.io (for example) to communicate with
browsers/endpoints via WebSocket
▸…or build your own protocol
ROADM
AP
MEDIASOUP ROADMAP
WORKING ON IT…
1.0.0
▸RTCP: process RTCP reports to allow mediasoup diagnose
per peer uplink/downlink issues
▸WebRTC 1.0: more API needed
2.0.0
▸Simulcast & SVC: handle multiple streams/layers from clients
and select which one to route to others
YOUR TURN
THE
THE APPLICATION
ASK YOURSELF
▸ Want to build yet another boring enterprise
conferencing app?
▸ May be a funny social app?
▸ Will you build the app on Node.js?
▸ Browser app? mobile app? native
Android/iOS SDKs?
▸ Do you need interoperability with PSTN?
Really?
GOING
FORWARD
WEBRTC STATUS IN
BROWSERS
LET’S DEMO !!!
DEMO APPLICATION
FIRSTSIGHT
“See many people, only talk to one”
Backend
▸Node.js server running mediasoup and websocket modules
▸JS logic to handle media rooms and manage participants
Frontend
▸HTML5 application made with React.js
▸JS logic to handle MediaStream from room participants
MUCHAS GRACIAS
Iñaki Baz Castillo
THE END
http://mediasoup.org

Contenu connexe

Tendances

リアルタイムリモートデバッグ環境によるゲーム開発イテレーションの高速化【DeNA TechCon 2020 ライブ配信】
リアルタイムリモートデバッグ環境によるゲーム開発イテレーションの高速化【DeNA TechCon 2020 ライブ配信】リアルタイムリモートデバッグ環境によるゲーム開発イテレーションの高速化【DeNA TechCon 2020 ライブ配信】
リアルタイムリモートデバッグ環境によるゲーム開発イテレーションの高速化【DeNA TechCon 2020 ライブ配信】DeNA
 
ベイジアンネットとレコメンデーション -第5回データマイニング+WEB勉強会@東京
ベイジアンネットとレコメンデーション -第5回データマイニング+WEB勉強会@東京ベイジアンネットとレコメンデーション -第5回データマイニング+WEB勉強会@東京
ベイジアンネットとレコメンデーション -第5回データマイニング+WEB勉強会@東京Koichi Hamada
 
AbemaTVの動画配信を支えるサーバーサイドシステム
AbemaTVの動画配信を支えるサーバーサイドシステムAbemaTVの動画配信を支えるサーバーサイドシステム
AbemaTVの動画配信を支えるサーバーサイドシステムyuichiro nakazawa
 
Parser combinatorってなんなのさ
Parser combinatorってなんなのさParser combinatorってなんなのさ
Parser combinatorってなんなのさcct-inc
 
Cargo makeを使ってみた話
Cargo makeを使ってみた話Cargo makeを使ってみた話
Cargo makeを使ってみた話emakryo
 
【Unity】 Behavior TreeでAIを作る
 【Unity】 Behavior TreeでAIを作る 【Unity】 Behavior TreeでAIを作る
【Unity】 Behavior TreeでAIを作るtorisoup
 
WebRTC/ORTCの最新動向まるわかり!
WebRTC/ORTCの最新動向まるわかり!WebRTC/ORTCの最新動向まるわかり!
WebRTC/ORTCの最新動向まるわかり!Yusuke Naka
 
自然言語処理基礎の基礎
自然言語処理基礎の基礎自然言語処理基礎の基礎
自然言語処理基礎の基礎Takashi Minowa
 
Unityでオンラインゲーム作った話
Unityでオンラインゲーム作った話Unityでオンラインゲーム作った話
Unityでオンラインゲーム作った話torisoup
 
HLSについて知っていることを話します
HLSについて知っていることを話しますHLSについて知っていることを話します
HLSについて知っていることを話しますMoriyoshi Koizumi
 
ユーザーストーリーの分割
ユーザーストーリーの分割ユーザーストーリーの分割
ユーザーストーリーの分割Arata Fujimura
 
[DI05] Azure Event Hubs と Azure Stream Analytics で、”今を処理”する
[DI05] Azure Event Hubs と Azure Stream Analytics で、”今を処理”する[DI05] Azure Event Hubs と Azure Stream Analytics で、”今を処理”する
[DI05] Azure Event Hubs と Azure Stream Analytics で、”今を処理”するde:code 2017
 
動画配信の基礎知識
動画配信の基礎知識動画配信の基礎知識
動画配信の基礎知識Daiyu Hatakeyama
 
GPT : Generative Pre-Training Model
GPT : Generative Pre-Training ModelGPT : Generative Pre-Training Model
GPT : Generative Pre-Training ModelZimin Park
 
MonotaRO のデータ活用と基盤の過去、現在、未来
MonotaRO のデータ活用と基盤の過去、現在、未来 MonotaRO のデータ活用と基盤の過去、現在、未来
MonotaRO のデータ活用と基盤の過去、現在、未来 株式会社MonotaRO Tech Team
 
ChatGPT の現状理解と 2023年7月版 LLM情報アップデート
ChatGPT の現状理解と 2023年7月版 LLM情報アップデートChatGPT の現状理解と 2023年7月版 LLM情報アップデート
ChatGPT の現状理解と 2023年7月版 LLM情報アップデートSatoshi Kume
 
TDDBC Fukuoka Day1
TDDBC Fukuoka Day1TDDBC Fukuoka Day1
TDDBC Fukuoka Day1Takuto Wada
 
Probabilistic fasttext for multi sense word embeddings
 Probabilistic fasttext for multi sense word embeddings Probabilistic fasttext for multi sense word embeddings
Probabilistic fasttext for multi sense word embeddingsMakoto Takenaka
 

Tendances (20)

リアルタイムリモートデバッグ環境によるゲーム開発イテレーションの高速化【DeNA TechCon 2020 ライブ配信】
リアルタイムリモートデバッグ環境によるゲーム開発イテレーションの高速化【DeNA TechCon 2020 ライブ配信】リアルタイムリモートデバッグ環境によるゲーム開発イテレーションの高速化【DeNA TechCon 2020 ライブ配信】
リアルタイムリモートデバッグ環境によるゲーム開発イテレーションの高速化【DeNA TechCon 2020 ライブ配信】
 
ベイジアンネットとレコメンデーション -第5回データマイニング+WEB勉強会@東京
ベイジアンネットとレコメンデーション -第5回データマイニング+WEB勉強会@東京ベイジアンネットとレコメンデーション -第5回データマイニング+WEB勉強会@東京
ベイジアンネットとレコメンデーション -第5回データマイニング+WEB勉強会@東京
 
AbemaTVの動画配信を支えるサーバーサイドシステム
AbemaTVの動画配信を支えるサーバーサイドシステムAbemaTVの動画配信を支えるサーバーサイドシステム
AbemaTVの動画配信を支えるサーバーサイドシステム
 
Parser combinatorってなんなのさ
Parser combinatorってなんなのさParser combinatorってなんなのさ
Parser combinatorってなんなのさ
 
Cargo makeを使ってみた話
Cargo makeを使ってみた話Cargo makeを使ってみた話
Cargo makeを使ってみた話
 
【Unity】 Behavior TreeでAIを作る
 【Unity】 Behavior TreeでAIを作る 【Unity】 Behavior TreeでAIを作る
【Unity】 Behavior TreeでAIを作る
 
WebRTC/ORTCの最新動向まるわかり!
WebRTC/ORTCの最新動向まるわかり!WebRTC/ORTCの最新動向まるわかり!
WebRTC/ORTCの最新動向まるわかり!
 
自然言語処理基礎の基礎
自然言語処理基礎の基礎自然言語処理基礎の基礎
自然言語処理基礎の基礎
 
Unityでオンラインゲーム作った話
Unityでオンラインゲーム作った話Unityでオンラインゲーム作った話
Unityでオンラインゲーム作った話
 
【Unity】Scriptable object 入門と活用例
【Unity】Scriptable object 入門と活用例【Unity】Scriptable object 入門と活用例
【Unity】Scriptable object 入門と活用例
 
HLSについて知っていることを話します
HLSについて知っていることを話しますHLSについて知っていることを話します
HLSについて知っていることを話します
 
ユーザーストーリーの分割
ユーザーストーリーの分割ユーザーストーリーの分割
ユーザーストーリーの分割
 
[DI05] Azure Event Hubs と Azure Stream Analytics で、”今を処理”する
[DI05] Azure Event Hubs と Azure Stream Analytics で、”今を処理”する[DI05] Azure Event Hubs と Azure Stream Analytics で、”今を処理”する
[DI05] Azure Event Hubs と Azure Stream Analytics で、”今を処理”する
 
動画配信の基礎知識
動画配信の基礎知識動画配信の基礎知識
動画配信の基礎知識
 
GPT : Generative Pre-Training Model
GPT : Generative Pre-Training ModelGPT : Generative Pre-Training Model
GPT : Generative Pre-Training Model
 
YJTC18 A-1 データセンタネットワークの取り組み
YJTC18 A-1 データセンタネットワークの取り組みYJTC18 A-1 データセンタネットワークの取り組み
YJTC18 A-1 データセンタネットワークの取り組み
 
MonotaRO のデータ活用と基盤の過去、現在、未来
MonotaRO のデータ活用と基盤の過去、現在、未来 MonotaRO のデータ活用と基盤の過去、現在、未来
MonotaRO のデータ活用と基盤の過去、現在、未来
 
ChatGPT の現状理解と 2023年7月版 LLM情報アップデート
ChatGPT の現状理解と 2023年7月版 LLM情報アップデートChatGPT の現状理解と 2023年7月版 LLM情報アップデート
ChatGPT の現状理解と 2023年7月版 LLM情報アップデート
 
TDDBC Fukuoka Day1
TDDBC Fukuoka Day1TDDBC Fukuoka Day1
TDDBC Fukuoka Day1
 
Probabilistic fasttext for multi sense word embeddings
 Probabilistic fasttext for multi sense word embeddings Probabilistic fasttext for multi sense word embeddings
Probabilistic fasttext for multi sense word embeddings
 

Similaire à voip2day 2016: mediasoup, powerful WebRTC SFU for Node.js

Iñaki Baz - VoIP2DAY 2016 | mediasoup: The programmable media server
Iñaki Baz - VoIP2DAY 2016 | mediasoup: The programmable media serverIñaki Baz - VoIP2DAY 2016 | mediasoup: The programmable media server
Iñaki Baz - VoIP2DAY 2016 | mediasoup: The programmable media serverVOIP2DAY
 
[ElastixWorld 2016] mediasoup: Powerful WebRTC SFU for Node.js
[ElastixWorld 2016] mediasoup: Powerful WebRTC SFU for Node.js[ElastixWorld 2016] mediasoup: Powerful WebRTC SFU for Node.js
[ElastixWorld 2016] mediasoup: Powerful WebRTC SFU for Node.jsIñaki Baz Castillo
 
Iñaki Baz - CommCon 2018 | Building multy-party video apps with mediasoup
Iñaki Baz - CommCon 2018 | Building multy-party video apps with mediasoupIñaki Baz - CommCon 2018 | Building multy-party video apps with mediasoup
Iñaki Baz - CommCon 2018 | Building multy-party video apps with mediasoupIñaki Baz Castillo
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopleffen
 
Introduction to WebRTC
Introduction to WebRTCIntroduction to WebRTC
Introduction to WebRTCArt Matsak
 
Movi presentation Singapore video tech meetup
Movi presentation Singapore video tech meetupMovi presentation Singapore video tech meetup
Movi presentation Singapore video tech meetupLars-Erik M Ravn
 
St open mic_av_01092013
St open mic_av_01092013St open mic_av_01092013
St open mic_av_01092013a8us
 
Nuxeo5 - Continuous Integration
Nuxeo5 - Continuous IntegrationNuxeo5 - Continuous Integration
Nuxeo5 - Continuous IntegrationPASCAL Jean Marie
 
20040927-Commons-Riddle.ppt
20040927-Commons-Riddle.ppt20040927-Commons-Riddle.ppt
20040927-Commons-Riddle.pptVideoguy
 
Building video applications on Windows 8 with Windows Azure Media Services
Building video applications on Windows 8 with Windows Azure Media ServicesBuilding video applications on Windows 8 with Windows Azure Media Services
Building video applications on Windows 8 with Windows Azure Media ServicesMingfei Yan
 
FreeSWITCH on Docker
FreeSWITCH on DockerFreeSWITCH on Docker
FreeSWITCH on Docker建澄 吳
 
Building your own Desktop Cloud Environment
Building your own Desktop Cloud EnvironmentBuilding your own Desktop Cloud Environment
Building your own Desktop Cloud EnvironmentJnaapti
 
FMS Administration Seminar
FMS Administration SeminarFMS Administration Seminar
FMS Administration SeminarYoss Cohen
 
Practical Introduction To Linux
Practical Introduction To LinuxPractical Introduction To Linux
Practical Introduction To LinuxZeeshan Rizvi
 
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)Chris Adamson
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 
An Instantaneous Introduction to the Alliance Access Grid
An Instantaneous Introduction to the Alliance Access GridAn Instantaneous Introduction to the Alliance Access Grid
An Instantaneous Introduction to the Alliance Access GridVideoguy
 

Similaire à voip2day 2016: mediasoup, powerful WebRTC SFU for Node.js (20)

Iñaki Baz - VoIP2DAY 2016 | mediasoup: The programmable media server
Iñaki Baz - VoIP2DAY 2016 | mediasoup: The programmable media serverIñaki Baz - VoIP2DAY 2016 | mediasoup: The programmable media server
Iñaki Baz - VoIP2DAY 2016 | mediasoup: The programmable media server
 
[ElastixWorld 2016] mediasoup: Powerful WebRTC SFU for Node.js
[ElastixWorld 2016] mediasoup: Powerful WebRTC SFU for Node.js[ElastixWorld 2016] mediasoup: Powerful WebRTC SFU for Node.js
[ElastixWorld 2016] mediasoup: Powerful WebRTC SFU for Node.js
 
Iñaki Baz - CommCon 2018 | Building multy-party video apps with mediasoup
Iñaki Baz - CommCon 2018 | Building multy-party video apps with mediasoupIñaki Baz - CommCon 2018 | Building multy-party video apps with mediasoup
Iñaki Baz - CommCon 2018 | Building multy-party video apps with mediasoup
 
OSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshopOSDC.no 2015 introduction to node.js workshop
OSDC.no 2015 introduction to node.js workshop
 
Introduction to WebRTC
Introduction to WebRTCIntroduction to WebRTC
Introduction to WebRTC
 
Movi presentation Singapore video tech meetup
Movi presentation Singapore video tech meetupMovi presentation Singapore video tech meetup
Movi presentation Singapore video tech meetup
 
St open mic_av_01092013
St open mic_av_01092013St open mic_av_01092013
St open mic_av_01092013
 
Nuxeo5 - Continuous Integration
Nuxeo5 - Continuous IntegrationNuxeo5 - Continuous Integration
Nuxeo5 - Continuous Integration
 
20040927-Commons-Riddle.ppt
20040927-Commons-Riddle.ppt20040927-Commons-Riddle.ppt
20040927-Commons-Riddle.ppt
 
Building video applications on Windows 8 with Windows Azure Media Services
Building video applications on Windows 8 with Windows Azure Media ServicesBuilding video applications on Windows 8 with Windows Azure Media Services
Building video applications on Windows 8 with Windows Azure Media Services
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
FreeSWITCH on Docker
FreeSWITCH on DockerFreeSWITCH on Docker
FreeSWITCH on Docker
 
FreeSWITCH on Docker
FreeSWITCH on DockerFreeSWITCH on Docker
FreeSWITCH on Docker
 
Building your own Desktop Cloud Environment
Building your own Desktop Cloud EnvironmentBuilding your own Desktop Cloud Environment
Building your own Desktop Cloud Environment
 
FMS Administration Seminar
FMS Administration SeminarFMS Administration Seminar
FMS Administration Seminar
 
Medusa Project
Medusa ProjectMedusa Project
Medusa Project
 
Practical Introduction To Linux
Practical Introduction To LinuxPractical Introduction To Linux
Practical Introduction To Linux
 
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
Building A Streaming Apple TV App (CocoaConf DC, Sept 2016)
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
An Instantaneous Introduction to the Alliance Access Grid
An Instantaneous Introduction to the Alliance Access GridAn Instantaneous Introduction to the Alliance Access Grid
An Instantaneous Introduction to the Alliance Access Grid
 

Plus de Iñaki Baz Castillo

Iñaki Baz - VoIP2DAY 2017 | WebRTC: Más allá de conferencias
Iñaki Baz - VoIP2DAY 2017 | WebRTC: Más allá de conferenciasIñaki Baz - VoIP2DAY 2017 | WebRTC: Más allá de conferencias
Iñaki Baz - VoIP2DAY 2017 | WebRTC: Más allá de conferenciasIñaki Baz Castillo
 
[VoIP2Day 2013] Si sólo ves un webphone no entiendes WebRTC
[VoIP2Day 2013] Si sólo ves un webphone no entiendes WebRTC[VoIP2Day 2013] Si sólo ves un webphone no entiendes WebRTC
[VoIP2Day 2013] Si sólo ves un webphone no entiendes WebRTCIñaki Baz Castillo
 
[ElastixWorld 2013 Mexico] Si sólo ves un webphone no entiendes WebRTC
[ElastixWorld 2013 Mexico] Si sólo ves un webphone no entiendes WebRTC[ElastixWorld 2013 Mexico] Si sólo ves un webphone no entiendes WebRTC
[ElastixWorld 2013 Mexico] Si sólo ves un webphone no entiendes WebRTCIñaki Baz Castillo
 
[4K Conf 2012] SIP y WebRTC para Seres Humanos (tm)
[4K Conf 2012] SIP y WebRTC para Seres Humanos (tm)[4K Conf 2012] SIP y WebRTC para Seres Humanos (tm)
[4K Conf 2012] SIP y WebRTC para Seres Humanos (tm)Iñaki Baz Castillo
 
[VoIP2Day 2009] Presente y futuro de las comunicaciones VoIP
[VoIP2Day 2009] Presente y futuro de las comunicaciones VoIP[VoIP2Day 2009] Presente y futuro de las comunicaciones VoIP
[VoIP2Day 2009] Presente y futuro de las comunicaciones VoIPIñaki Baz Castillo
 
[VoIP2Day 2008] Asterisk & Carriers PSTN
[VoIP2Day 2008] Asterisk & Carriers PSTN[VoIP2Day 2008] Asterisk & Carriers PSTN
[VoIP2Day 2008] Asterisk & Carriers PSTNIñaki Baz Castillo
 

Plus de Iñaki Baz Castillo (7)

Iñaki Baz - VoIP2DAY 2017 | WebRTC: Más allá de conferencias
Iñaki Baz - VoIP2DAY 2017 | WebRTC: Más allá de conferenciasIñaki Baz - VoIP2DAY 2017 | WebRTC: Más allá de conferencias
Iñaki Baz - VoIP2DAY 2017 | WebRTC: Más allá de conferencias
 
[VoIP2Day 2013] Si sólo ves un webphone no entiendes WebRTC
[VoIP2Day 2013] Si sólo ves un webphone no entiendes WebRTC[VoIP2Day 2013] Si sólo ves un webphone no entiendes WebRTC
[VoIP2Day 2013] Si sólo ves un webphone no entiendes WebRTC
 
[ElastixWorld 2013 Mexico] Si sólo ves un webphone no entiendes WebRTC
[ElastixWorld 2013 Mexico] Si sólo ves un webphone no entiendes WebRTC[ElastixWorld 2013 Mexico] Si sólo ves un webphone no entiendes WebRTC
[ElastixWorld 2013 Mexico] Si sólo ves un webphone no entiendes WebRTC
 
[4K Conf 2012] SIP y WebRTC para Seres Humanos (tm)
[4K Conf 2012] SIP y WebRTC para Seres Humanos (tm)[4K Conf 2012] SIP y WebRTC para Seres Humanos (tm)
[4K Conf 2012] SIP y WebRTC para Seres Humanos (tm)
 
[VoIP2Day 2012] World Wide SIP
[VoIP2Day 2012] World Wide SIP[VoIP2Day 2012] World Wide SIP
[VoIP2Day 2012] World Wide SIP
 
[VoIP2Day 2009] Presente y futuro de las comunicaciones VoIP
[VoIP2Day 2009] Presente y futuro de las comunicaciones VoIP[VoIP2Day 2009] Presente y futuro de las comunicaciones VoIP
[VoIP2Day 2009] Presente y futuro de las comunicaciones VoIP
 
[VoIP2Day 2008] Asterisk & Carriers PSTN
[VoIP2Day 2008] Asterisk & Carriers PSTN[VoIP2Day 2008] Asterisk & Carriers PSTN
[VoIP2Day 2008] Asterisk & Carriers PSTN
 

Dernier

WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benonimasabamasaba
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 

Dernier (20)

WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With SimplicityWSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
WSO2Con2024 - Enabling Transactional System's Exponential Growth With Simplicity
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - KeynoteWSO2Con204 - Hard Rock Presentation - Keynote
WSO2Con204 - Hard Rock Presentation - Keynote
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 

voip2day 2016: mediasoup, powerful WebRTC SFU for Node.js

  • 1. mediasoup Powerful WebRTC SFU for Node.js IÑAKI BAZ CASTIL
  • 2. SOMETHING ABOUT IT WHAT IS MEDIASOUP? A WebRTC SFU “Selective Forwarding Unit” ▸Handles the media layer ▸Doesn’t mix audio/video streams A multi-party video solution for Node.js ▸Not a standalone media server ▸A server-side Node.js module ▸JavaScript ES6 API (core written in C++)
  • 4. TOPOLOGIES FULL MESH ▸ Each participant sends his audio and video to all other participants ▸ Each participant receives all the streams from all other participants No media server needed Low latency Lot of encodings in each participant High uplink bandwidth required
  • 5. TOPOLOGIES MCU: MULTIPOINT CONTROL UNIT▸ Each participant sends his streams to a media server ▸ The server mixes all the streams and composes a single one ▸ Example: Asterisk meetme Simple at client side: single audio/video mixed stream from the server Interoperability: the server can transcode Low bandwidth required CPU expensive decoding/encoding in server side (high latency) Non flexible client side applications
  • 6. TOPOLOGIES SFU: SELECTIVE FORWARDING UNIT▸ Participant sends his streams to a media server ▸ The media server routes the streams to all other participants ▸ Each participant receives many streams High throughput, low latency Low CPU at server side (no decoding/encoding) Good uplink bandwidth usage The client side application can render each remote video stream as desired Simulcast/SVC required for real scenarios
  • 7. THE MAN IN THE MOUNTAINS SIMULCAST / SVC
  • 8. A MULTI-PARTY FAMILY VIDEOCONFERENCE Manu ▸At parents’ house ▸Antisystem ▸…but owns an iPhone 6 ▸Excellent Wi-Fi connection Beatriz ▸At home ▸Conservative ▸MacBook Air ▸Excellent Wi-Fi connection Roberto ▸In the mountains ▸Unknown ideology ▸HTC Desire (2010) ▸Poor 3G connection
  • 9. A MULTI-PARTY FAMILY VIDEOCONFERENCE THE PROBLEM ▸Roberto has not a good bandwidth ▸Roberto can not receive HD video from Manu and Beatriz OUGH !
  • 10. A MULTI-PARTY FAMILY VIDEOCONFERENCE POSSIBLE SOLUTIONS 1. Drop Roberto from the conference 2. Limit the video quality of Manu and Beatriz 3. …
  • 11. A MULTI-PARTY FAMILY VIDEOCONFERENCE SOLUTION: SIMULCAST / SVC ▸Manu and Beatriz send different “quality” video layers ▸The SFU chooses the appropriate ones for Roberto
  • 12. TOPOLOGIES FULL MESH MCU SFU Client uplink Very high Low Low Client downlink Very high Low High Client CPU usage Very high Low Medium Server CPU usage - Very high Very low Latency None High Low Can transcode - Yes No Requires simulcast/SVC - - Yes Flexible video layout Yes No Yes
  • 15. MEDIASOUP IS MINIMALIST WHAT IS *NOT* MEDIASOUP? ▸It is NOT a standalone server ▸It does NOT have “init” scripts for Debian or CentOS ▸It does NOT have a “config” file ▸It does NOT implement the SIP protocol ▸It does NOT implement ANY signaling protocol ▸It does NOT provide an “admin” web interface ▸It does NOT provide a client SDK
  • 16. MEDIASOUP IS A NODE.JS MODULE Yours truly REMEMBER
  • 18. $ npm install —save mediasoup MEDIASOUP & NODE.JS A NODE.JS MODULE ▸A Node.js module is a dependency/library within a project ▸You create your Node.js based project/application ▸You add mediasoup as a module into it
  • 19. MEDIASOUP & NODE.JS A PACKAGE.JSON EXAMPLE { "name": "my-amazing-multiconference-server-app", "version": "1.0.0", "description": "Enterprise conferencing application", "main": "index.js", "author": "My Great Company", "license": "UNLICENSED", "dependencies": { "express": "^4.14.0", "mediasoup": "^1.0.0", "socket.io": "^1.5.0" } }
  • 21. MEDIASOUP EXPOSES A JAVASCRIPT // Load mediasoup module const mediasoup = require('mediasoup'); // Create a mediasoup Server let server = mediasoup.Server(); // Options for the mediasoup Room const roomOptions = { mediaCodecs: [ { kind : 'audio', name : 'audio/opus', clockRate : 48000 }, { kind : 'video', name : 'video/vp8', clockRate : 90000 } ] }; // Create a mediasoup Room server.createRoom(roomOptions) .then((room) => { // Got the Room instance handleRoom(room); });
  • 22. MEDIASOUP API LOW LEVEL API mediasoup exposes a low level API similar to ORTC // Create a Peer let peer = room.Peer('alice'); // Create a ICE+DTLS Transport peer.createTransport(options) .then((transport) => { transport.setRemoteDtlsParameters(data); }); // Create a RtpReceiver to handle audio from the browser let audioReceiver = peer.RtpReceiver('audio', transport); // Create a RtpReceiver to handle video from the browser let videoReceiver = peer.RtpReceiver('video', transport);
  • 23. MEDIASOUP API HIGH LEVEL API mediasoup also exposes a high level API similar to WebRTC 1.0 // Create a PeerConnection let peerconnection = new mediasoup.webrtc.RTCPeerConnection(room, 'alice'); // Set the remote SDP offer peerconnection.setRemoteDescription(desc) .then(() => { return peerconnection.createAnswer(); }) .then((desc) => { return peerconnection.setLocalDescription(desc); }) .then(() => { // Answer the participant request with the SDP answer request.accept({ sdp: peerconnection.localDescription.sdp }); });
  • 25. MEDIASOUP API JUST MEDIA ▸mediasoup does NOT talk the SIP protocol ▸…nor it talks ANY signaling protocol ▸You can use socket.io (for example) to communicate with browsers/endpoints via WebSocket ▸…or build your own protocol
  • 27. MEDIASOUP ROADMAP WORKING ON IT… 1.0.0 ▸RTCP: process RTCP reports to allow mediasoup diagnose per peer uplink/downlink issues ▸WebRTC 1.0: more API needed 2.0.0 ▸Simulcast & SVC: handle multiple streams/layers from clients and select which one to route to others
  • 29. THE APPLICATION ASK YOURSELF ▸ Want to build yet another boring enterprise conferencing app? ▸ May be a funny social app? ▸ Will you build the app on Node.js? ▸ Browser app? mobile app? native Android/iOS SDKs? ▸ Do you need interoperability with PSTN? Really?
  • 32. DEMO APPLICATION FIRSTSIGHT “See many people, only talk to one” Backend ▸Node.js server running mediasoup and websocket modules ▸JS logic to handle media rooms and manage participants Frontend ▸HTML5 application made with React.js ▸JS logic to handle MediaStream from room participants
  • 33. MUCHAS GRACIAS Iñaki Baz Castillo THE END http://mediasoup.org