SlideShare uma empresa Scribd logo
1 de 91
Baixar para ler offline
bigger, better, faster 
(and shorter) 
Rachel Evans 
BBC Media Services 
rachel.evans@bbc.co.uk 
@rvedotrc 
BBC iPlayer: bigger, better, faster 
A year ago, BBC iPlayer could have died - but it didn’t. Instead, we built a bigger, better, faster iPlayer that 
provides a foundation for the future. Find out how this was achieved, what part AWS plays in iPlayer’s success, and 
what’s next for BBC online media.”
On October 1st, 2013, 
iPlayer didn’t die 
“On October 1st 2013, iPlayer didn’t die. But it could have. 
The reason iPlayer is still alive is Video Factory, and Amazon Web Services play a big part in Video Factory’s 
success. 
My name’s Rachel Evans. I’m a Principal Software Engineer in BBC Media Services. We created Video 
Factory.”
“For the next 20 minutes or so, I’d like to tell you some of the Video Factory story. How it came to exist; 
what it is; how we made it; and a glimpse into Video Factory’s future. And of course, what part Amazon 
plays in the whole story.”
What is 
BBC Media Services? 
(full name: BBC Future Media Platform Media Services) 
Video Factory was created by BBC Media Services. 
Who are we? 
Here’s our mission statement:
“Publish all BBC AV media 
produced for IP platforms” 
“AV” means audio and video, includes radio and TV 
Includes iPlayer, iPlayer Radio, News, Sport 
Both live and on-demand
✓ 
✓ 
✓
⬅ ☹
The shiny new system 
2008 - Hosted in-house; used contracted 3rd party services for storage and transcode. 
Limited capacity. Bad architecture. Bad engineering. 
Ageing badly. Didn’t scale well. 
This system did not have a long-term future.
The legacy system 
2008 - Hosted in-house; used contracted 3rd party services for storage and transcode. 
Limited capacity. Bad architecture. Bad engineering. 
Ageing badly. Didn’t scale well. 
This system did not have a long-term future.
Why 1st October 2013? 
In May 2012, the BBC decided not to renew that 3rd party contract. It was to be allowed to lapse, at the end of 
September 2013. So this system, and therefore iPlayer, will die. 
“By the time the London 2012 Olympics was out of the way, we had just over 12 months to build a 
replacement.”
Why the cloud? 
Elasticity etc
June 2012: 
First steps into the cloud 
“At this point, there is no BBC Amazon account yet. There are no BBC FM projects in the cloud. We’re 
taking a step into the unknown.” 
We choose Amazon. 
June 2012: AWS accounts created.
Starting small, 
thinking big 
- First BBC FM project in the cloud: Sky (no Cosmos) 
- Second BBC FM project in the cloud: Video Factory (early Cosmos) 
- prove we can transcode video in the cloud 
Both of these things are key to what we’re going to need for Video Factory.
The origin of Video Factory 
“By this point you might be wondering: What does Video Factory actually do?”
Video Factory 
in a nutshell 
Two things drive Video Factory 
(source video + metadata => transcode)
source video 
+ 
programme data 
programme data: 
- what programme is this; 
- where and when is it broadcast; 
- which platforms do we publication rights for
source video 
+ 
programme data 
= 
transcode, distribute, 
and publish 
programme data: 
- what programme is this; 
- where and when is it broadcast; 
- which platforms do we publication rights for
Live Prerecorded 
Transcode 
Distribute 
Publish 
Once we’ve got the video, the rest of the chain is the same. 
“So let’s talk about live. Most iPlayer content is stuff that’s been on TV, so if we can capture and publish that, 
then iPlayer won’t die. So, we built what I like to think of as …”
The world’s largest 
public-service 
video recorder 
“… which we call ‘Mezz-to-VOD’, and here’s a quick overview of how it works.”
Mezz-to-VOD: 
“In a secure location somewhere is part of the BBC’s TV broadcast chain.” 
Playout; Thomson Video Networks; RTP video over multicast UDP; includes timecodes. 
Capture and chunk. Mustn’t miss a single packet. Upload chunks to S3. 
click - Playout; broadcast end SNS message; find relevant chunks and join 
click - Transcode with trim; distribute; publish. 
click - talk about inaccurate trims and “Resilient broadcast-grade system”.
Mezz-to-VOD: 
“In a secure location somewhere is part of the BBC’s TV broadcast chain.” 
Playout; Thomson Video Networks; RTP video over multicast UDP; includes timecodes. 
Capture and chunk. Mustn’t miss a single packet. Upload chunks to S3. 
click - Playout; broadcast end SNS message; find relevant chunks and join 
click - Transcode with trim; distribute; publish. 
click - talk about inaccurate trims and “Resilient broadcast-grade system”.
Mezz-to-VOD: 
“In a secure location somewhere is part of the BBC’s TV broadcast chain.” 
Playout; Thomson Video Networks; RTP video over multicast UDP; includes timecodes. 
Capture and chunk. Mustn’t miss a single packet. Upload chunks to S3. 
click - Playout; broadcast end SNS message; find relevant chunks and join 
click - Transcode with trim; distribute; publish. 
click - talk about inaccurate trims and “Resilient broadcast-grade system”.
Mezz-to-VOD: 
Broadcast-grade 
resilient system 
“In a secure location somewhere is part of the BBC’s TV broadcast chain.” 
Playout; Thomson Video Networks; RTP video over multicast UDP; includes timecodes. 
Capture and chunk. Mustn’t miss a single packet. Upload chunks to S3. 
click - Playout; broadcast end SNS message; find relevant chunks and join 
click - Transcode with trim; distribute; publish. 
click - talk about inaccurate trims and “Resilient broadcast-grade system”.
What bits of AWS do 
we use? 
For legal reasons, it’s all in the EU, hence eu-west-1. 
EC2 compute, VPC, ELB, Autoscaling 
S3, SQS, SNS, SimpleDB 
Cloudwatch, Cloudformation
What bits of AWS do 
we use? 
(nothing too exciting, actually) 
For legal reasons, it’s all in the EU, hence eu-west-1. 
EC2 compute, VPC, ELB, Autoscaling 
S3, SQS, SNS, SimpleDB 
Cloudwatch, Cloudformation
but here’s the fun 
part…
video 
is big
SD video 
mpeg-ts / avc 720 x 576 9.4Mbps 25fps / mpeg audio 256Kbps
SD video 
1.3MB/sec/channel 
mpeg-ts / avc 720 x 576 9.4Mbps 25fps / mpeg audio 256Kbps
SD video 
1.3MB/sec/channel 
= 109 GB/day/channel 
mpeg-ts / avc 720 x 576 9.4Mbps 25fps / mpeg audio 256Kbps
SD video 
1.3MB/sec/channel 
= 109 GB/day/channel 
x 21 channels 
mpeg-ts / avc 720 x 576 9.4Mbps 25fps / mpeg audio 256Kbps
SD video 
1.3MB/sec/channel 
= 109 GB/day/channel 
x 21 channels 
= 2.3 TB/day 
mpeg-ts / avc 720 x 576 9.4Mbps 25fps / mpeg audio 256Kbps
HD video 
mpeg-ts / avc 1920 x 1080 ~38Mbps 25fps / mpeg audio 256Kbps
HD video 
4.2MB/sec/channel 
mpeg-ts / avc 1920 x 1080 ~38Mbps 25fps / mpeg audio 256Kbps
HD video 
4.2MB/sec/channel 
= 365 GB/day/channel 
mpeg-ts / avc 1920 x 1080 ~38Mbps 25fps / mpeg audio 256Kbps
HD video 
4.2MB/sec/channel 
= 365 GB/day/channel 
x 8 channels 
mpeg-ts / avc 1920 x 1080 ~38Mbps 25fps / mpeg audio 256Kbps
HD video 
4.2MB/sec/channel 
= 365 GB/day/channel 
x 8 channels 
= 2.9 TB/day 
mpeg-ts / avc 1920 x 1080 ~38Mbps 25fps / mpeg audio 256Kbps
2.3 TB/day 
+ 2.9 TB/day
5.2 TB/day
5.2 TB/day/copy 
x 2 locations 
“each channel is captured in 2 physical locations” 
“at each location we capture 2 copies"
5.2 TB/day/copy 
x 2 locations 
x 2 copies 
“each channel is captured in 2 physical locations” 
“at each location we capture 2 copies"
21TB 
per day 
“… for a total of 21TB per day. 
(maybe mention “bigger” now? 40hrs=>250hrs, 4TB=>20TB) 
Handling this much data wouldn’t have been possible on our previous platform, but with Amazon Web 
Services, Video Factory is able to handle this much data, all day, every day.”
The origin of Video Factory 
The world’s biggest public service 
video recorder 
“I’d like to talk now about the practices and tooling we have in place that make this possible.”
Continuous Integration
Continuous Integration 
commit 
↓ 
build and unit tests 
↓ 
component tests 
↓ 
build into a Cosmos release 
↓ 
deploy to int via Cosmos
Small components 
Loosely coupled 
Lots of small deployments 
Microservices
Design for failure 
use Chaos Monkey 
lose your fear of failure
Continuous Delivery 
(describe CD first…) 
“Building Video Factory on Amazon, using Continuous Delivery was a success; and to a large extent this 
formed the basis of what then became the BBC Continuous Delivery pilot, that just recently ended.”
Deployment 
weekly averages 
(total for 10 weeks, divided by 10) 
int: 
test: 
live:
Deployment 
weekly averages 
(total for 10 weeks, divided by 10) 
int: 
120 
test: 
live:
Deployment 
weekly averages 
(total for 10 weeks, divided by 10) 
int: 
120 
test: 
25 
live:
Deployment 
weekly averages 
(total for 10 weeks, divided by 10) 
int: 
120 
test: 
25 
live: 
21
5 
4 
3 
2 
1 
0 
Live deployments 
by day of week 
(total for 10 weeks, divided by 10) 
Monday Tuesday Wednesday Thursday Friday Saturday Sunday 
3.5 deployment days per week vs 5 days per week 
No live deployments on Sunday :-) 
System as a whole is more reliable (“better”)
“So, with Mezz-to-VOD in place, iPlayer is saved. 
We record whatever was broadcast on TV, and we publish it. So now at the click of a button you can enjoy 
world-class content like this…”
We’re saved! 
“So, with Mezz-to-VOD in place, iPlayer is saved. 
We record whatever was broadcast on TV, and we publish it. So now at the click of a button you can enjoy 
world-class content like this…”
Examples of things that appear on TV, that we don’t want to publish on iPlayer.
Examples of things that appear on TV, that we don’t want to publish on iPlayer.
Channel logo 
Examples of things that appear on TV, that we don’t want to publish on iPlayer.
Channel logo 
Subtitles 
indicator 
Examples of things that appear on TV, that we don’t want to publish on iPlayer.
Channel logo 
Subtitles 
indicator 
Fade between channel 
ident and programme 
Examples of things that appear on TV, that we don’t want to publish on iPlayer.
Examples of things that appear on TV, that we don’t want to publish on iPlayer.
Channel logo 
Examples of things that appear on TV, that we don’t want to publish on iPlayer.
Channel logo 
Credit 
squeeze 
Examples of things that appear on TV, that we don’t want to publish on iPlayer.
Continuity 
voice-over 
Channel logo 
Credit 
squeeze 
Examples of things that appear on TV, that we don’t want to publish on iPlayer.
File-Based Delivery 
What is FBD - e.g. EastEnders 
Better than M2V: 
* cleaner signal 
* higher bit rate 
* available sooner 
Build up an archive
The Video Factory Archive 
size of archive 
(“hours” figure is an estimate)
The Video Factory Archive 
38453 files 
size of archive 
(“hours” figure is an estimate)
The Video Factory Archive 
38453 files 
20902 hours 
size of archive 
(“hours” figure is an estimate)
The Video Factory Archive 
38453 files 
20902 hours 
599 TB 
(Data accurate as of 2.30pm 11/11/2014) 
size of archive 
(“hours” figure is an estimate)
Simulcast 
(“Watch Live”) 
Bring the handling of live IP audio and video in-house 
Build on the success of Video Factory VOD 
Mostly not in the cloud, so only a very brief overview…
Simulcast 
Only the packager is in the cloud 
Explain what HLS (Apple) is 
Explain what HDS (Adobe) and Smooth (Microsoft) are 
Provides rewind window
Simulcast 
Only the packager is in the cloud 
Explain what HLS (Apple) is 
Explain what HDS (Adobe) and Smooth (Microsoft) are 
Provides rewind window
Simulcast 
Only the packager is in the cloud 
Explain what HLS (Apple) is 
Explain what HDS (Adobe) and Smooth (Microsoft) are 
Provides rewind window
Simulcast 
Only the packager is in the cloud 
Explain what HLS (Apple) is 
Explain what HDS (Adobe) and Smooth (Microsoft) are 
Provides rewind window
Simulcast 
Only the packager is in the cloud 
Explain what HLS (Apple) is 
Explain what HDS (Adobe) and Smooth (Microsoft) are 
Provides rewind window
Simulcast 
Only the packager is in the cloud 
Explain what HLS (Apple) is 
Explain what HDS (Adobe) and Smooth (Microsoft) are 
Provides rewind window
Converging 
Live 
and 
On-Demand
Here’s the latter half of the Simulcast chain.
And here’s the Mezz-to-VOD chain, fed from exactly the same video feed. 
But we’re transcoding again, and always late. 
We can do better…
L2V is triggered by the same event as Mezz-to-VOD. 
L2V is an order of magnitude faster. 
The 6.30pm news: ideal: 7pm; old system: maybe 11pm, midnight; 
with mezz-to-vod: ~ 8pm; with live-to-vod: ~ 7.05pm
However L2V only does some formats (albeit they’re important ones), and doesn’t trim accurately. 
So we deliberately allow L2V and M2V to run in parallel; L2V will win, M2V is better.
The origin of Video Factory 
The world’s biggest public service 
video recorder 
Live and Live-to-VOD 
“At BBC Media Services we have to handle audio - that is, radio - as well as video, so we’re creating Audio 
Factory.”
Audio Factory 
“How does Audio Factory work?” 
(click twice to reveal obvious description)
Audio Factory 
like Video Factory, 
“How does Audio Factory work?” 
(click twice to reveal obvious description)
Audio Factory 
like Video Factory, 
but without the pictures 
“How does Audio Factory work?” 
(click twice to reveal obvious description)
“Publish all BBC AV media 
produced for IP platforms” 
“So as well as video on demand; there’s the simulcast chain providing live video; and live-to-VOD bridging 
the two together, so that programmes are playable as soon 
as possible. Audio - including BBC Radio - can be handled almost identically to video,
“Publish all BBC AV media 
produced for IP platforms” 
… and so that the 
system works together. 
“so at last we can handle audio and video, live and ondemand, all in-house, using a consistent, proven set of 
technologies that work together.”
“It took us just over a year to build the basic video-on-demand features of Video Factory that we had to 
build, to prevent iPlayer from dying. It was a completely new solution: new architecture, new code, new 
platform. 
We chose the cloud because it was more flexible, more reliable, more scalable. We chose Amazon because it 
was a mature cloud platform that provided the right technical and support services that we needed.”
MMXIV 
“It took us just over a year to build the basic video-on-demand features of Video Factory that we had to 
build, to prevent iPlayer from dying. It was a completely new solution: new architecture, new code, new 
platform. 
We chose the cloud because it was more flexible, more reliable, more scalable. We chose Amazon because it 
was a mature cloud platform that provided the right technical and support services that we needed.”
MMXIV 
“We moved to Continuous Integration and Continuous Delivery with a Microservices architecture, so that the 
benefits of higher quality and faster turnaround could be enjoyed by everyone - by our engineers, by the 
product stakeholders, by the licence-fee-paying audience. 
Building Mezz-to-VOD to avoid killing iPlayer was just the beginning. I’m very excited about seeing the future 
of Video Factory unfold on Amazon, and I hope you enjoy using iPlayer even more now that you’ve heard the 
story behind it. 
Thank you.”

Mais conteúdo relacionado

Último

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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Último (20)

Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
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
 
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
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
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...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
"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 ...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
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
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

Destaque

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 

Destaque (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

BBC iPlayer: bigger, better, faster (and shorter)

  • 1. bigger, better, faster (and shorter) Rachel Evans BBC Media Services rachel.evans@bbc.co.uk @rvedotrc BBC iPlayer: bigger, better, faster A year ago, BBC iPlayer could have died - but it didn’t. Instead, we built a bigger, better, faster iPlayer that provides a foundation for the future. Find out how this was achieved, what part AWS plays in iPlayer’s success, and what’s next for BBC online media.”
  • 2. On October 1st, 2013, iPlayer didn’t die “On October 1st 2013, iPlayer didn’t die. But it could have. The reason iPlayer is still alive is Video Factory, and Amazon Web Services play a big part in Video Factory’s success. My name’s Rachel Evans. I’m a Principal Software Engineer in BBC Media Services. We created Video Factory.”
  • 3. “For the next 20 minutes or so, I’d like to tell you some of the Video Factory story. How it came to exist; what it is; how we made it; and a glimpse into Video Factory’s future. And of course, what part Amazon plays in the whole story.”
  • 4. What is BBC Media Services? (full name: BBC Future Media Platform Media Services) Video Factory was created by BBC Media Services. Who are we? Here’s our mission statement:
  • 5. “Publish all BBC AV media produced for IP platforms” “AV” means audio and video, includes radio and TV Includes iPlayer, iPlayer Radio, News, Sport Both live and on-demand
  • 6.
  • 9. The shiny new system 2008 - Hosted in-house; used contracted 3rd party services for storage and transcode. Limited capacity. Bad architecture. Bad engineering. Ageing badly. Didn’t scale well. This system did not have a long-term future.
  • 10. The legacy system 2008 - Hosted in-house; used contracted 3rd party services for storage and transcode. Limited capacity. Bad architecture. Bad engineering. Ageing badly. Didn’t scale well. This system did not have a long-term future.
  • 11. Why 1st October 2013? In May 2012, the BBC decided not to renew that 3rd party contract. It was to be allowed to lapse, at the end of September 2013. So this system, and therefore iPlayer, will die. “By the time the London 2012 Olympics was out of the way, we had just over 12 months to build a replacement.”
  • 12. Why the cloud? Elasticity etc
  • 13. June 2012: First steps into the cloud “At this point, there is no BBC Amazon account yet. There are no BBC FM projects in the cloud. We’re taking a step into the unknown.” We choose Amazon. June 2012: AWS accounts created.
  • 14. Starting small, thinking big - First BBC FM project in the cloud: Sky (no Cosmos) - Second BBC FM project in the cloud: Video Factory (early Cosmos) - prove we can transcode video in the cloud Both of these things are key to what we’re going to need for Video Factory.
  • 15. The origin of Video Factory “By this point you might be wondering: What does Video Factory actually do?”
  • 16. Video Factory in a nutshell Two things drive Video Factory (source video + metadata => transcode)
  • 17. source video + programme data programme data: - what programme is this; - where and when is it broadcast; - which platforms do we publication rights for
  • 18. source video + programme data = transcode, distribute, and publish programme data: - what programme is this; - where and when is it broadcast; - which platforms do we publication rights for
  • 19. Live Prerecorded Transcode Distribute Publish Once we’ve got the video, the rest of the chain is the same. “So let’s talk about live. Most iPlayer content is stuff that’s been on TV, so if we can capture and publish that, then iPlayer won’t die. So, we built what I like to think of as …”
  • 20. The world’s largest public-service video recorder “… which we call ‘Mezz-to-VOD’, and here’s a quick overview of how it works.”
  • 21. Mezz-to-VOD: “In a secure location somewhere is part of the BBC’s TV broadcast chain.” Playout; Thomson Video Networks; RTP video over multicast UDP; includes timecodes. Capture and chunk. Mustn’t miss a single packet. Upload chunks to S3. click - Playout; broadcast end SNS message; find relevant chunks and join click - Transcode with trim; distribute; publish. click - talk about inaccurate trims and “Resilient broadcast-grade system”.
  • 22. Mezz-to-VOD: “In a secure location somewhere is part of the BBC’s TV broadcast chain.” Playout; Thomson Video Networks; RTP video over multicast UDP; includes timecodes. Capture and chunk. Mustn’t miss a single packet. Upload chunks to S3. click - Playout; broadcast end SNS message; find relevant chunks and join click - Transcode with trim; distribute; publish. click - talk about inaccurate trims and “Resilient broadcast-grade system”.
  • 23. Mezz-to-VOD: “In a secure location somewhere is part of the BBC’s TV broadcast chain.” Playout; Thomson Video Networks; RTP video over multicast UDP; includes timecodes. Capture and chunk. Mustn’t miss a single packet. Upload chunks to S3. click - Playout; broadcast end SNS message; find relevant chunks and join click - Transcode with trim; distribute; publish. click - talk about inaccurate trims and “Resilient broadcast-grade system”.
  • 24. Mezz-to-VOD: Broadcast-grade resilient system “In a secure location somewhere is part of the BBC’s TV broadcast chain.” Playout; Thomson Video Networks; RTP video over multicast UDP; includes timecodes. Capture and chunk. Mustn’t miss a single packet. Upload chunks to S3. click - Playout; broadcast end SNS message; find relevant chunks and join click - Transcode with trim; distribute; publish. click - talk about inaccurate trims and “Resilient broadcast-grade system”.
  • 25. What bits of AWS do we use? For legal reasons, it’s all in the EU, hence eu-west-1. EC2 compute, VPC, ELB, Autoscaling S3, SQS, SNS, SimpleDB Cloudwatch, Cloudformation
  • 26. What bits of AWS do we use? (nothing too exciting, actually) For legal reasons, it’s all in the EU, hence eu-west-1. EC2 compute, VPC, ELB, Autoscaling S3, SQS, SNS, SimpleDB Cloudwatch, Cloudformation
  • 27. but here’s the fun part…
  • 29. SD video mpeg-ts / avc 720 x 576 9.4Mbps 25fps / mpeg audio 256Kbps
  • 30. SD video 1.3MB/sec/channel mpeg-ts / avc 720 x 576 9.4Mbps 25fps / mpeg audio 256Kbps
  • 31. SD video 1.3MB/sec/channel = 109 GB/day/channel mpeg-ts / avc 720 x 576 9.4Mbps 25fps / mpeg audio 256Kbps
  • 32. SD video 1.3MB/sec/channel = 109 GB/day/channel x 21 channels mpeg-ts / avc 720 x 576 9.4Mbps 25fps / mpeg audio 256Kbps
  • 33. SD video 1.3MB/sec/channel = 109 GB/day/channel x 21 channels = 2.3 TB/day mpeg-ts / avc 720 x 576 9.4Mbps 25fps / mpeg audio 256Kbps
  • 34. HD video mpeg-ts / avc 1920 x 1080 ~38Mbps 25fps / mpeg audio 256Kbps
  • 35. HD video 4.2MB/sec/channel mpeg-ts / avc 1920 x 1080 ~38Mbps 25fps / mpeg audio 256Kbps
  • 36. HD video 4.2MB/sec/channel = 365 GB/day/channel mpeg-ts / avc 1920 x 1080 ~38Mbps 25fps / mpeg audio 256Kbps
  • 37. HD video 4.2MB/sec/channel = 365 GB/day/channel x 8 channels mpeg-ts / avc 1920 x 1080 ~38Mbps 25fps / mpeg audio 256Kbps
  • 38. HD video 4.2MB/sec/channel = 365 GB/day/channel x 8 channels = 2.9 TB/day mpeg-ts / avc 1920 x 1080 ~38Mbps 25fps / mpeg audio 256Kbps
  • 39. 2.3 TB/day + 2.9 TB/day
  • 41. 5.2 TB/day/copy x 2 locations “each channel is captured in 2 physical locations” “at each location we capture 2 copies"
  • 42. 5.2 TB/day/copy x 2 locations x 2 copies “each channel is captured in 2 physical locations” “at each location we capture 2 copies"
  • 43. 21TB per day “… for a total of 21TB per day. (maybe mention “bigger” now? 40hrs=>250hrs, 4TB=>20TB) Handling this much data wouldn’t have been possible on our previous platform, but with Amazon Web Services, Video Factory is able to handle this much data, all day, every day.”
  • 44. The origin of Video Factory The world’s biggest public service video recorder “I’d like to talk now about the practices and tooling we have in place that make this possible.”
  • 46. Continuous Integration commit ↓ build and unit tests ↓ component tests ↓ build into a Cosmos release ↓ deploy to int via Cosmos
  • 47. Small components Loosely coupled Lots of small deployments Microservices
  • 48. Design for failure use Chaos Monkey lose your fear of failure
  • 49. Continuous Delivery (describe CD first…) “Building Video Factory on Amazon, using Continuous Delivery was a success; and to a large extent this formed the basis of what then became the BBC Continuous Delivery pilot, that just recently ended.”
  • 50. Deployment weekly averages (total for 10 weeks, divided by 10) int: test: live:
  • 51. Deployment weekly averages (total for 10 weeks, divided by 10) int: 120 test: live:
  • 52. Deployment weekly averages (total for 10 weeks, divided by 10) int: 120 test: 25 live:
  • 53. Deployment weekly averages (total for 10 weeks, divided by 10) int: 120 test: 25 live: 21
  • 54. 5 4 3 2 1 0 Live deployments by day of week (total for 10 weeks, divided by 10) Monday Tuesday Wednesday Thursday Friday Saturday Sunday 3.5 deployment days per week vs 5 days per week No live deployments on Sunday :-) System as a whole is more reliable (“better”)
  • 55. “So, with Mezz-to-VOD in place, iPlayer is saved. We record whatever was broadcast on TV, and we publish it. So now at the click of a button you can enjoy world-class content like this…”
  • 56. We’re saved! “So, with Mezz-to-VOD in place, iPlayer is saved. We record whatever was broadcast on TV, and we publish it. So now at the click of a button you can enjoy world-class content like this…”
  • 57. Examples of things that appear on TV, that we don’t want to publish on iPlayer.
  • 58. Examples of things that appear on TV, that we don’t want to publish on iPlayer.
  • 59. Channel logo Examples of things that appear on TV, that we don’t want to publish on iPlayer.
  • 60. Channel logo Subtitles indicator Examples of things that appear on TV, that we don’t want to publish on iPlayer.
  • 61. Channel logo Subtitles indicator Fade between channel ident and programme Examples of things that appear on TV, that we don’t want to publish on iPlayer.
  • 62. Examples of things that appear on TV, that we don’t want to publish on iPlayer.
  • 63. Channel logo Examples of things that appear on TV, that we don’t want to publish on iPlayer.
  • 64. Channel logo Credit squeeze Examples of things that appear on TV, that we don’t want to publish on iPlayer.
  • 65. Continuity voice-over Channel logo Credit squeeze Examples of things that appear on TV, that we don’t want to publish on iPlayer.
  • 66. File-Based Delivery What is FBD - e.g. EastEnders Better than M2V: * cleaner signal * higher bit rate * available sooner Build up an archive
  • 67. The Video Factory Archive size of archive (“hours” figure is an estimate)
  • 68. The Video Factory Archive 38453 files size of archive (“hours” figure is an estimate)
  • 69. The Video Factory Archive 38453 files 20902 hours size of archive (“hours” figure is an estimate)
  • 70. The Video Factory Archive 38453 files 20902 hours 599 TB (Data accurate as of 2.30pm 11/11/2014) size of archive (“hours” figure is an estimate)
  • 71. Simulcast (“Watch Live”) Bring the handling of live IP audio and video in-house Build on the success of Video Factory VOD Mostly not in the cloud, so only a very brief overview…
  • 72. Simulcast Only the packager is in the cloud Explain what HLS (Apple) is Explain what HDS (Adobe) and Smooth (Microsoft) are Provides rewind window
  • 73. Simulcast Only the packager is in the cloud Explain what HLS (Apple) is Explain what HDS (Adobe) and Smooth (Microsoft) are Provides rewind window
  • 74. Simulcast Only the packager is in the cloud Explain what HLS (Apple) is Explain what HDS (Adobe) and Smooth (Microsoft) are Provides rewind window
  • 75. Simulcast Only the packager is in the cloud Explain what HLS (Apple) is Explain what HDS (Adobe) and Smooth (Microsoft) are Provides rewind window
  • 76. Simulcast Only the packager is in the cloud Explain what HLS (Apple) is Explain what HDS (Adobe) and Smooth (Microsoft) are Provides rewind window
  • 77. Simulcast Only the packager is in the cloud Explain what HLS (Apple) is Explain what HDS (Adobe) and Smooth (Microsoft) are Provides rewind window
  • 78. Converging Live and On-Demand
  • 79. Here’s the latter half of the Simulcast chain.
  • 80. And here’s the Mezz-to-VOD chain, fed from exactly the same video feed. But we’re transcoding again, and always late. We can do better…
  • 81. L2V is triggered by the same event as Mezz-to-VOD. L2V is an order of magnitude faster. The 6.30pm news: ideal: 7pm; old system: maybe 11pm, midnight; with mezz-to-vod: ~ 8pm; with live-to-vod: ~ 7.05pm
  • 82. However L2V only does some formats (albeit they’re important ones), and doesn’t trim accurately. So we deliberately allow L2V and M2V to run in parallel; L2V will win, M2V is better.
  • 83. The origin of Video Factory The world’s biggest public service video recorder Live and Live-to-VOD “At BBC Media Services we have to handle audio - that is, radio - as well as video, so we’re creating Audio Factory.”
  • 84. Audio Factory “How does Audio Factory work?” (click twice to reveal obvious description)
  • 85. Audio Factory like Video Factory, “How does Audio Factory work?” (click twice to reveal obvious description)
  • 86. Audio Factory like Video Factory, but without the pictures “How does Audio Factory work?” (click twice to reveal obvious description)
  • 87. “Publish all BBC AV media produced for IP platforms” “So as well as video on demand; there’s the simulcast chain providing live video; and live-to-VOD bridging the two together, so that programmes are playable as soon as possible. Audio - including BBC Radio - can be handled almost identically to video,
  • 88. “Publish all BBC AV media produced for IP platforms” … and so that the system works together. “so at last we can handle audio and video, live and ondemand, all in-house, using a consistent, proven set of technologies that work together.”
  • 89. “It took us just over a year to build the basic video-on-demand features of Video Factory that we had to build, to prevent iPlayer from dying. It was a completely new solution: new architecture, new code, new platform. We chose the cloud because it was more flexible, more reliable, more scalable. We chose Amazon because it was a mature cloud platform that provided the right technical and support services that we needed.”
  • 90. MMXIV “It took us just over a year to build the basic video-on-demand features of Video Factory that we had to build, to prevent iPlayer from dying. It was a completely new solution: new architecture, new code, new platform. We chose the cloud because it was more flexible, more reliable, more scalable. We chose Amazon because it was a mature cloud platform that provided the right technical and support services that we needed.”
  • 91. MMXIV “We moved to Continuous Integration and Continuous Delivery with a Microservices architecture, so that the benefits of higher quality and faster turnaround could be enjoyed by everyone - by our engineers, by the product stakeholders, by the licence-fee-paying audience. Building Mezz-to-VOD to avoid killing iPlayer was just the beginning. I’m very excited about seeing the future of Video Factory unfold on Amazon, and I hope you enjoy using iPlayer even more now that you’ve heard the story behind it. Thank you.”