SlideShare a Scribd company logo
The challenges involved in generating ST
2110 streams on Standard IT Hardware
Kieran Kunhya – kierank@obe.tv
Company Introduction
• Company specialising in software-
based encoders and decoders for
Sport, News and Channel
contribution (B2B)
• Based in Central London
• Build everything in house
– Hardware, firmware, software
• Not to be confused with:
What is ST 2110
“If you can't explain it to a six year old, you don't understand it yourself.”
• Never seen any webinars/papers etc. get close to a half-decent
explanation
• Way too detailed or way too handwavy
• Often very full of jargon
• No explanation of why things are being done
• Let’s simplify years of work into 10 minutes!
• Then will go into deep-dive about implementation challenges in software
Where things are
• Live production (sports, news etc.) uses Serial
Digital Interface cables
• Old fashioned Electrical Signal transmitting what
was a very large amount of data when it was
invented (gigabit/s). Nowadays not so much.
• One TV signal (pictures + sound) in one cable
• And other historical signals
• Expensive equipment to switch between signals
• Specific to the television industry, huge mess of
cabling
Where things are going
• Don’t want to use old-fashioned cabling
• Internet growing very quickly
• Youtube, Netflix, Social Media, Big Data
• We can use Internet technology (but not the
internet itself) to send pictures and sound
around a facility. Known as Internet Protocol
“IP” technology.
• Chop up a television picture and audio into
thousands of little pieces (“packets”) and send
over a wired network
• Hundreds of television signals in a cable.
Cheaper equipment from much bigger industry
About Time (1)
• Set the time of two clocks and check them after
a day
• For example a microwave and an oven
• They won’t be the same
• Clocks have their own time source inside that
have small differences
• Could be dependent on heat, location (e.g
altitude), manufacturer of the clock
• Nowadays, phone connects to the Internet to set
its time
About Time (2)
• Television pictures and sound are generated from a clock on the camera or
microphone. In Europe, 25 still pictures a second
• Hard to cut between two camera angles if the clocks do not match
1
2
About Time (3)
• An old fashioned signal to keep them together, yet another cable
• Note: on the web, Zoom, webcasts etc., don’t do this
1
2
About Time (4)
• During a leap year an extra day is added because the Earth
doesn’t perfectly go round the Sun (365.2422 days)
• Also small adjustments known as “leap seconds” at certain
times when the clock strikes New Year’s
• Need to make sure time doesn’t jump otherwise pictures will
glitch when Big Ben strikes midnight
• One of the reasons we can’t just use the time sync
mechanism like a phone
• Use GPS (satellite navigation) as a time-source, very high
quality, has no leap seconds
• Transport this as IP Packets over the Network (Precision
Time Protocol – PTP) but much better quality than a normal
Internet connected clock
Packets and time (1)
• Split the pictures and sound up into thousands of little packets
• Imagine all television signals started at the same time, and each picture was a “tick”
• Work how many pictures there should be by now and wait to start at the right time
1st January
1970
(PTP epoch)
42 years
later… Now
Packets and time (2)
• Lots of pictures and sounds, split into packets and being sent over the network
• Packets given an address (can send to more than one place) – millions per second
• Not everyone needs to receive pictures if
they are only using the sound
• When I receive these packets, how do I know
when they are from?
• Need to know this so I can make sure they
are in sync (when he kicks the ball you get a
kicking sound at the right time)
• Attach the time (“timestamp”) to each packet
so we can put the puzzle back together
Key points
• We want to use modern IP technology to make live
television
• We have agreed on a common time across all the clocks
in the broadcast
• We split pictures and sound up into thousands of packets
and make sure we send them at the right time, and add a
timestamp to each packets
• Anyone who wants to receive these packets uses the
timestamps to put them all back together
• The rest is just jargon, and implementation details
Commercial Drivers
• Innovation in Live Production is limited by
historical technology like SDI
• Inflexible, costly, space-consuming
• Difficult to scale operations
• In contrast to modern streaming services that
operate entirely in the cloud and can scale
very easily
• Also challenging to use IT hardware in an SDI
environment, conversion devices required
“This is easy, we’ve done this before”
• Many have just put SDI/IP converters at both
ends of the product
• This is like electric car manufacturers taking
petrol cars and swapping the engine out
• Doesn’t take advantage of the benefits of new
technology (density etc)
• Constrains product development (technical
debt)
• Challenging product redesigns are required -
build the product around IP (analogous to the
electric battery/engine)
Using Standard IT Hardware
• Large cost/operational efficiencies using IT Hardware
• Cloud-like operations for live production
• But what are the challenges?
• Very High Data Rates (of UDP traffic)
• Very tight timing requirements (hardware-centric)
• Software-unfriendly data structures for pixel packing
• Multidisciplinary engineering challenge
• The technical paper goes into a lot more detail
Very High Data Rates
• UDP traffic requires costly system calls and memory
copies by default in Operating System (OS)
• Kernel Bypass techniques used to reduce overheads
• Bypass the Operating System and read/write directly to
Network Interface Card (NIC)
• Many out there, DPDK, netmap, Registered IO
• Send packets in batches (we use ~4000)
• Approximately 10-20x speed improvement
• Rendering video to/from NIC like a video player does to
Graphics Card
• Implement IP stack yourself, Ethernet, VLAN, IP, UDP
• Lose features of the OS such as firewalls and routing
Pixel Formats
• 2110 pixel format (pgroup) is very software unfriendly
• Computers work in bytes (8-bits) but no pixel lies on an byte boundary (alignment)
• Many possible incoming formats, all need conversion to/from pgroup
• Even in “fast” languages like C this is a slow operation
• We use handwritten special instructions on CPU (SIMD) to accelerate
• Easily 20x faster operations than C
• School of thought saying C is fast enough is incredibly wrong
• Kernel bypass + SIMD – 100-200x faster
Timing: Frequency
• Difficult to send thousands of packets on a server with
microsecond accuracy. Software has ~100us timescale.
• High Frequency Traders in finance do it, but carefully tuned hardware
• Very tight busy loop required
• Use NIC (Intel + Mellanox) rate limiters to control the
output packet rate
• Designed to hard-cap virtual machines rate
• Numerous challenges associated with rate limiters
• Need to send fractional bits per second for NTSC
• Large inaccuracy in rate limiters. (i.e Ask for 1Gbps and get 1.001Gbps)
• Adaptively measure and compensate otherwise buffers underflow
• Also drift relative to PTP clock. Have to measure both!
• Likely an internal oscillator on the NIC
Timing: Phase
• Agreed that a frame must be produced N frames after 1-Jan-1970
• Very difficult to start the video frame precisely at the correct time
• Don’t know how long the gap is between sending the packet in software and it going on
the wire
• We took approach of starting, measuring how far and drifting forward
• Very careful design needed not to swing too rapidly or too slowly
• Three coupled variables, packet gaps, frequency and phase
• Change one and all of them move. Drift compensation is hard
Other Practicalities
• 2110 requires a gap (no packets), where historical
blanking data used to go
• Hard to make a clean gap in software, can’t just stop then
start
• Skew of 2022-7 links is a big problem
• Can’t send two packets on the link at exactly the same time
• Have to send on both, measure and compensate
• Handle switch port going down
• Buffer doesn’t empty and contains stale data and needs to be
resynced with the other link
• Could have to send flows at different resolutions or
framerates at the same time
• Numerous drift compensation algorithms could collide
Audio
• Audio seemed like a simple problem
• Low bitrate, 10Mbit/s doesn’t need kernel bypass
• BUT, huge CPU load at 125us profile
• Bitrate is low but Packet Rate is high!
• Per packet system call overhead
• After several months, conceded and used kernel
bypass instead of busy loop and OS
Interoperability
• Huge problems with third-party interoperability
• Some receivers require source port to match destination port (why?)
• A lot of equipment ignoring RTP timestamps and using packet arrival times
• Set them to zero when sending, equipment receives and processes without issue
• Likewise, some equipment sends timestamps far in the past, some equipment doesn’t mind
• Very problematic behaviour for software receivers. Software receivers generally trust
timestamps as NIC or OS may not pass packet arrival times to software. In a switched
network packet arrival times should not be used, timestamps should be used.
• Simple things like IP header checksums not being verified
• Audio had limitations, a lot of single flow devices and channel number
limitations
Software Comments
• Challenging to maintain a modular codebase with
Uncompressed IP
• Technical debt accumulation
• A number of large rewrites
• Hard to use standard paradigms such as reference
counting (especially with tiny 125us buffers)
• Very tight integration with application
• Can’t use garbage collection, takes too long
Conclusions
• A 2110 software sender is a massive technical
challenge lasting several years
• This is not just normal software. It’s not a road-car,
it’s a very high performance Formula 1 car
• Can’t compare with traditional media processing
applications that process tens of megabits per
second
• Thousands of times more data per second
• In the end this is too complex to become
mainstream, live broadcast continues to be held
back by such complexity. Not plug-and-play.
The future
• Pandemic has changed the spotlight to cloud production rather than on-premise
• Shared environment, tight timing not possible/necessary
• New protocol needed such as Amazon CDI
• Software-friendly pixel format – Cloud Exchange Format:
https://github.com/vsf-tv/cef
• Work is ongoing!
Thank You!
• Thank you to my team who worked
very hard on this!
• Thanks also to Chris and Martin from
Sky and Tim and Fabio from Amazon
and IMG who supported us
commercially and technically during
this development
• Watched this in action during
quarantine!

More Related Content

What's hot

6 spatial filtering p2
6 spatial filtering p26 spatial filtering p2
6 spatial filtering p2
Gichelle Amon
 

What's hot (20)

5G for onboard racing car video
5G for onboard racing car video5G for onboard racing car video
5G for onboard racing car video
 
Digital image processing
Digital image processingDigital image processing
Digital image processing
 
6 spatial filtering p2
6 spatial filtering p26 spatial filtering p2
6 spatial filtering p2
 
H.264 nal and RTP
H.264 nal and RTPH.264 nal and RTP
H.264 nal and RTP
 
Video Compression, Part 2-Section 1, Video Coding Concepts
Video Compression, Part 2-Section 1, Video Coding Concepts Video Compression, Part 2-Section 1, Video Coding Concepts
Video Compression, Part 2-Section 1, Video Coding Concepts
 
Applications of Digital image processing in Medical Field
Applications of Digital image processing in Medical FieldApplications of Digital image processing in Medical Field
Applications of Digital image processing in Medical Field
 
Broadcast Lens Technology Part 3
Broadcast Lens Technology Part 3Broadcast Lens Technology Part 3
Broadcast Lens Technology Part 3
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Unity道場11 Shader Forge 101 ~ShaderForgeをつかって学ぶシェーダー入門~ 基本操作とよく使われるノード編
Unity道場11 Shader Forge 101 ~ShaderForgeをつかって学ぶシェーダー入門~ 基本操作とよく使われるノード編Unity道場11 Shader Forge 101 ~ShaderForgeをつかって学ぶシェーダー入門~ 基本操作とよく使われるノード編
Unity道場11 Shader Forge 101 ~ShaderForgeをつかって学ぶシェーダー入門~ 基本操作とよく使われるノード編
 
Digital Image Processing: Digital Image Fundamentals
Digital Image Processing: Digital Image FundamentalsDigital Image Processing: Digital Image Fundamentals
Digital Image Processing: Digital Image Fundamentals
 
「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発「原神」におけるコンソールプラットフォーム開発
「原神」におけるコンソールプラットフォーム開発
 
Implementation and comparison of Low pass filters in Frequency domain
Implementation and comparison of Low pass filters in Frequency domainImplementation and comparison of Low pass filters in Frequency domain
Implementation and comparison of Low pass filters in Frequency domain
 
Instruction Manual ATN X-Sight HD Series Weapon Sights | Optics Trade
Instruction Manual ATN X-Sight HD Series Weapon Sights | Optics TradeInstruction Manual ATN X-Sight HD Series Weapon Sights | Optics Trade
Instruction Manual ATN X-Sight HD Series Weapon Sights | Optics Trade
 
CG 論文講読会 2013/2/12 "A reconstruction filter for plausible motion blur"
CG 論文講読会 2013/2/12 "A reconstruction filter for plausible motion blur"CG 論文講読会 2013/2/12 "A reconstruction filter for plausible motion blur"
CG 論文講読会 2013/2/12 "A reconstruction filter for plausible motion blur"
 
04 transaction models
04 transaction models04 transaction models
04 transaction models
 
CGWORLD 2021 クリエイティブカンファレンス
CGWORLD 2021 クリエイティブカンファレンス CGWORLD 2021 クリエイティブカンファレンス
CGWORLD 2021 クリエイティブカンファレンス
 
Image enhancement techniques
Image enhancement techniques Image enhancement techniques
Image enhancement techniques
 
Adaptive unsharp masking
Adaptive unsharp maskingAdaptive unsharp masking
Adaptive unsharp masking
 
C++からWebRTC (DataChannel)を利用する
C++からWebRTC (DataChannel)を利用するC++からWebRTC (DataChannel)を利用する
C++からWebRTC (DataChannel)を利用する
 
Digital Image Processing: Image Restoration
Digital Image Processing: Image RestorationDigital Image Processing: Image Restoration
Digital Image Processing: Image Restoration
 

Similar to The challenges of generating 2110 streams on Standard IT Hardware

tutorial-Deterministic-Ethernet-stp.ppt
tutorial-Deterministic-Ethernet-stp.ppttutorial-Deterministic-Ethernet-stp.ppt
tutorial-Deterministic-Ethernet-stp.ppt
ssuser3855be
 
Slides for Week 4 - Lec 2
Slides for Week 4 - Lec 2Slides for Week 4 - Lec 2
Slides for Week 4 - Lec 2
Videoguy
 

Similar to The challenges of generating 2110 streams on Standard IT Hardware (20)

Moving to software-based production workflows and containerisation of media a...
Moving to software-based production workflows and containerisation of media a...Moving to software-based production workflows and containerisation of media a...
Moving to software-based production workflows and containerisation of media a...
 
Using IT Equipment in Live Broadcast
Using IT Equipment in Live BroadcastUsing IT Equipment in Live Broadcast
Using IT Equipment in Live Broadcast
 
Native IP Decoding MPEG-TS Video to Uncompressed IP (and Vice versa) on COTS ...
Native IP Decoding MPEG-TS Video to Uncompressed IP (and Vice versa) on COTS ...Native IP Decoding MPEG-TS Video to Uncompressed IP (and Vice versa) on COTS ...
Native IP Decoding MPEG-TS Video to Uncompressed IP (and Vice versa) on COTS ...
 
Don't just go IP - Go IT
Don't just go IP - Go ITDon't just go IP - Go IT
Don't just go IP - Go IT
 
Stable Feed and Lower Costs with Use of 5G and Satellite Stable Feed and Lowe...
Stable Feed and Lower Costs with Use of 5G and Satellite Stable Feed and Lowe...Stable Feed and Lower Costs with Use of 5G and Satellite Stable Feed and Lowe...
Stable Feed and Lower Costs with Use of 5G and Satellite Stable Feed and Lowe...
 
Tech 2 tech low latency networking on Janet presentation
Tech 2 tech low latency networking on Janet presentationTech 2 tech low latency networking on Janet presentation
Tech 2 tech low latency networking on Janet presentation
 
Methods for Improving NTP
Methods for Improving NTPMethods for Improving NTP
Methods for Improving NTP
 
Seminario utovrm
Seminario utovrmSeminario utovrm
Seminario utovrm
 
tutorial-Deterministic-Ethernet-stp.ppt
tutorial-Deterministic-Ethernet-stp.ppttutorial-Deterministic-Ethernet-stp.ppt
tutorial-Deterministic-Ethernet-stp.ppt
 
IBC 2022 IP Showcase - Timestamps in ST 2110: What They Mean and How to Measu...
IBC 2022 IP Showcase - Timestamps in ST 2110: What They Mean and How to Measu...IBC 2022 IP Showcase - Timestamps in ST 2110: What They Mean and How to Measu...
IBC 2022 IP Showcase - Timestamps in ST 2110: What They Mean and How to Measu...
 
Ch 1 Introduction(1).docx
Ch 1 Introduction(1).docxCh 1 Introduction(1).docx
Ch 1 Introduction(1).docx
 
DVB-S2 migration - A user's experience - EUMETCast User Forum 2014
DVB-S2 migration - A user's experience - EUMETCast User Forum 2014DVB-S2 migration - A user's experience - EUMETCast User Forum 2014
DVB-S2 migration - A user's experience - EUMETCast User Forum 2014
 
strategic value of a first project to digitise analogue collections
strategic value of a first project to digitise analogue collectionsstrategic value of a first project to digitise analogue collections
strategic value of a first project to digitise analogue collections
 
Multimedia-Applications.ppt
Multimedia-Applications.pptMultimedia-Applications.ppt
Multimedia-Applications.ppt
 
Ip live production
Ip live productionIp live production
Ip live production
 
Bluetube
BluetubeBluetube
Bluetube
 
LPWAN Cost Webinar
LPWAN Cost WebinarLPWAN Cost Webinar
LPWAN Cost Webinar
 
Improving NTP Installed Base Time Accuracy
Improving NTP Installed Base Time AccuracyImproving NTP Installed Base Time Accuracy
Improving NTP Installed Base Time Accuracy
 
Slides for Week 4 - Lec 2
Slides for Week 4 - Lec 2Slides for Week 4 - Lec 2
Slides for Week 4 - Lec 2
 
CVnew
CVnewCVnew
CVnew
 

More from Kieran Kunhya

London Video Tech - Adventures in cutting every last millisecond from glass-t...
London Video Tech - Adventures in cutting every last millisecond from glass-t...London Video Tech - Adventures in cutting every last millisecond from glass-t...
London Video Tech - Adventures in cutting every last millisecond from glass-t...
Kieran Kunhya
 

More from Kieran Kunhya (9)

Baby Demuxed's First Assembly Language Function
Baby Demuxed's First Assembly Language FunctionBaby Demuxed's First Assembly Language Function
Baby Demuxed's First Assembly Language Function
 
AVX512 assembly language in FFmpeg
AVX512 assembly language in FFmpegAVX512 assembly language in FFmpeg
AVX512 assembly language in FFmpeg
 
Private 5G Networks at the Queen's Funeral and Elsewhere
Private 5G Networks at the Queen's Funeral and ElsewherePrivate 5G Networks at the Queen's Funeral and Elsewhere
Private 5G Networks at the Queen's Funeral and Elsewhere
 
Ground-Cloud-Cloud-Ground - NAB 2022 IP Showcase
Ground-Cloud-Cloud-Ground - NAB 2022 IP ShowcaseGround-Cloud-Cloud-Ground - NAB 2022 IP Showcase
Ground-Cloud-Cloud-Ground - NAB 2022 IP Showcase
 
How to explain ST 2110 to a six year old.
How to explain ST 2110 to a six year old.How to explain ST 2110 to a six year old.
How to explain ST 2110 to a six year old.
 
Experiences from weekly sports broadcasts over 5G - what's possible and what ...
Experiences from weekly sports broadcasts over 5G - what's possible and what ...Experiences from weekly sports broadcasts over 5G - what's possible and what ...
Experiences from weekly sports broadcasts over 5G - what's possible and what ...
 
London Video Tech - Adventures in cutting every last millisecond from glass-t...
London Video Tech - Adventures in cutting every last millisecond from glass-t...London Video Tech - Adventures in cutting every last millisecond from glass-t...
London Video Tech - Adventures in cutting every last millisecond from glass-t...
 
Implementing Uncompressed over IP in software and the pitfalls
Implementing Uncompressed over IP in software and the pitfallsImplementing Uncompressed over IP in software and the pitfalls
Implementing Uncompressed over IP in software and the pitfalls
 
FOSS in Broadcast
FOSS in BroadcastFOSS in Broadcast
FOSS in Broadcast
 

Recently uploaded

AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
Alluxio, Inc.
 

Recently uploaded (20)

A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
A Python-based approach to data loading in TM1 - Using Airflow as an ETL for TM1
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
How To Build a Successful SaaS Design.pdf
How To Build a Successful SaaS Design.pdfHow To Build a Successful SaaS Design.pdf
How To Build a Successful SaaS Design.pdf
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAGAI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
AI/ML Infra Meetup | Reducing Prefill for LLM Serving in RAG
 
Benefits of Employee Monitoring Software
Benefits of  Employee Monitoring SoftwareBenefits of  Employee Monitoring Software
Benefits of Employee Monitoring Software
 
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
AI/ML Infra Meetup | Improve Speed and GPU Utilization for Model Training & S...
 
A Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data MigrationA Guideline to Gorgias to to Re:amaze Data Migration
A Guideline to Gorgias to to Re:amaze Data Migration
 
Studiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting softwareStudiovity film pre-production and screenwriting software
Studiovity film pre-production and screenwriting software
 
iGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by SkilrockiGaming Platform & Lottery Solutions by Skilrock
iGaming Platform & Lottery Solutions by Skilrock
 
GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf10 Essential Software Testing Tools You Need to Know About.pdf
10 Essential Software Testing Tools You Need to Know About.pdf
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 

The challenges of generating 2110 streams on Standard IT Hardware

  • 1. The challenges involved in generating ST 2110 streams on Standard IT Hardware Kieran Kunhya – kierank@obe.tv
  • 2. Company Introduction • Company specialising in software- based encoders and decoders for Sport, News and Channel contribution (B2B) • Based in Central London • Build everything in house – Hardware, firmware, software • Not to be confused with:
  • 3. What is ST 2110 “If you can't explain it to a six year old, you don't understand it yourself.” • Never seen any webinars/papers etc. get close to a half-decent explanation • Way too detailed or way too handwavy • Often very full of jargon • No explanation of why things are being done • Let’s simplify years of work into 10 minutes! • Then will go into deep-dive about implementation challenges in software
  • 4. Where things are • Live production (sports, news etc.) uses Serial Digital Interface cables • Old fashioned Electrical Signal transmitting what was a very large amount of data when it was invented (gigabit/s). Nowadays not so much. • One TV signal (pictures + sound) in one cable • And other historical signals • Expensive equipment to switch between signals • Specific to the television industry, huge mess of cabling
  • 5. Where things are going • Don’t want to use old-fashioned cabling • Internet growing very quickly • Youtube, Netflix, Social Media, Big Data • We can use Internet technology (but not the internet itself) to send pictures and sound around a facility. Known as Internet Protocol “IP” technology. • Chop up a television picture and audio into thousands of little pieces (“packets”) and send over a wired network • Hundreds of television signals in a cable. Cheaper equipment from much bigger industry
  • 6. About Time (1) • Set the time of two clocks and check them after a day • For example a microwave and an oven • They won’t be the same • Clocks have their own time source inside that have small differences • Could be dependent on heat, location (e.g altitude), manufacturer of the clock • Nowadays, phone connects to the Internet to set its time
  • 7. About Time (2) • Television pictures and sound are generated from a clock on the camera or microphone. In Europe, 25 still pictures a second • Hard to cut between two camera angles if the clocks do not match 1 2
  • 8. About Time (3) • An old fashioned signal to keep them together, yet another cable • Note: on the web, Zoom, webcasts etc., don’t do this 1 2
  • 9. About Time (4) • During a leap year an extra day is added because the Earth doesn’t perfectly go round the Sun (365.2422 days) • Also small adjustments known as “leap seconds” at certain times when the clock strikes New Year’s • Need to make sure time doesn’t jump otherwise pictures will glitch when Big Ben strikes midnight • One of the reasons we can’t just use the time sync mechanism like a phone • Use GPS (satellite navigation) as a time-source, very high quality, has no leap seconds • Transport this as IP Packets over the Network (Precision Time Protocol – PTP) but much better quality than a normal Internet connected clock
  • 10. Packets and time (1) • Split the pictures and sound up into thousands of little packets • Imagine all television signals started at the same time, and each picture was a “tick” • Work how many pictures there should be by now and wait to start at the right time 1st January 1970 (PTP epoch) 42 years later… Now
  • 11. Packets and time (2) • Lots of pictures and sounds, split into packets and being sent over the network • Packets given an address (can send to more than one place) – millions per second • Not everyone needs to receive pictures if they are only using the sound • When I receive these packets, how do I know when they are from? • Need to know this so I can make sure they are in sync (when he kicks the ball you get a kicking sound at the right time) • Attach the time (“timestamp”) to each packet so we can put the puzzle back together
  • 12. Key points • We want to use modern IP technology to make live television • We have agreed on a common time across all the clocks in the broadcast • We split pictures and sound up into thousands of packets and make sure we send them at the right time, and add a timestamp to each packets • Anyone who wants to receive these packets uses the timestamps to put them all back together • The rest is just jargon, and implementation details
  • 13. Commercial Drivers • Innovation in Live Production is limited by historical technology like SDI • Inflexible, costly, space-consuming • Difficult to scale operations • In contrast to modern streaming services that operate entirely in the cloud and can scale very easily • Also challenging to use IT hardware in an SDI environment, conversion devices required
  • 14. “This is easy, we’ve done this before” • Many have just put SDI/IP converters at both ends of the product • This is like electric car manufacturers taking petrol cars and swapping the engine out • Doesn’t take advantage of the benefits of new technology (density etc) • Constrains product development (technical debt) • Challenging product redesigns are required - build the product around IP (analogous to the electric battery/engine)
  • 15. Using Standard IT Hardware • Large cost/operational efficiencies using IT Hardware • Cloud-like operations for live production • But what are the challenges? • Very High Data Rates (of UDP traffic) • Very tight timing requirements (hardware-centric) • Software-unfriendly data structures for pixel packing • Multidisciplinary engineering challenge • The technical paper goes into a lot more detail
  • 16. Very High Data Rates • UDP traffic requires costly system calls and memory copies by default in Operating System (OS) • Kernel Bypass techniques used to reduce overheads • Bypass the Operating System and read/write directly to Network Interface Card (NIC) • Many out there, DPDK, netmap, Registered IO • Send packets in batches (we use ~4000) • Approximately 10-20x speed improvement • Rendering video to/from NIC like a video player does to Graphics Card • Implement IP stack yourself, Ethernet, VLAN, IP, UDP • Lose features of the OS such as firewalls and routing
  • 17. Pixel Formats • 2110 pixel format (pgroup) is very software unfriendly • Computers work in bytes (8-bits) but no pixel lies on an byte boundary (alignment) • Many possible incoming formats, all need conversion to/from pgroup • Even in “fast” languages like C this is a slow operation • We use handwritten special instructions on CPU (SIMD) to accelerate • Easily 20x faster operations than C • School of thought saying C is fast enough is incredibly wrong • Kernel bypass + SIMD – 100-200x faster
  • 18. Timing: Frequency • Difficult to send thousands of packets on a server with microsecond accuracy. Software has ~100us timescale. • High Frequency Traders in finance do it, but carefully tuned hardware • Very tight busy loop required • Use NIC (Intel + Mellanox) rate limiters to control the output packet rate • Designed to hard-cap virtual machines rate • Numerous challenges associated with rate limiters • Need to send fractional bits per second for NTSC • Large inaccuracy in rate limiters. (i.e Ask for 1Gbps and get 1.001Gbps) • Adaptively measure and compensate otherwise buffers underflow • Also drift relative to PTP clock. Have to measure both! • Likely an internal oscillator on the NIC
  • 19. Timing: Phase • Agreed that a frame must be produced N frames after 1-Jan-1970 • Very difficult to start the video frame precisely at the correct time • Don’t know how long the gap is between sending the packet in software and it going on the wire • We took approach of starting, measuring how far and drifting forward • Very careful design needed not to swing too rapidly or too slowly • Three coupled variables, packet gaps, frequency and phase • Change one and all of them move. Drift compensation is hard
  • 20. Other Practicalities • 2110 requires a gap (no packets), where historical blanking data used to go • Hard to make a clean gap in software, can’t just stop then start • Skew of 2022-7 links is a big problem • Can’t send two packets on the link at exactly the same time • Have to send on both, measure and compensate • Handle switch port going down • Buffer doesn’t empty and contains stale data and needs to be resynced with the other link • Could have to send flows at different resolutions or framerates at the same time • Numerous drift compensation algorithms could collide
  • 21. Audio • Audio seemed like a simple problem • Low bitrate, 10Mbit/s doesn’t need kernel bypass • BUT, huge CPU load at 125us profile • Bitrate is low but Packet Rate is high! • Per packet system call overhead • After several months, conceded and used kernel bypass instead of busy loop and OS
  • 22. Interoperability • Huge problems with third-party interoperability • Some receivers require source port to match destination port (why?) • A lot of equipment ignoring RTP timestamps and using packet arrival times • Set them to zero when sending, equipment receives and processes without issue • Likewise, some equipment sends timestamps far in the past, some equipment doesn’t mind • Very problematic behaviour for software receivers. Software receivers generally trust timestamps as NIC or OS may not pass packet arrival times to software. In a switched network packet arrival times should not be used, timestamps should be used. • Simple things like IP header checksums not being verified • Audio had limitations, a lot of single flow devices and channel number limitations
  • 23. Software Comments • Challenging to maintain a modular codebase with Uncompressed IP • Technical debt accumulation • A number of large rewrites • Hard to use standard paradigms such as reference counting (especially with tiny 125us buffers) • Very tight integration with application • Can’t use garbage collection, takes too long
  • 24. Conclusions • A 2110 software sender is a massive technical challenge lasting several years • This is not just normal software. It’s not a road-car, it’s a very high performance Formula 1 car • Can’t compare with traditional media processing applications that process tens of megabits per second • Thousands of times more data per second • In the end this is too complex to become mainstream, live broadcast continues to be held back by such complexity. Not plug-and-play.
  • 25. The future • Pandemic has changed the spotlight to cloud production rather than on-premise • Shared environment, tight timing not possible/necessary • New protocol needed such as Amazon CDI • Software-friendly pixel format – Cloud Exchange Format: https://github.com/vsf-tv/cef • Work is ongoing!
  • 26. Thank You! • Thank you to my team who worked very hard on this! • Thanks also to Chris and Martin from Sky and Tim and Fabio from Amazon and IMG who supported us commercially and technically during this development • Watched this in action during quarantine!

Editor's Notes

  1. I especially enjoy the way many presenters handwave away literally several years of work.
  2. My phone can process many gigabits of data
  3. Every 5 years speeds double