SlideShare a Scribd company logo
1 of 33
Real-Time Media Stream Processing using Kurento
Juan Navarro Moreno
Kurento Software Developer
jnavarro@naevatec.com
github.com/j1elo
www.kurento.org
Overview – What is Kurento?
●
A server that simplifies creation of streaming applications.
●
Focused on processing of Audio/Video media streams.
●
Supporting WebRTC communications.
●
Simple workflow: input → process → output.
Kurento is an Open Source project.
Hosted on GitHub: https://github.com/Kurento
Overview – Why 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
Overview – Why Kurento?
Examples:
●
Abstraction of incompatible
video codecs
●
Multi-point distribution of media
●
Processing / Storing media
Overview – Why Kurento?
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
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
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 web page.
Overview – How does Kurento work?
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.
KMS Elements
Protocols and Codecs Media Repository
WebRtcEndpoint
RtpEndpoint
HttpEndpoint
PlayerEndpoint
RecorderEndpoint
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).
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.
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.
KMS Filters
Computer Vision Generic filter
Zbar
FaceDetector
PlateDetector
GStreamerFilter
Pipelines
●
All elements get created and linked through specific RPC commands
from the Client Application.
●
As seen before, complex topologies are possible.
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
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 (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.
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 available.
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
Pipeline
building
Pipeline
managed
media
SDP Ofer
(Mangled) SDP Ofer
SDP Answer(Mangled) SDP Answer
ICE Candidates
ICE Candidates
A closer look to some of the underlying technologies
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.
A closer look – GStreamer 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.
WebRtcEndpoint WebRtcEndpoint
Agnostic media
adapter, “hidden”
behind every
connection
Agnostic media
adapter, “hidden”
behind every
connection
H.264VP8
SinkSink
SRCSRC
SinkSink
SRCSRC
A closer look – SDP Offer/Answer
●
The standard signaling format for WebRTC.
●
Used to configure codecs & advanced settings in WebRtcEndpoint and
RtpEndpoint.
●
SDP started simple but has grown to become a mess.
See: https://webrtchacks.com/sdp-anatomy/
(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.)
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
A closer look – Application example: RTP Receiver
Kurento RTP Player is a recent addition to the Kurento Tutorials:
●
Receives an audio/video stream.
●
Redirects it and sends to a browser through WebRTC.
●
http://doc-kurento.readthedocs.io/en/latest/user/tutorials.html#rtp-receiver
RTP
producer
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();
}
A closer look – Application example: Magic Mirror
●
Receives a video stream from a browser.
●
Applies Computer Vision to detect a face and overlay a picture.
●
Sends back the modified video to the same Endpoint it came from.
●
http://doc-kurento.readthedocs.io/en/latest/user/tutorials.html#webrtc-magic-mirror
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 & Questions
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

What's hot

Enabling Applications to Exploit SmartNICs and FPGAs
Enabling Applications to Exploit SmartNICs and FPGAsEnabling Applications to Exploit SmartNICs and FPGAs
Enabling Applications to Exploit SmartNICs and FPGAs
inside-BigData.com
 

What's hot (20)

SFO15-102:ODP Project Update
SFO15-102:ODP Project UpdateSFO15-102:ODP Project Update
SFO15-102:ODP Project Update
 
HKG15-110: ODP Project Update
HKG15-110: ODP Project UpdateHKG15-110: ODP Project Update
HKG15-110: ODP Project Update
 
LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2LCU14 310- Cisco ODP v2
LCU14 310- Cisco ODP v2
 
LAS16-305: Smart City Big Data Visualization on 96Boards
LAS16-305: Smart City Big Data Visualization on 96BoardsLAS16-305: Smart City Big Data Visualization on 96Boards
LAS16-305: Smart City Big Data Visualization on 96Boards
 
HKG15-301: OVS implemented via ODP & vendor SDKs
HKG15-301: OVS implemented via ODP & vendor SDKsHKG15-301: OVS implemented via ODP & vendor SDKs
HKG15-301: OVS implemented via ODP & vendor SDKs
 
LAS16-207: Bus scaling QoS
LAS16-207: Bus scaling QoSLAS16-207: Bus scaling QoS
LAS16-207: Bus scaling QoS
 
LCA14: LCA14-209: ODP Project Update
LCA14: LCA14-209: ODP Project UpdateLCA14: LCA14-209: ODP Project Update
LCA14: LCA14-209: ODP Project Update
 
LAS16-106: GNU Toolchain Development Lifecycle
LAS16-106: GNU Toolchain Development LifecycleLAS16-106: GNU Toolchain Development Lifecycle
LAS16-106: GNU Toolchain Development Lifecycle
 
Whitebox Switches Deployment Experience
Whitebox Switches Deployment ExperienceWhitebox Switches Deployment Experience
Whitebox Switches Deployment Experience
 
G rpc talk with intel (3)
G rpc talk with intel (3)G rpc talk with intel (3)
G rpc talk with intel (3)
 
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
LCE13: Test and Validation Mini-Summit: Review Current Linaro Engineering Pro...
 
LAS16-TR03: Upstreaming 201
LAS16-TR03: Upstreaming 201LAS16-TR03: Upstreaming 201
LAS16-TR03: Upstreaming 201
 
LAS16-200: SCMI - System Management and Control Interface
LAS16-200:  SCMI - System Management and Control InterfaceLAS16-200:  SCMI - System Management and Control Interface
LAS16-200: SCMI - System Management and Control Interface
 
ODP Presentation LinuxCon NA 2014
ODP Presentation LinuxCon NA 2014ODP Presentation LinuxCon NA 2014
ODP Presentation LinuxCon NA 2014
 
LAS16-109: LAS16-109: The status quo and the future of 96Boards
LAS16-109: LAS16-109: The status quo and the future of 96BoardsLAS16-109: LAS16-109: The status quo and the future of 96Boards
LAS16-109: LAS16-109: The status quo and the future of 96Boards
 
Programmable data plane at terabit speeds
Programmable data plane at terabit speedsProgrammable data plane at terabit speeds
Programmable data plane at terabit speeds
 
DMA Survival Guide
DMA Survival GuideDMA Survival Guide
DMA Survival Guide
 
Enabling Applications to Exploit SmartNICs and FPGAs
Enabling Applications to Exploit SmartNICs and FPGAsEnabling Applications to Exploit SmartNICs and FPGAs
Enabling Applications to Exploit SmartNICs and FPGAs
 
LAS16-209: Finished and Upcoming Projects in LMG
LAS16-209: Finished and Upcoming Projects in LMGLAS16-209: Finished and Upcoming Projects in LMG
LAS16-209: Finished and Upcoming Projects in LMG
 
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
BKK16-302: Android Optimizing Compiler: New Member Assimilation GuideBKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
 

Similar to FIWARE Global Summit - Real-time Media Stream Processing Using Kurento

Similar to FIWARE Global Summit - Real-time Media Stream Processing Using Kurento (20)

FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using KurentoFIWARE Global Summit - Real-time Media Stream Processing Using Kurento
FIWARE Global Summit - Real-time Media Stream Processing Using Kurento
 
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
DPDK summit 2015: It's kind of fun  to do the impossible with DPDKDPDK summit 2015: It's kind of fun  to do the impossible with DPDK
DPDK summit 2015: It's kind of fun to do the impossible with DPDK
 
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro NakajimaDPDK Summit 2015 - NTT - Yoshihiro Nakajima
DPDK Summit 2015 - NTT - Yoshihiro Nakajima
 
Monkey Server
Monkey ServerMonkey Server
Monkey Server
 
Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2Netflix Open Source Meetup Season 4 Episode 2
Netflix Open Source Meetup Season 4 Episode 2
 
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitchDPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
DPDK Summit - 08 Sept 2014 - NTT - High Performance vSwitch
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
 
Snabbflow: A Scalable IPFIX exporter
Snabbflow: A Scalable IPFIX exporterSnabbflow: A Scalable IPFIX exporter
Snabbflow: A Scalable IPFIX exporter
 
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
Functioning incessantly of Data Science Platform with Kubeflow - Albert Lewan...
 
“Seamless Deployment of Multimedia and Machine Learning Applications at the E...
“Seamless Deployment of Multimedia and Machine Learning Applications at the E...“Seamless Deployment of Multimedia and Machine Learning Applications at the E...
“Seamless Deployment of Multimedia and Machine Learning Applications at the E...
 
Summit 16: How to Compose a New OPNFV Solution Stack?
Summit 16: How to Compose a New OPNFV Solution Stack?Summit 16: How to Compose a New OPNFV Solution Stack?
Summit 16: How to Compose a New OPNFV Solution Stack?
 
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...
RTBkit Meetup - Developer Spotlight, Behind the Scenes of RTBkit and Intro to...
 
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics WorkshopLagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
Lagopus presentation on 14th Annual ON*VECTOR International Photonics Workshop
 
Prashant Resume
Prashant ResumePrashant Resume
Prashant Resume
 
WebRTC Seminar Report
WebRTC  Seminar ReportWebRTC  Seminar Report
WebRTC Seminar Report
 
Pcp
PcpPcp
Pcp
 
H2O - the optimized HTTP server
H2O - the optimized HTTP serverH2O - the optimized HTTP server
H2O - the optimized HTTP server
 
Cloud native IPC for Microservices Workshop @ Containerdays 2022
Cloud native IPC for Microservices Workshop @ Containerdays 2022Cloud native IPC for Microservices Workshop @ Containerdays 2022
Cloud native IPC for Microservices Workshop @ Containerdays 2022
 
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...
Talk@JanusCon2019: Janus, WebRTC and ML - Fantastic technologies and how to m...
 
Zero Downtime JEE Architectures
Zero Downtime JEE ArchitecturesZero Downtime JEE Architectures
Zero Downtime JEE Architectures
 

More from FIWARE

Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptxCameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
FIWARE
 
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptxBoris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
FIWARE
 
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
FIWARE
 
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdfAbdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
FIWARE
 
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdfFGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FIWARE
 

More from FIWARE (20)

Behm_Herne_NeMo_akt.pptx
Behm_Herne_NeMo_akt.pptxBehm_Herne_NeMo_akt.pptx
Behm_Herne_NeMo_akt.pptx
 
Katharina Hogrebe Herne Digital Days.pdf
 Katharina Hogrebe Herne Digital Days.pdf Katharina Hogrebe Herne Digital Days.pdf
Katharina Hogrebe Herne Digital Days.pdf
 
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
Christoph Mertens_IDSA_Introduction to Data Spaces.pptxChristoph Mertens_IDSA_Introduction to Data Spaces.pptx
Christoph Mertens_IDSA_Introduction to Data Spaces.pptx
 
Behm_Herne_NeMo.pptx
Behm_Herne_NeMo.pptxBehm_Herne_NeMo.pptx
Behm_Herne_NeMo.pptx
 
Evangelists + iHubs Promo Slides.pptx
Evangelists + iHubs Promo Slides.pptxEvangelists + iHubs Promo Slides.pptx
Evangelists + iHubs Promo Slides.pptx
 
Lukas Künzel Smart City Operating System.pptx
Lukas Künzel Smart City Operating System.pptxLukas Künzel Smart City Operating System.pptx
Lukas Künzel Smart City Operating System.pptx
 
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptxPierre Golz Der Transformationsprozess im Konzern Stadt.pptx
Pierre Golz Der Transformationsprozess im Konzern Stadt.pptx
 
Dennis Wendland_The i4Trust Collaboration Programme.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptxDennis Wendland_The i4Trust Collaboration Programme.pptx
Dennis Wendland_The i4Trust Collaboration Programme.pptx
 
Ulrich Ahle_FIWARE.pptx
Ulrich Ahle_FIWARE.pptxUlrich Ahle_FIWARE.pptx
Ulrich Ahle_FIWARE.pptx
 
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptxAleksandar Vrglevski _FIWARE DACH_OSIH.pptx
Aleksandar Vrglevski _FIWARE DACH_OSIH.pptx
 
Water Quality - Lukas Kuenzel.pdf
Water Quality - Lukas Kuenzel.pdfWater Quality - Lukas Kuenzel.pdf
Water Quality - Lukas Kuenzel.pdf
 
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptxCameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
Cameron Brooks_FGS23_FIWARE Summit_Keynote_Cameron.pptx
 
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptxFiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
FiWareSummit.msGIS-Data-to-Value.2023.06.12.pptx
 
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptx
Boris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.pptxBoris Otto_FGS2023_Opening- EU Innovations from Data_PUB_V1_BOt.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....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
Bjoern de Vidts_FGS23_Opening_athumi - bjord de vidts - personal data spaces....
 
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdfAbdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
Abdulrahman Ibrahim_FGS23 Opening - Abdulrahman Ibrahim.pdf
 
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdfFGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
FGS2023_Opening_Red Hat Keynote Andrea Battaglia.pdf
 
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
HTAG_Skalierung_Plattform_lokal_final_versand.pptxHTAG_Skalierung_Plattform_lokal_final_versand.pptx
HTAG_Skalierung_Plattform_lokal_final_versand.pptx
 
WE_LoRaWAN _ IoT.pptx
WE_LoRaWAN  _ IoT.pptxWE_LoRaWAN  _ IoT.pptx
WE_LoRaWAN _ IoT.pptx
 
EU Opp_Clara Pezuela - German chapter.pptx
EU Opp_Clara Pezuela - German chapter.pptxEU Opp_Clara Pezuela - German chapter.pptx
EU Opp_Clara Pezuela - German chapter.pptx
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

FIWARE Global Summit - Real-time Media Stream Processing Using Kurento

  • 1. Real-Time Media Stream Processing using Kurento Juan Navarro Moreno Kurento Software Developer jnavarro@naevatec.com github.com/j1elo www.kurento.org
  • 2. Overview – What is Kurento? ● A server that simplifies creation of streaming applications. ● Focused on processing of Audio/Video media streams. ● Supporting WebRTC communications. ● Simple workflow: input → process → output. Kurento is an Open Source project. Hosted on GitHub: https://github.com/Kurento
  • 3. Overview – Why 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
  • 4. Overview – Why Kurento? Examples: ● Abstraction of incompatible video codecs ● Multi-point distribution of media ● Processing / Storing media
  • 5. Overview – Why Kurento?
  • 6. 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
  • 7. 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
  • 8. 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 web page.
  • 9. Overview – How does Kurento work?
  • 11. 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.
  • 12. KMS Elements Protocols and Codecs Media Repository WebRtcEndpoint RtpEndpoint HttpEndpoint PlayerEndpoint RecorderEndpoint
  • 13. 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).
  • 14. 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.
  • 15. 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.
  • 16. KMS Filters Computer Vision Generic filter Zbar FaceDetector PlateDetector GStreamerFilter
  • 17. Pipelines ● All elements get created and linked through specific RPC commands from the Client Application. ● As seen before, complex topologies are possible.
  • 18. 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
  • 19. 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 (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.
  • 20. 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 available.
  • 21. 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 Pipeline building Pipeline managed media SDP Ofer (Mangled) SDP Ofer SDP Answer(Mangled) SDP Answer ICE Candidates ICE Candidates
  • 22. A closer look to some of the underlying technologies
  • 23. 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.
  • 24. A closer look – GStreamer 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. WebRtcEndpoint WebRtcEndpoint Agnostic media adapter, “hidden” behind every connection Agnostic media adapter, “hidden” behind every connection H.264VP8 SinkSink SRCSRC SinkSink SRCSRC
  • 25. A closer look – SDP Offer/Answer ● The standard signaling format for WebRTC. ● Used to configure codecs & advanced settings in WebRtcEndpoint and RtpEndpoint. ● SDP started simple but has grown to become a mess. See: https://webrtchacks.com/sdp-anatomy/ (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.)
  • 26. 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:
  • 28. A closer look – Application example: RTP Receiver Kurento RTP Player is a recent addition to the Kurento Tutorials: ● Receives an audio/video stream. ● Redirects it and sends to a browser through WebRTC. ● http://doc-kurento.readthedocs.io/en/latest/user/tutorials.html#rtp-receiver RTP producer
  • 29. 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(); }
  • 30. A closer look – Application example: Magic Mirror ● Receives a video stream from a browser. ● Applies Computer Vision to detect a face and overlay a picture. ● Sends back the modified video to the same Endpoint it came from. ● http://doc-kurento.readthedocs.io/en/latest/user/tutorials.html#webrtc-magic-mirror
  • 31. 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(); }
  • 33. Thank you! http://fiware.org Follow @FIWARE on Twitter Juan Navarro Moreno Kurento Software Developer jnavarro@naevatec.com github.com/j1elo www.kurento.org