SlideShare a Scribd company logo
Stream processing with Kurento Media Server
Juan Navarro Moreno
Kurento Software Developer
jnavarro@naevatec.com
github.com/j1elo
www.kurento.org
Overview
3
Overview – What is Kurento?
●
A server that simplifies creation of streaming applications.
●
Focused on processing of Audio/Video media streams.
●
Supporting WebRTC communications.
●
Based on modules that perform input → processing → output.
Kurento is an Open Source project.
Hosted on GitHub: https://github.com/Kurento
4
Overview – What can be done with Kurento?
●
Abstracts compatibility issues between sender and receiver.
●
Manipulates or redistributes the streams.
●
Extracts information from the streams.
Input stream
Kurento
Media
Server
Output stream
Product-specific data
Eg.: FIWARE data-store
5
Overview – What can be done with Kurento?
Examples:
●
Abstraction of incompatible
video codecs
●
Multi-point distribution of media
●
Processing / Storing media
6
Overview – What can be done with Kurento?
7
Overview – How does Kurento work?
A server with two main components:
●
Endpoints: where data flows In/Out.
●
Filters: composable modules where data is processed
or transformed.
Media stream
Src
Sink Media stream
Input
Endpoint
Output
Endpoint
8
Overview – How does Kurento work?
Endpoints and Filters are linked together, mix-and-matched to form a
Pipeline.
Input
Endpoint
Src
Sink
Output
Endpoint
Src
Sink
Src
Sink
Src
Sink
9
Overview – How does Kurento work?
The server is controlled with an RPC API.
●
Client applications manipulate Endpoints and Filters through this API.
●
Ready-made client SDKs for Java, Node.js and in-browser JavaScript.
Components of a Real-World application:
●
Kurento Media Server
●
Client Application – usually a server too.
●
User Interface – common case is a webpage.
10
Overview – How does Kurento work?
Getting technical
12
Getting technical – Component overview
Kurento Media Server (aka. “KMS”)
●
Core: Basic functionality and RPC API.
●
Elements: Endpoints used for input and
output of streams.
●
Filters: Implementation of all stream-
processing modules.
13
Getting technical – KMS Elements
Protocols and Codecs Media Repository
WebRtcEndpoint
RtpEndpoint
HttpEndpoint
PlayerEndpoint
RecorderEndpoint
14
Getting technical – KMS Elements
Different Endpoints for different needs:
●
WebRtcEndpoint – Full support of WebRTC standard.
•
Currently compatible with Chrome and Firefox (Safari and Edge are
work-in-progress).
•
All WebRTC lingo: SDP, (Trickle-)ICE, STUN, TURN, Google REMB.
●
RtpEndpoint – For RTP and SRTP streams.
•
Supports port auto-discovery as an alternative to ICE.
●
HttpEndpoint – Accepts GET/POST requests (eg. file uploading to KMS).
15
Getting technical – KMS Elements
Special Endpoints:
●
PlayerEndpoint – Retrieves content from either of the file system, HTTP
servers, or RTSP sources. Input-only.
●
RecorderEndpoint – Redirects streams to storage. Output-only.
16
Getting technical – KMS Filters
Process or transform data as it flows through filters.
●
Could be a simple transformation. Eg: Convert video to black and white.
●
Could be a complex task, involving external libraries. Eg: Apply
Computer Vision algorithms and extract features from the video.
●
Imagination is the limit.
17
Getting technical – KMS Filters
Computer Vision Generic filter
Zbar
FaceDetector
PlateDetector
GStreamerFilter
18
Getting technical – Pipelines
●
All elements get created and linked through specific RPC commands
from the Client Application.
●
As seen before, complex topologies are possible.
19
Getting technical – Pipelines
SinkSink
SRCSRC
SinkSink
SRCSRCSinkSink
SinkSinkSRCSRC
WebRtcEndpoint
AR Filter
RecorderEndpoint
HttpGetEndpoint
RtpEndpoint
MP4 fle stored
in media
repository
Web application
using HTML5
<video> tag
RTP full duplex
client video
phone
WebRTC full
duplex client
video application
SinkSink
20
Getting technical – Client Application
●
Implements or includes an RPC client.
●
Orchestrates the creation of the Pipeline, with Elements and Filters.
●
WebRtcEndpoint follows the standard way of configuration via SDP
Negotiation (aka. SDP Offer/Answer Model).
•
The Client Application is in charge of passing around ICE Candidates.
●
RtpEndpoint also uses SDP for configuration, but no ICE.
●
Other Endpoints have custom RPC methods for configuration.
21
Getting technical – Client Application
●
Provides access to external sources such as FIWARE data-stores.
●
Proceeds with the rest of the business logic.
●
Kurento provides a FIWARE integration package for Java applications.
●
Also there are multiple example applications made available.
22
Getting technical – Client Application
Application
Server
Application
Server
Media
Server
Media
ServerClientClient
Media
Negotiation
phase
11
Media channel
preparation
phase
(optional)
22
Media
exchange
phase
33
Specifc app logic
Specifc
pipeline
building
Pipeline
managed
media
A closer look
24
A closer look – GStreamer media library
Kurento is powered under the hood by the GStreamer project:
https://gstreamer.freedesktop.org
GStreamer is in charge of all media handling:
●
Decoding / encoding of input / output video & audio.
●
Establishment of communication streams (eg. RTP Sessions).
●
Special interest: Agnostic bin.
25
A closer look – Agnostic bin
Kurento abstracts codec compatibility issues between Endpoints.
●
Achieved through an “invisible” intermediate filter – ‘agnosticbin’.
●
Applies on-the-fly transcoding iff the codecs are not compatible.
Media Element Media Element
Agnostic media
adapter, “hidden”
behind every
connection
Agnostic media
adapter, “hidden”
behind every
connection
H.264VP8
Src
Sink
Src
Sink
26
A closer look – SDP Offer/Answer
●
The standard signaling format for WebRTC.
●
Used to configure codecs & advanced settings in WebRtcEndpoint and
RtpEndpoint.
●
SDP is a mess and we all hate it (if you don’t yet, you should).
(The problem is, the IETF RTCWEB working group was/is dominated by
players from the SIP world who wanted to re-use their existing code.)
See: https://webrtchacks.com/sdp-anatomy/
27
A closer look – SDP Offer/Answer
v=0
o=- 0 0 IN IP4 127.0.0.1
s=-
c=IN IP4 127.0.0.1
t=0 0
m=audio 9 RTP/AVPF 96
a=rtpmap:96 opus/48000/2
a=sendonly
a=direction:active
a=ssrc:445566 cname:user@example.com
m=video 9 RTP/AVPF 103
a=rtpmap:103 H264/90000
a=sendonly
a=direction:active
a=ssrc:112233 cname:user@example.com
v=0
o=- 372 372 IN IP4 192.168.1.15
s=Kurento Media Server
c=IN IP4 192.168.1.15
t=0 0
m=audio 41654 RTP/AVPF 96
a=rtpmap:96 opus/48000/2
a=recvonly
a=direction:passive
a=ssrc:3224 cname:user225@host-9b2
m=video 61134 RTP/AVPF 103
a=rtpmap:103 H264/90000
a=recvonly
a=direction:passive
a=ssrc:2717 cname:user225@host-9b2
SDP Offer to RtpEndpoint: SDP Answer from RtpEndpoint:
Application examples
29
A closer look – Application example: RTP Player
Kurento RTP Player is a new application example, not yet published.
●
Receives an audio/video stream.
●
Redirects it and sends to a browser through WebRTC.
●
The RTP can originate from any source. A sample tool is provided.
External
RTP
producer
30
A closer look – Application example: RTP Player
void start(String browserSdpOffer)
{
// Create and link Endpoints
MediaPipeline pipeline = kurento.createMediaPipeline();
RtpEndpoint rtpEndpoint = new RtpEndpoint.Builder(pipeline).build();
WebRtcEndpoint webRtcEndpoint = new WebRtcEndpoint.Builder(pipeline).build();
rtpEndpoint.connect(webRtcEndpoint);
// Configure the RtpEndpoint
String fakeSdpOffer = "...";
String kmsSdpAnswer = rtpEndpoint.processOffer(fakeSdpOffer);
String browserSdpAnswer = webRtcEndpoint.processOffer(browserSdpOffer);
webRtcEndpoint.gatherCandidates();
}
31
A closer look – Application example: Magic Mirror
●
Receives a video stream from a browser.
●
Applies Computer Vision to detect a face and overlays a picture.
●
Sends back the modified video to the same Endpoint it came from.
32
A closer look – Application example: Magic Mirror
void start()
{
// Create and link Endpoints, Filters
MediaPipeline pipeline = kurento.createMediaPipeline();
WebRtcEndpoint webRtcEndpoint = new WebRtcEndpoint.Builder(pipeline).build();
FaceOverlayFilter faceOverlayFilter =
new FaceOverlayFilter.Builder(pipeline).build();
faceOverlayFilter.setOverlayedImage("mario-hat.png");
webRtcEndpoint.connect(faceOverlayFilter);
faceOverlayFilter.connect(webRtcEndpoint);
webRtcEndpoint.gatherCandidates();
}
Closing
Thank you!
http://fiware.org
Follow @FIWARE on Twitter
Juan Navarro Moreno
Kurento Software Developer
jnavarro@naevatec.com
github.com/j1elo
www.kurento.org

More Related Content

PDF
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
PDF
20170925 onos and p4
PDF
[Webinar Slides] Programming the Network Dataplane in P4
PPTX
2016 NCTU P4 Workshop
PPTX
RISC-V NOEL-V - A new high performance RISC-V Processor Family
PDF
P4 Introduction
PDF
BKK16-100K1 George Grey, Linaro CEO Opening Keynote
PDF
BUD17-310: Introducing LLDB for linux on Arm and AArch64
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
20170925 onos and p4
[Webinar Slides] Programming the Network Dataplane in P4
2016 NCTU P4 Workshop
RISC-V NOEL-V - A new high performance RISC-V Processor Family
P4 Introduction
BKK16-100K1 George Grey, Linaro CEO Opening Keynote
BUD17-310: Introducing LLDB for linux on Arm and AArch64

What's hot (20)

PDF
Host Data Plane Acceleration: SmartNIC Deployment Models
PDF
LAS16-310: Introducing the first 96Boards TV Platform: Poplar by Hisilicon
PPTX
Debugging Numerical Simulations on Accelerated Architectures - TotalView fo...
PDF
TRex Traffic Generator - Hanoch Haim
PDF
LAS16-405:OpenDataPlane: Software Defined Dataplane leader
PDF
Programmable data plane at terabit speeds
PDF
Programming the Network Data Plane
PDF
Getting started with RISC-V verification what's next after compliance testing
PDF
RISC-V Zce Extension
PDF
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
PDF
BKK16-400A LuvOS and ACPI Compliance Testing
PDF
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
PDF
Andes building a secure platform with the enhanced iopmp
PDF
System Design on Zynq using SDSoC
PDF
Las16 200 - firmware summit - ras what is it- why do we need it
PPTX
RISC-V 30907 summit 2020 joint picocom_mentor
PDF
RISC-V 30908 patra
PPTX
Reverse Engineering of Rocket Chip
PDF
Linkmeup v076 (2019-06)
PDF
Lcu14 101- coresight overview
Host Data Plane Acceleration: SmartNIC Deployment Models
LAS16-310: Introducing the first 96Boards TV Platform: Poplar by Hisilicon
Debugging Numerical Simulations on Accelerated Architectures - TotalView fo...
TRex Traffic Generator - Hanoch Haim
LAS16-405:OpenDataPlane: Software Defined Dataplane leader
Programmable data plane at terabit speeds
Programming the Network Data Plane
Getting started with RISC-V verification what's next after compliance testing
RISC-V Zce Extension
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
BKK16-400A LuvOS and ACPI Compliance Testing
LAS16-501: Introduction to LLVM - Projects, Components, Integration, Internals
Andes building a secure platform with the enhanced iopmp
System Design on Zynq using SDSoC
Las16 200 - firmware summit - ras what is it- why do we need it
RISC-V 30907 summit 2020 joint picocom_mentor
RISC-V 30908 patra
Reverse Engineering of Rocket Chip
Linkmeup v076 (2019-06)
Lcu14 101- coresight overview
Ad

Similar to FIWARE Tech Summit - Stream Processing with Kurento Media Server (20)

PDF
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
PDF
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
PPTX
Kurento - FI-WARE Bootcamp
PPTX
Recording and media manipulation of WebRTC streams
PPTX
The future of multimedia communications and services: Kurento and it's role
PDF
Developing applications with Kurento
PPTX
Kurento: a media server architecture and API for WebRTC
PDF
Kurento cpmx
PPTX
Developing rich multimedia applications with Kurento: a tutorial for JavaScri...
PPTX
Developing rich multimedia applications with Kurento: a tutorial for Java Dev...
PPTX
kurento-nubomedia-first-steps-v1
PPTX
Developing rich multimedia applications with FI-WARE.
PPTX
Nubomedia IETF96 hackthon - Kurento
PPTX
Kurento FIWARE
PPTX
FOSDEM 2016 - Creating rich WebRTC Applications with Kurento
PDF
Implementing a WebRTC endpoint in GStreamer: challenges, problems and perspec...
PPTX
Nubomedia: the cloud infrastructure for WebRTC and IMS multimedia real-time c...
PPTX
WebRTC Seminar Report
PPTX
The Enterprise wants WebRTC -- and it needs Middleware to get it! (IIT RTC Co...
PDF
WebRTC Standards from Tim Panton
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
Kurento - FI-WARE Bootcamp
Recording and media manipulation of WebRTC streams
The future of multimedia communications and services: Kurento and it's role
Developing applications with Kurento
Kurento: a media server architecture and API for WebRTC
Kurento cpmx
Developing rich multimedia applications with Kurento: a tutorial for JavaScri...
Developing rich multimedia applications with Kurento: a tutorial for Java Dev...
kurento-nubomedia-first-steps-v1
Developing rich multimedia applications with FI-WARE.
Nubomedia IETF96 hackthon - Kurento
Kurento FIWARE
FOSDEM 2016 - Creating rich WebRTC Applications with Kurento
Implementing a WebRTC endpoint in GStreamer: challenges, problems and perspec...
Nubomedia: the cloud infrastructure for WebRTC and IMS multimedia real-time c...
WebRTC Seminar Report
The Enterprise wants WebRTC -- and it needs Middleware to get it! (IIT RTC Co...
WebRTC Standards from Tim Panton
Ad

More from FIWARE (20)

PPTX
Behm_Herne_NeMo_akt.pptx
PDF
Katharina Hogrebe Herne Digital Days.pdf
PPTX
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
PPTX
Behm_Herne_NeMo.pptx
PPTX
Evangelists + iHubs Promo Slides.pptx
PPTX
Lukas Künzel Smart City Operating System.pptx
PPTX
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
PPTX
Dennis Wendland_The i4Trust Collaboration Programme.pptx
PPTX
Ulrich Ahle_FIWARE.pptx
PPTX
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
PDF
Water Quality - Lukas Kuenzel.pdf
PPTX
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
PPTX
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
PPTX
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
PPTX
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
PDF
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
PDF
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
PPTX
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
PPTX
WE_LoRaWAN _ IoT.pptx
PPTX
EU Opp_Clara Pezuela - German chapter.pptx
Behm_Herne_NeMo_akt.pptx
Katharina Hogrebe Herne Digital Days.pdf
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
Behm_Herne_NeMo.pptx
Evangelists + iHubs Promo Slides.pptx
Lukas Künzel Smart City Operating System.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptx
Ulrich Ahle_FIWARE.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Water Quality - Lukas Kuenzel.pdf
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
WE_LoRaWAN _ IoT.pptx
EU Opp_Clara Pezuela - German chapter.pptx

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
KodekX | Application Modernization Development
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
cuic standard and advanced reporting.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Electronic commerce courselecture one. Pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Machine learning based COVID-19 study performance prediction
Cloud computing and distributed systems.
Encapsulation_ Review paper, used for researhc scholars
Network Security Unit 5.pdf for BCA BBA.
KodekX | Application Modernization Development
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
cuic standard and advanced reporting.pdf
Unlocking AI with Model Context Protocol (MCP)
Advanced methodologies resolving dimensionality complications for autism neur...
Electronic commerce courselecture one. Pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Digital-Transformation-Roadmap-for-Companies.pptx
Programs and apps: productivity, graphics, security and other tools
The AUB Centre for AI in Media Proposal.docx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Diabetes mellitus diagnosis method based random forest with bat algorithm
Machine learning based COVID-19 study performance prediction

FIWARE Tech Summit - Stream Processing with Kurento Media Server

  • 1. Stream processing with Kurento Media Server Juan Navarro Moreno Kurento Software Developer jnavarro@naevatec.com github.com/j1elo www.kurento.org
  • 3. 3 Overview – What is Kurento? ● A server that simplifies creation of streaming applications. ● Focused on processing of Audio/Video media streams. ● Supporting WebRTC communications. ● Based on modules that perform input → processing → output. Kurento is an Open Source project. Hosted on GitHub: https://github.com/Kurento
  • 4. 4 Overview – What can be done with Kurento? ● Abstracts compatibility issues between sender and receiver. ● Manipulates or redistributes the streams. ● Extracts information from the streams. Input stream Kurento Media Server Output stream Product-specific data Eg.: FIWARE data-store
  • 5. 5 Overview – What can be done with Kurento? Examples: ● Abstraction of incompatible video codecs ● Multi-point distribution of media ● Processing / Storing media
  • 6. 6 Overview – What can be done with Kurento?
  • 7. 7 Overview – How does Kurento work? A server with two main components: ● Endpoints: where data flows In/Out. ● Filters: composable modules where data is processed or transformed. Media stream Src Sink Media stream Input Endpoint Output Endpoint
  • 8. 8 Overview – How does Kurento work? Endpoints and Filters are linked together, mix-and-matched to form a Pipeline. Input Endpoint Src Sink Output Endpoint Src Sink Src Sink Src Sink
  • 9. 9 Overview – How does Kurento work? The server is controlled with an RPC API. ● Client applications manipulate Endpoints and Filters through this API. ● Ready-made client SDKs for Java, Node.js and in-browser JavaScript. Components of a Real-World application: ● Kurento Media Server ● Client Application – usually a server too. ● User Interface – common case is a webpage.
  • 10. 10 Overview – How does Kurento work?
  • 12. 12 Getting technical – Component overview Kurento Media Server (aka. “KMS”) ● Core: Basic functionality and RPC API. ● Elements: Endpoints used for input and output of streams. ● Filters: Implementation of all stream- processing modules.
  • 13. 13 Getting technical – KMS Elements Protocols and Codecs Media Repository WebRtcEndpoint RtpEndpoint HttpEndpoint PlayerEndpoint RecorderEndpoint
  • 14. 14 Getting technical – KMS Elements Different Endpoints for different needs: ● WebRtcEndpoint – Full support of WebRTC standard. • Currently compatible with Chrome and Firefox (Safari and Edge are work-in-progress). • All WebRTC lingo: SDP, (Trickle-)ICE, STUN, TURN, Google REMB. ● RtpEndpoint – For RTP and SRTP streams. • Supports port auto-discovery as an alternative to ICE. ● HttpEndpoint – Accepts GET/POST requests (eg. file uploading to KMS).
  • 15. 15 Getting technical – KMS Elements Special Endpoints: ● PlayerEndpoint – Retrieves content from either of the file system, HTTP servers, or RTSP sources. Input-only. ● RecorderEndpoint – Redirects streams to storage. Output-only.
  • 16. 16 Getting technical – KMS Filters Process or transform data as it flows through filters. ● Could be a simple transformation. Eg: Convert video to black and white. ● Could be a complex task, involving external libraries. Eg: Apply Computer Vision algorithms and extract features from the video. ● Imagination is the limit.
  • 17. 17 Getting technical – KMS Filters Computer Vision Generic filter Zbar FaceDetector PlateDetector GStreamerFilter
  • 18. 18 Getting technical – Pipelines ● All elements get created and linked through specific RPC commands from the Client Application. ● As seen before, complex topologies are possible.
  • 19. 19 Getting technical – Pipelines SinkSink SRCSRC SinkSink SRCSRCSinkSink SinkSinkSRCSRC WebRtcEndpoint AR Filter RecorderEndpoint HttpGetEndpoint RtpEndpoint MP4 fle stored in media repository Web application using HTML5 <video> tag RTP full duplex client video phone WebRTC full duplex client video application SinkSink
  • 20. 20 Getting technical – Client Application ● Implements or includes an RPC client. ● Orchestrates the creation of the Pipeline, with Elements and Filters. ● WebRtcEndpoint follows the standard way of configuration via SDP Negotiation (aka. SDP Offer/Answer Model). • The Client Application is in charge of passing around ICE Candidates. ● RtpEndpoint also uses SDP for configuration, but no ICE. ● Other Endpoints have custom RPC methods for configuration.
  • 21. 21 Getting technical – Client Application ● Provides access to external sources such as FIWARE data-stores. ● Proceeds with the rest of the business logic. ● Kurento provides a FIWARE integration package for Java applications. ● Also there are multiple example applications made available.
  • 22. 22 Getting technical – Client Application Application Server Application Server Media Server Media ServerClientClient Media Negotiation phase 11 Media channel preparation phase (optional) 22 Media exchange phase 33 Specifc app logic Specifc pipeline building Pipeline managed media
  • 24. 24 A closer look – GStreamer media library Kurento is powered under the hood by the GStreamer project: https://gstreamer.freedesktop.org GStreamer is in charge of all media handling: ● Decoding / encoding of input / output video & audio. ● Establishment of communication streams (eg. RTP Sessions). ● Special interest: Agnostic bin.
  • 25. 25 A closer look – Agnostic bin Kurento abstracts codec compatibility issues between Endpoints. ● Achieved through an “invisible” intermediate filter – ‘agnosticbin’. ● Applies on-the-fly transcoding iff the codecs are not compatible. Media Element Media Element Agnostic media adapter, “hidden” behind every connection Agnostic media adapter, “hidden” behind every connection H.264VP8 Src Sink Src Sink
  • 26. 26 A closer look – SDP Offer/Answer ● The standard signaling format for WebRTC. ● Used to configure codecs & advanced settings in WebRtcEndpoint and RtpEndpoint. ● SDP is a mess and we all hate it (if you don’t yet, you should). (The problem is, the IETF RTCWEB working group was/is dominated by players from the SIP world who wanted to re-use their existing code.) See: https://webrtchacks.com/sdp-anatomy/
  • 27. 27 A closer look – SDP Offer/Answer v=0 o=- 0 0 IN IP4 127.0.0.1 s=- c=IN IP4 127.0.0.1 t=0 0 m=audio 9 RTP/AVPF 96 a=rtpmap:96 opus/48000/2 a=sendonly a=direction:active a=ssrc:445566 cname:user@example.com m=video 9 RTP/AVPF 103 a=rtpmap:103 H264/90000 a=sendonly a=direction:active a=ssrc:112233 cname:user@example.com v=0 o=- 372 372 IN IP4 192.168.1.15 s=Kurento Media Server c=IN IP4 192.168.1.15 t=0 0 m=audio 41654 RTP/AVPF 96 a=rtpmap:96 opus/48000/2 a=recvonly a=direction:passive a=ssrc:3224 cname:user225@host-9b2 m=video 61134 RTP/AVPF 103 a=rtpmap:103 H264/90000 a=recvonly a=direction:passive a=ssrc:2717 cname:user225@host-9b2 SDP Offer to RtpEndpoint: SDP Answer from RtpEndpoint:
  • 29. 29 A closer look – Application example: RTP Player Kurento RTP Player is a new application example, not yet published. ● Receives an audio/video stream. ● Redirects it and sends to a browser through WebRTC. ● The RTP can originate from any source. A sample tool is provided. External RTP producer
  • 30. 30 A closer look – Application example: RTP Player void start(String browserSdpOffer) { // Create and link Endpoints MediaPipeline pipeline = kurento.createMediaPipeline(); RtpEndpoint rtpEndpoint = new RtpEndpoint.Builder(pipeline).build(); WebRtcEndpoint webRtcEndpoint = new WebRtcEndpoint.Builder(pipeline).build(); rtpEndpoint.connect(webRtcEndpoint); // Configure the RtpEndpoint String fakeSdpOffer = "..."; String kmsSdpAnswer = rtpEndpoint.processOffer(fakeSdpOffer); String browserSdpAnswer = webRtcEndpoint.processOffer(browserSdpOffer); webRtcEndpoint.gatherCandidates(); }
  • 31. 31 A closer look – Application example: Magic Mirror ● Receives a video stream from a browser. ● Applies Computer Vision to detect a face and overlays a picture. ● Sends back the modified video to the same Endpoint it came from.
  • 32. 32 A closer look – Application example: Magic Mirror void start() { // Create and link Endpoints, Filters MediaPipeline pipeline = kurento.createMediaPipeline(); WebRtcEndpoint webRtcEndpoint = new WebRtcEndpoint.Builder(pipeline).build(); FaceOverlayFilter faceOverlayFilter = new FaceOverlayFilter.Builder(pipeline).build(); faceOverlayFilter.setOverlayedImage("mario-hat.png"); webRtcEndpoint.connect(faceOverlayFilter); faceOverlayFilter.connect(webRtcEndpoint); webRtcEndpoint.gatherCandidates(); }
  • 34. Thank you! http://fiware.org Follow @FIWARE on Twitter Juan Navarro Moreno Kurento Software Developer jnavarro@naevatec.com github.com/j1elo www.kurento.org