SlideShare a Scribd company logo
LIVE STREAMING AT SCALE
Jordi Cenzano | Director of engineering
jcenzano@brightcove.com
jordicenzano
mmsys2019
2019/06/19
Agenda
• Simple live streaming
• Real (complex) live streaming blocks
• Some challenges
◦ Ingest
◦ Personalized live streams (SSAI)
◦ Monitoring
◦ Latency
◦ Redundancy
• Future
• Conclusions
WHAT IS LIVE STREAMING?
Simple live streaming
Simple live streaming demo
WebServer (nodeJS): https://gist.github.com/jordicenzano/a943bda656ad1e0a0568fbaad311af05
RTMP + transcode + HLS (ffmpeg): https://gist.github.com/jordicenzano/c5516b5854eb046bd1c27076fe4ba917
#!/usr/bin/env bash
ffmpeg -hide_banner 
-listen 1 -i "rtmp://0.0.0.0:1935/live/stream" 
-c:v libx264 -b:v 900k -g 60 -profile:v baseline -preset veryfast 
-c:a aac -b:a 48k 
-hls_flags delete_segments -hls_time 6 -hls_segment_filename ~/480p_%05d.ts ~/480p.m3u8
#!/usr/bin/env bash
http-server ~ -p 8080 --cors -c -1
WHAT IS REALLY LIVE
STREAMING?
Live streaming blocks
RTMP
TS + ?
(h264+AAC)
h264
AAC
Nxh264
NxAAC
TS
fMP4
Txt
XML
HLS
DASH
HTTP[s]
HLS
DASH
HTTP[s]
LIVE INGEST
Live ingest
From: https://en.wikipedia.org/wiki/Internet_service_provider
• Data loss
• Latency
• Jitter
• Reordering
• Corruption
• Duplication
S
L
A
Live ingest options: RTMP
• Pros
◦ Reliable (TCP based)
◦ Popular
•Cons (for live streaming)
◦ Only 1 video + 1 audio + data
◦ Connection oriented
◦ Retries consume BW
◦ Slow packet loss recovery
◦ No real time guaranteed
Live ingest options
•Pros
◦ Can transport everything
◦ Not connection oriented
◦ Designed for live
◦ Very common in the broadcast world
•Cons
◦ Not reliable
◦ Complexity
Live ingest RTMP vs SRT
Source code:
https://github.com/jordicenzano/live-streaming-ingest-advance
d-simulation
• Comparison RTMP vs SRT
◦ 5 % packet loss
◦ 50ms delay
◦ 11 Mbps BW
◦ Test stream
• 8Mbps VBR (9Mbps max)
• h264 1 keyframe every 3s
PERSONALIZATION
(SSAI: Server Side ad insertion)
Live streaming
Live SSAI
• Considerations
◦ One manifest per viewer = 1:1
• Same for content
• Different for adbreaks
◦ Track every viewer in a “DB”
Live stream personalization
1M CCU
HLS 6s TD
2.5 Tbps(@2.5Mbps)
333K rps
(1 m3u8
1 redir ts/fmp4)
166K r-w/s
◦ Ultimate solution: Edge?
Live streaming SSAI
SCTE 35
SCTE35 info
Session info
Job info
Ad-123c.mp4
ad-123c-0001.ts
Live streaming SSAI
$X
...
#EXTINF:8.0,
A-0000.ts
#EXTINF:6.40,
A-0001.ts
#AD-BREAK
#EXTINF:8.0,
A-0002.ts
#EXTINF:4.0,
A-0003.ts
...
...
#EXTINF:8.0,
A-0000.ts
#EXTINF:6.40,
A-0001.ts
#EXT-X-DISCONTINUITY
#EXTINF:8.0,
ad-123c-0001.ts
#EXT-X-DISCONTINUITY
#EXTINF:4.0,
A-0003.ts
...
Live streaming SSAI impressions
1M CCU
6 ads /
adbreak
20 imp / ad
120 M
imp / adbreak
MONITORING
• Considerations
◦ Measure all you can
• Impact of logging / metrics
◦ All real time
• Metrics
• Logs
◦ Aggregate and alarm wisely
◦ Automate
Monitoring
LATENCY
Latency ≠ BAD
HLS Latency sources
• LHLS (periscope approach)
◦ Chunk transfer + advanced segments
Low latency “simple” demo
Source code:
https://github.com/jordicenzano/go-ts-segmenter
https://github.com/mjneil/go-chunked-streaming-server (From Matthew Neil)
REDUNDANCY
Redundancy blocks
Redundancy blocks
#EXTM3U
#Example of HLS REDUNDANT STREAMS
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=200000, RESOLUTION=720x480
http://ALPHA.mycompany.com/lo/prog_index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=200000, RESOLUTION=720x480
http://BETA.mycompany.com/lo/prog_index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=500000, RESOLUTION=1920x1080
http://ALPHA.mycompany.com/md/prog_index.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1, BANDWIDTH=500000, RESOLUTION=1920x1080
http://BETA.mycompany.com/md/prog_index.m3u8
Redundancy blocks: Full sync approach
Redundancy blocks: non-sync approach
...
#EXTINF:4.000000,
from-A-0000.ts
#EXTINF:4.000000,
from-A-0001.ts
#EXT-X-DISCONTINUITY
#EXTINF:4.000000,
from-B-0001.ts
....
A
B
Future
• Do more at the edge with multi CDN
• Personalized streams
◦ Cohorts approach (hotstar 2019)
• Low latency deployments
◦ ABR
• Codecs
◦ More, faster, deeper pixels
◦ Context aware encoding
Conclusions: Experience based
• Everything fails, and we are live
◦ Plan B, plan C, ,,,, plan Z
◦ Better hot - hot
• Be sure the involved 3rd party are ready
◦ CDNs, AdServers
• Load test (not easy)
◦ There are limits everywhere
◦ Individually
◦ End to end
• Enjoy the challenge
Q & A
Thanks!
Jordi Cenzano
jcenzano@brightcove.com
jordicenzano

More Related Content

PDF
Building your own simple live streaming platform. Slides form BOS video meetu...
PPTX
Brightcove live tech overview
PDF
PLAM 2015 - Evolving Backups Strategy, Devploying pyxbackup
PDF
MazuV-Debug-System
PDF
DepokCyberSecurity - ServerHack - Wisolusindo -
PDF
WebRTCを用いた耐故障性の高い
ウェブブラウザ間構造化P2Pネットワークの実現
PDF
Super-Charging Kamailio
PDF
Sipwise rtpengine
Building your own simple live streaming platform. Slides form BOS video meetu...
Brightcove live tech overview
PLAM 2015 - Evolving Backups Strategy, Devploying pyxbackup
MazuV-Debug-System
DepokCyberSecurity - ServerHack - Wisolusindo -
WebRTCを用いた耐故障性の高い
ウェブブラウザ間構造化P2Pネットワークの実現
Super-Charging Kamailio
Sipwise rtpengine

What's hot (20)

PDF
nginx.conf - globo.com's live video platform for fifa world cup 14
PDF
Mikhail Belopuhov: OpenBSD: Where is crypto headed?
PDF
Things you should know for network programming
PDF
OSNoise Tracer: Who Is Stealing My CPU Time?
PDF
Rapid IoT prototyping with mruby
TXT
Samuel
PDF
Skydive, real-time network analyzer, container integration
PDF
Coscup - 站在NAS的中心呼喊物聯網
PDF
Skydive 5/07/2016
PDF
Skydive 31 janv. 2016
PDF
Continuous Go Profiling & Observability
PPTX
Live Transcript Delivery
PDF
Crimson: Ceph for the Age of NVMe and Persistent Memory
DOCX
Computer Estimate
PDF
Tensor Core
PDF
WebRTC と Native とそれから、それから。
PPTX
Pci passthrough
PDF
Quality of Service Ingress Rate Limiting and OVS Hardware Offloads
PDF
Ostinato - Craft Packets, Generate Traffic [SharkFest '20]
PDF
Smartcom's control plane software, a customized version of FreeBSD by Boris A...
nginx.conf - globo.com's live video platform for fifa world cup 14
Mikhail Belopuhov: OpenBSD: Where is crypto headed?
Things you should know for network programming
OSNoise Tracer: Who Is Stealing My CPU Time?
Rapid IoT prototyping with mruby
Samuel
Skydive, real-time network analyzer, container integration
Coscup - 站在NAS的中心呼喊物聯網
Skydive 5/07/2016
Skydive 31 janv. 2016
Continuous Go Profiling & Observability
Live Transcript Delivery
Crimson: Ceph for the Age of NVMe and Persistent Memory
Computer Estimate
Tensor Core
WebRTC と Native とそれから、それから。
Pci passthrough
Quality of Service Ingress Rate Limiting and OVS Hardware Offloads
Ostinato - Craft Packets, Generate Traffic [SharkFest '20]
Smartcom's control plane software, a customized version of FreeBSD by Boris A...
Ad

Similar to mmsys2019 live streaming at scale (20)

PPTX
Live server side ad insertion at scale
PPTX
Multimedia Streaming Architecture
PPTX
What is hls streaming
PPT
Dos presentation by ahlam shakeel
PPT
Apple's live http streaming
PDF
20 Years of Streaming in 20 Minutes
PDF
Streaming with Varnish
KEY
Http streaming
PDF
Ultimate Guide to Live Streaming
PDF
Implementing HLS server with GO
PDF
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
PDF
Picking software to run a business livestream
PPTX
Cocoaheads - Streaming on iOS devices
PDF
Different Types of Live Video Streaming Protocols and the Way They Work
PDF
Streaming as a linear channel
PDF
Live Streaming Tools & Equipment
PDF
Streaming Media On Labs
PDF
Video streaming on e-lab
PPTX
Approaches to Building Media Streaming Applications
PDF
CircleHD live streaming guide
Live server side ad insertion at scale
Multimedia Streaming Architecture
What is hls streaming
Dos presentation by ahlam shakeel
Apple's live http streaming
20 Years of Streaming in 20 Minutes
Streaming with Varnish
Http streaming
Ultimate Guide to Live Streaming
Implementing HLS server with GO
Building A Streaming Apple TV App (CocoaConf San Jose, Nov 2016)
Picking software to run a business livestream
Cocoaheads - Streaming on iOS devices
Different Types of Live Video Streaming Protocols and the Way They Work
Streaming as a linear channel
Live Streaming Tools & Equipment
Streaming Media On Labs
Video streaming on e-lab
Approaches to Building Media Streaming Applications
CircleHD live streaming guide
Ad

Recently uploaded (20)

PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Spectroscopy.pptx food analysis technology
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
Machine Learning_overview_presentation.pptx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Approach and Philosophy of On baking technology
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
A Presentation on Artificial Intelligence
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
cuic standard and advanced reporting.pdf
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Encapsulation_ Review paper, used for researhc scholars
MYSQL Presentation for SQL database connectivity
Spectroscopy.pptx food analysis technology
“AI and Expert System Decision Support & Business Intelligence Systems”
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Spectral efficient network and resource selection model in 5G networks
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Machine Learning_overview_presentation.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
Approach and Philosophy of On baking technology
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Unlocking AI with Model Context Protocol (MCP)
A comparative analysis of optical character recognition models for extracting...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
A Presentation on Artificial Intelligence
The Rise and Fall of 3GPP – Time for a Sabbatical?
cuic standard and advanced reporting.pdf
SOPHOS-XG Firewall Administrator PPT.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Encapsulation_ Review paper, used for researhc scholars

mmsys2019 live streaming at scale