SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Mais procurados

【Unite Tokyo 2019】Unityだったら簡単!マルチプレイ用ゲームサーバ開発 ~実践編~
【Unite Tokyo 2019】Unityだったら簡単!マルチプレイ用ゲームサーバ開発 ~実践編~【Unite Tokyo 2019】Unityだったら簡単!マルチプレイ用ゲームサーバ開発 ~実践編~
【Unite Tokyo 2019】Unityだったら簡単!マルチプレイ用ゲームサーバ開発 ~実践編~UnityTechnologiesJapan002
 
재미에 대한 고찰
재미에 대한 고찰재미에 대한 고찰
재미에 대한 고찰Hyungyu Kang
 
Idle Clicker Games Presentation (Casual Connect USA 2017)
Idle Clicker Games Presentation (Casual Connect USA 2017)Idle Clicker Games Presentation (Casual Connect USA 2017)
Idle Clicker Games Presentation (Casual Connect USA 2017)David Piao Chiu
 
이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011
이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011
이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011devCAT Studio, NEXON
 
게임제작개론 : #6 게임 시스템 구조에 대한 이해
게임제작개론 : #6 게임 시스템 구조에 대한 이해게임제작개론 : #6 게임 시스템 구조에 대한 이해
게임제작개론 : #6 게임 시스템 구조에 대한 이해Seungmo Koo
 
動画配信の基礎知識
動画配信の基礎知識動画配信の基礎知識
動画配信の基礎知識Daiyu Hatakeyama
 
UniTask入門
UniTask入門UniTask入門
UniTask入門torisoup
 
デスクトップ アプリがこの先生きのこるには
デスクトップ アプリがこの先生きのこるにはデスクトップ アプリがこの先生きのこるには
デスクトップ アプリがこの先生きのこるにはManato KAMEYA
 
サーバー知識不要!のゲームサーバー "Azure PlayFab" で長期運営タイトルを作ろう
サーバー知識不要!のゲームサーバー "Azure PlayFab" で長期運営タイトルを作ろうサーバー知識不要!のゲームサーバー "Azure PlayFab" で長期運営タイトルを作ろう
サーバー知識不要!のゲームサーバー "Azure PlayFab" で長期運営タイトルを作ろうDaisuke Masubuchi
 
게임 프레임워크의 아키텍쳐와 디자인 패턴
게임 프레임워크의 아키텍쳐와 디자인 패턴게임 프레임워크의 아키텍쳐와 디자인 패턴
게임 프레임워크의 아키텍쳐와 디자인 패턴MinGeun Park
 
[125]웹 성능 최적화에 필요한 브라우저의 모든 것
[125]웹 성능 최적화에 필요한 브라우저의 모든 것[125]웹 성능 최적화에 필요한 브라우저의 모든 것
[125]웹 성능 최적화에 필요한 브라우저의 모든 것NAVER D2
 
GPGPU(CUDA)를 이용한 MMOG 캐릭터 충돌처리
GPGPU(CUDA)를 이용한 MMOG 캐릭터 충돌처리GPGPU(CUDA)를 이용한 MMOG 캐릭터 충돌처리
GPGPU(CUDA)를 이용한 MMOG 캐릭터 충돌처리YEONG-CHEON YOU
 
Xen Project Contributor Training Part 3 - Communication v1.0
Xen Project Contributor Training Part 3 - Communication v1.0Xen Project Contributor Training Part 3 - Communication v1.0
Xen Project Contributor Training Part 3 - Communication v1.0The Linux Foundation
 
Azure PlayFab トレーニング資料
Azure PlayFab トレーニング資料Azure PlayFab トレーニング資料
Azure PlayFab トレーニング資料Daisuke Masubuchi
 
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해Seungmo Koo
 
게임 프로그래밍 기초 공부법
게임 프로그래밍 기초 공부법게임 프로그래밍 기초 공부법
게임 프로그래밍 기초 공부법Chris Ohk
 
【Unity道場スペシャル 2017札幌】最適化をする前に覚えておきたい技術 -札幌編-
【Unity道場スペシャル 2017札幌】最適化をする前に覚えておきたい技術 -札幌編-【Unity道場スペシャル 2017札幌】最適化をする前に覚えておきたい技術 -札幌編-
【Unity道場スペシャル 2017札幌】最適化をする前に覚えておきたい技術 -札幌編-Unity Technologies Japan K.K.
 
Guide to creation of game concept document
Guide to creation of game concept documentGuide to creation of game concept document
Guide to creation of game concept documentEmma Westecott
 

Mais procurados (20)

【Unite Tokyo 2019】Unityだったら簡単!マルチプレイ用ゲームサーバ開発 ~実践編~
【Unite Tokyo 2019】Unityだったら簡単!マルチプレイ用ゲームサーバ開発 ~実践編~【Unite Tokyo 2019】Unityだったら簡単!マルチプレイ用ゲームサーバ開発 ~実践編~
【Unite Tokyo 2019】Unityだったら簡単!マルチプレイ用ゲームサーバ開発 ~実践編~
 
재미에 대한 고찰
재미에 대한 고찰재미에 대한 고찰
재미에 대한 고찰
 
Idle Clicker Games Presentation (Casual Connect USA 2017)
Idle Clicker Games Presentation (Casual Connect USA 2017)Idle Clicker Games Presentation (Casual Connect USA 2017)
Idle Clicker Games Presentation (Casual Connect USA 2017)
 
이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011
이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011
이원, 온라인 게임 프로젝트 개발 결산 - 마비노기 개발 완수 보고서, NDC2011
 
게임제작개론 : #6 게임 시스템 구조에 대한 이해
게임제작개론 : #6 게임 시스템 구조에 대한 이해게임제작개론 : #6 게임 시스템 구조에 대한 이해
게임제작개론 : #6 게임 시스템 구조에 대한 이해
 
動画配信の基礎知識
動画配信の基礎知識動画配信の基礎知識
動画配信の基礎知識
 
UniTask入門
UniTask入門UniTask入門
UniTask入門
 
デスクトップ アプリがこの先生きのこるには
デスクトップ アプリがこの先生きのこるにはデスクトップ アプリがこの先生きのこるには
デスクトップ アプリがこの先生きのこるには
 
サーバー知識不要!のゲームサーバー "Azure PlayFab" で長期運営タイトルを作ろう
サーバー知識不要!のゲームサーバー "Azure PlayFab" で長期運営タイトルを作ろうサーバー知識不要!のゲームサーバー "Azure PlayFab" で長期運営タイトルを作ろう
サーバー知識不要!のゲームサーバー "Azure PlayFab" で長期運営タイトルを作ろう
 
게임 프레임워크의 아키텍쳐와 디자인 패턴
게임 프레임워크의 아키텍쳐와 디자인 패턴게임 프레임워크의 아키텍쳐와 디자인 패턴
게임 프레임워크의 아키텍쳐와 디자인 패턴
 
Machinationの紹介
Machinationの紹介Machinationの紹介
Machinationの紹介
 
[125]웹 성능 최적화에 필요한 브라우저의 모든 것
[125]웹 성능 최적화에 필요한 브라우저의 모든 것[125]웹 성능 최적화에 필요한 브라우저의 모든 것
[125]웹 성능 최적화에 필요한 브라우저의 모든 것
 
GPGPU(CUDA)를 이용한 MMOG 캐릭터 충돌처리
GPGPU(CUDA)를 이용한 MMOG 캐릭터 충돌처리GPGPU(CUDA)를 이용한 MMOG 캐릭터 충돌처리
GPGPU(CUDA)를 이용한 MMOG 캐릭터 충돌처리
 
Xen Project Contributor Training Part 3 - Communication v1.0
Xen Project Contributor Training Part 3 - Communication v1.0Xen Project Contributor Training Part 3 - Communication v1.0
Xen Project Contributor Training Part 3 - Communication v1.0
 
Azure PlayFab トレーニング資料
Azure PlayFab トレーニング資料Azure PlayFab トレーニング資料
Azure PlayFab トレーニング資料
 
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
게임제작개론 : #7 팀 역할과 게임 리소스에 대한 이해
 
UE4 MultiPlayer Online Deep Dive 実践編2 (ソレイユ株式会社様ご講演) #UE4DD
UE4 MultiPlayer Online Deep Dive 実践編2 (ソレイユ株式会社様ご講演) #UE4DDUE4 MultiPlayer Online Deep Dive 実践編2 (ソレイユ株式会社様ご講演) #UE4DD
UE4 MultiPlayer Online Deep Dive 実践編2 (ソレイユ株式会社様ご講演) #UE4DD
 
게임 프로그래밍 기초 공부법
게임 프로그래밍 기초 공부법게임 프로그래밍 기초 공부법
게임 프로그래밍 기초 공부법
 
【Unity道場スペシャル 2017札幌】最適化をする前に覚えておきたい技術 -札幌編-
【Unity道場スペシャル 2017札幌】最適化をする前に覚えておきたい技術 -札幌編-【Unity道場スペシャル 2017札幌】最適化をする前に覚えておきたい技術 -札幌編-
【Unity道場スペシャル 2017札幌】最適化をする前に覚えておきたい技術 -札幌編-
 
Guide to creation of game concept document
Guide to creation of game concept documentGuide to creation of game concept document
Guide to creation of game concept document
 

Semelhante a 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
 

Semelhante a 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
 

Mais 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
 

Mais 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
 

Último

HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 

Último (20)

HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 

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