SlideShare une entreprise Scribd logo
1  sur  47
Télécharger pour lire hors ligne
KKBOX -
Drake ( )
Sr. Principal Engineer
Head of Video Content Platform
KKBOX
by Shuen-Huei Guan, KKBOX. 2015 1
Who am I?
• administrator, Ptt BBS
• technical director / R&D manager, Digimax Inc.
• team player, KKBOX Technologies Ltd.
• contributor, PyCon Taiwan
• phd candidate, GINM, CISE, NTU
by Shuen-Huei Guan, KKBOX. 2015 2
• VideoPass / (ongoing) AnimePass video services in Japan.
• Service up to ~1M users.
• KKBOX Video team: ~40 in one year.
• Cooperation with Japanese organizations.
• To keep growing and heading for the next!
by Shuen-Huei Guan, KKBOX. 2015 3
by Shuen-Huei Guan, KKBOX. 2015 4
What's a Streaming Service?
by Shuen-Huei Guan, KKBOX. 2015 5
What's a Streaming Service?
by Shuen-Huei Guan, KKBOX. 2015 6
Much complicated than just a data flow
• CMS for content management.
• Flexible system (we thought) for evolving business logics.
• System optimication for operation expense.
• Scalability! (we're in cloud era)
by Shuen-Huei Guan, KKBOX. 2015 7
We have done that in KKBOX,
and it works (really well)!
by Shuen-Huei Guan, KKBOX. 2015 8
by Shuen-Huei Guan, KKBOX. 2015 9
350 team players to serve
10M users across 6 countries
by Shuen-Huei Guan, KKBOX. 2015 10
20M songs
by Shuen-Huei Guan, KKBOX. 2015 11
O2O Events
by Shuen-Huei Guan, KKBOX. 2015 12
If we can make music
streaming work, how
about video streaming?
— KKBOX CxO
by Shuen-Huei Guan, KKBOX. 2015 13
A turning point: KDDI
by Shuen-Huei Guan, KKBOX. 2015 14
Inside News
• VideoPass/AnimePass switched to KKBOX.
• KDDI is a big stockholder in KKBOX.
• Japan-Taiwan is better than Japan-???.
by Shuen-Huei Guan, KKBOX. 2015 15
We thought it's a peace of cake!
by Shuen-Huei Guan, KKBOX. 2015 16
Let's work on a video-on-demand service
• Adaptive streaming.
• DRM protection.
• Video encoding on cloud.
• Totally cloud-based system.
by Shuen-Huei Guan, KKBOX. 2015 17
Adaptive streaming
refer: https://www.wikiwand.com/en/Adaptivebitratestreaming
by Shuen-Huei Guan, KKBOX. 2015 18
Adaptive streaming (cont'd)
refer: https://www.wikiwand.com/en/Adaptivebitratestreaming
by Shuen-Huei Guan, KKBOX. 2015 19
Adaptive streaming benefits
• An ongoing trend for video streaming.
• YouTube, Netflix, Amazon, HbbTV, ...
• Multiple standards.
• HLS, HDS, MSS, MPEG-DASH, ...
• Matured technology.
• HTTP, HTML5, H.264, AAC, ...
by Shuen-Huei Guan, KKBOX. 2015 20
Adaptive streaming benefits (cont'd)
• Friendly UX with mobile in-mind.
• 3G/4G/Wifi, Android/iOS
• Copyright done easily (and right?!).
• MS PlayReady, Google Widevine, Apple FairPlay, ...
• Scalability with good performance.
• CDN, HTTP/2 or QUIC, ...
by Shuen-Huei Guan, KKBOX. 2015 21
by Shuen-Huei Guan, KKBOX. 2015 22
Adaptive streaming is seizable,
but DRM would give you lots of
nightmares.
by Shuen-Huei Guan, KKBOX. 2015 23
ref: https://www.wikiwand.com/en/Digitalrightsmanagement
by Shuen-Huei Guan, KKBOX. 2015 24
(Fortunately,) we have Common
Encryption (CENC).
by Shuen-Huei Guan, KKBOX. 2015 25
DRM
• Microsoft PlayReady nearly dominates DRM market right
now.
• Google Widevive has huge potential because of Android/
Chrome.
• Apple FairPlay stands for her own.
by Shuen-Huei Guan, KKBOX. 2015 26
by Shuen-Huei Guan, KKBOX. 2015 27
Video Encoding Flow
by Shuen-Huei Guan, KKBOX. 2015 28
by Shuen-Huei Guan, KKBOX. 2015 29
Video Encoding Flow
• Source video -> playable adaptive packages.
• Leverage all mighty open-source projects.
• All processed on cloud with capability of dynamic flow!
by Shuen-Huei Guan, KKBOX. 2015 30
by Shuen-Huei Guan, KKBOX. 2015 31
Job script for a workflow
Job {KKBOX Convert Video} -subtasks {
Task {Source Inspection} -cmds {
Cmd {
emilia verify -i s3://bucket/source.mp4
}
}
Task {Transcode} --parallel -subtasks {
Iterate i -from 0 -to 4 -by 1 -template {
Task {Transcode Audio} -cmds {
Cmd {
ffmpeg -i s3://bucket/source.mp4 -o /tmp/converted_$i.mp4
}
}
}
Iterate i -from 0 -to 8 -by 1 -template {
Task {Transcode Video} -cmds {
Cmd {
ffmpeg -i s3://bucket/source.mp4 -o /tmp/converted_$i.mp4
}
}
}
}
Task {Adaptive} -subtasks {
Task {DASH} -subtasks {
}
Task {HLS} -subtasks {
}
Task {MSS} -subtasks {
}
}
} -sequential 1
by Shuen-Huei Guan, KKBOX. 2015 32
Orchestrating the execution of
workflows for media streaming
service and even more
PyCon APAC 2015
by Shuen-Huei Guan, KKBOX. 2015 33
System Architecture
by Shuen-Huei Guan, KKBOX. 2015 34
by Shuen-Huei Guan, KKBOX. 2015 35
AWS services
• EC2 / ELB / S3
• RDS / ElastiCache
• SWF (Simple Workflow)
• SQS / SNS / SES
• Lambda
• CloudWatch
by Shuen-Huei Guan, KKBOX. 2015 36
System architecture
• Backend / CMS
• Laravel (PHP)
• MySQL / Elasticsearch
• Video Encoding System
• Python
by Shuen-Huei Guan, KKBOX. 2015 37
AWS expense and status:
Confidential but
available on stage.
by Shuen-Huei Guan, KKBOX. 2015 38
Third-party services
• Pingdom
• Leanplum
• Slack
• JIRA
by Shuen-Huei Guan, KKBOX. 2015 39
by Shuen-Huei Guan, KKBOX. 2015 40
We love Slack.
• Server status / alarm.
• Video encoding status.
• JIRA ticket updates.
• Video quality checking status.
• ...
by Shuen-Huei Guan, KKBOX. 2015 41
But we were wrong.
Way more challenges
are waiting for us.
by Shuen-Huei Guan, KKBOX. 2015 42
Technical challenges
• Video file size is much larger than music files.
• 2hr HD movie = 150 x “5min 192kbps music”
• Video file encoding takes much longer.
• 100x time consumption than music.
• Lots of files.
• 2hr HD movie ~= 20,000~30,000 files.
by Shuen-Huei Guan, KKBOX. 2015 43
Technical challenges (cont'd)
• H.264 is not that easy.
• Each H.264-claimed devices support differently.
• Adaptive players needs effrots.
• Smart adaptation, initial lag vs smooth playback, A/V
sync, ...
• Video streaming protocols are much complicated.
• HLS, MSS, DASH with DRM(s)!
by Shuen-Huei Guan, KKBOX. 2015 44
Business challenges
• Asian services tend to be complex than elegant, especially
Japanese ones.
• Business logics changed weekly, but it's an OEM, right?
• OEM is not what KKBOX's good at.
• Programming is an art, so is communication!
by Shuen-Huei Guan, KKBOX. 2015 45
Integration challenges
• Communication in English is ok, but Japanes is better.
• Hard problems doesn't kill developers, but communication
does.
• More than 5 vendors to cooperate with.
• Docs of vendors' API? Nearly none.
by Shuen-Huei Guan, KKBOX. 2015 46
Thank you.
http://about.me/drakeguan
by Shuen-Huei Guan, KKBOX. 2015 47

Contenu connexe

Tendances

CDN_Netflix_analysis
CDN_Netflix_analysisCDN_Netflix_analysis
CDN_Netflix_analysis
Sanket Jain
 
Asynchronous Services – A promising future for OSGi - T Ward
Asynchronous Services – A promising future for OSGi - T WardAsynchronous Services – A promising future for OSGi - T Ward
Asynchronous Services – A promising future for OSGi - T Ward
mfrancis
 
L’odyssée d’une requête HTTP chez Scaleway
L’odyssée d’une requête HTTP chez ScalewayL’odyssée d’une requête HTTP chez Scaleway
L’odyssée d’une requête HTTP chez Scaleway
Scaleway
 
Refactoring Organizations - A Netflix Study (QCon NYC 2017)
Refactoring Organizations - A Netflix Study (QCon NYC 2017)Refactoring Organizations - A Netflix Study (QCon NYC 2017)
Refactoring Organizations - A Netflix Study (QCon NYC 2017)
Josh Evans
 

Tendances (20)

ONAP SDC - Model driven design
ONAP SDC - Model driven designONAP SDC - Model driven design
ONAP SDC - Model driven design
 
WebSockets and Equinox OSGi in a Servlet Container
WebSockets and Equinox OSGi in a Servlet ContainerWebSockets and Equinox OSGi in a Servlet Container
WebSockets and Equinox OSGi in a Servlet Container
 
CDN_Netflix_analysis
CDN_Netflix_analysisCDN_Netflix_analysis
CDN_Netflix_analysis
 
CloudStack IPv6 in production
CloudStack IPv6 in productionCloudStack IPv6 in production
CloudStack IPv6 in production
 
DevOps and Continuous Delivery with CloudFoundry
DevOps and Continuous Delivery with CloudFoundryDevOps and Continuous Delivery with CloudFoundry
DevOps and Continuous Delivery with CloudFoundry
 
Continuous delivery and DevOps with CloudFoundry
Continuous delivery and DevOps with CloudFoundryContinuous delivery and DevOps with CloudFoundry
Continuous delivery and DevOps with CloudFoundry
 
OSGi toolchain from the ground up - Matteo Rulli
OSGi toolchain from the ground up - Matteo RulliOSGi toolchain from the ground up - Matteo Rulli
OSGi toolchain from the ground up - Matteo Rulli
 
ION Krakow - A Global IPv6 Deployment Update
ION Krakow - A Global IPv6 Deployment UpdateION Krakow - A Global IPv6 Deployment Update
ION Krakow - A Global IPv6 Deployment Update
 
Asynchronous Services – A promising future for OSGi - T Ward
Asynchronous Services – A promising future for OSGi - T WardAsynchronous Services – A promising future for OSGi - T Ward
Asynchronous Services – A promising future for OSGi - T Ward
 
IaC on AWS Cloud
IaC on AWS CloudIaC on AWS Cloud
IaC on AWS Cloud
 
Spring Boot & Spring Cloud on k8s and PCF
Spring Boot & Spring Cloud on k8s and PCFSpring Boot & Spring Cloud on k8s and PCF
Spring Boot & Spring Cloud on k8s and PCF
 
Deliver docker containers continuously on aws
Deliver docker containers continuously on awsDeliver docker containers continuously on aws
Deliver docker containers continuously on aws
 
L’odyssée d’une requête HTTP chez Scaleway
L’odyssée d’une requête HTTP chez ScalewayL’odyssée d’une requête HTTP chez Scaleway
L’odyssée d’une requête HTTP chez Scaleway
 
A Ct Os Story
A Ct Os StoryA Ct Os Story
A Ct Os Story
 
Docker and DevOps Trends in Hosting Industry
Docker and DevOps Trends in Hosting IndustryDocker and DevOps Trends in Hosting Industry
Docker and DevOps Trends in Hosting Industry
 
DevOps at Tradeshift - AWS community day nordics
DevOps at Tradeshift - AWS community day nordicsDevOps at Tradeshift - AWS community day nordics
DevOps at Tradeshift - AWS community day nordics
 
Refactoring Organizations - A Netflix Study (QCon NYC 2017)
Refactoring Organizations - A Netflix Study (QCon NYC 2017)Refactoring Organizations - A Netflix Study (QCon NYC 2017)
Refactoring Organizations - A Netflix Study (QCon NYC 2017)
 
OpsStack--Integrated Operation Platform
OpsStack--Integrated Operation PlatformOpsStack--Integrated Operation Platform
OpsStack--Integrated Operation Platform
 
Content distribution
Content distributionContent distribution
Content distribution
 
Building Cloud-Native Applications with OpenStack
Building Cloud-Native Applications with OpenStack Building Cloud-Native Applications with OpenStack
Building Cloud-Native Applications with OpenStack
 

En vedette

En vedette (15)

AWS reInvent 2016 recap Taiwan
AWS reInvent 2016 recap TaiwanAWS reInvent 2016 recap Taiwan
AWS reInvent 2016 recap Taiwan
 
KKBOX 建置日本百萬用戶等級 Video Streaming 服務的經驗分享
KKBOX 建置日本百萬用戶等級 Video Streaming 服務的經驗分享KKBOX 建置日本百萬用戶等級 Video Streaming 服務的經驗分享
KKBOX 建置日本百萬用戶等級 Video Streaming 服務的經驗分享
 
Python Experience in KKBOX Group
Python Experience in KKBOX GroupPython Experience in KKBOX Group
Python Experience in KKBOX Group
 
Orchestrating the execution of workflows for media streaming service and even...
Orchestrating the execution of workflows for media streaming service and even...Orchestrating the execution of workflows for media streaming service and even...
Orchestrating the execution of workflows for media streaming service and even...
 
AWS re:Invent 2016 Fast Forward
AWS re:Invent 2016 Fast ForwardAWS re:Invent 2016 Fast Forward
AWS re:Invent 2016 Fast Forward
 
Seamless service migration with AWS Enterprise Support
Seamless service migration with AWS Enterprise SupportSeamless service migration with AWS Enterprise Support
Seamless service migration with AWS Enterprise Support
 
Building a developer community with containers
Building a developer community with containersBuilding a developer community with containers
Building a developer community with containers
 
PyConTW 2013 經驗分享
PyConTW 2013 經驗分享PyConTW 2013 經驗分享
PyConTW 2013 經驗分享
 
Why Python In Entertainment Industry?
Why Python In Entertainment Industry?Why Python In Entertainment Industry?
Why Python In Entertainment Industry?
 
How does Netflix Get Built and Triumphed?
How does Netflix Get Built and Triumphed?How does Netflix Get Built and Triumphed?
How does Netflix Get Built and Triumphed?
 
Spatial Disorientation
Spatial DisorientationSpatial Disorientation
Spatial Disorientation
 
Python Programming in Entertainment Industry: Coding Style
Python Programming in Entertainment Industry: Coding StylePython Programming in Entertainment Industry: Coding Style
Python Programming in Entertainment Industry: Coding Style
 
平行化你的工作 part1
平行化你的工作 part1平行化你的工作 part1
平行化你的工作 part1
 
Python + NoSQL in Animations
Python + NoSQL in AnimationsPython + NoSQL in Animations
Python + NoSQL in Animations
 
Reyes and Shader Pipeline
Reyes and Shader PipelineReyes and Shader Pipeline
Reyes and Shader Pipeline
 

Similaire à 從音樂走向影音服務 - KKBOX 的影音之路奮鬥史 - 序章

cas_Knowledge_Network
cas_Knowledge_Networkcas_Knowledge_Network
cas_Knowledge_Network
Oliver Eichel
 
Polycom ® Video Communications H.264 and Pro-Motion ™ : The ...
Polycom ® Video Communications H.264 and Pro-Motion ™ : The ...Polycom ® Video Communications H.264 and Pro-Motion ™ : The ...
Polycom ® Video Communications H.264 and Pro-Motion ™ : The ...
Videoguy
 

Similaire à 從音樂走向影音服務 - KKBOX 的影音之路奮鬥史 - 序章 (20)

NAB Show 2018 Notes
NAB Show 2018 NotesNAB Show 2018 Notes
NAB Show 2018 Notes
 
Encoding at Scale for Live Video Streaming
Encoding at Scale for Live Video StreamingEncoding at Scale for Live Video Streaming
Encoding at Scale for Live Video Streaming
 
Serverless Media Workflow
Serverless Media WorkflowServerless Media Workflow
Serverless Media Workflow
 
[AWS Media Symposium 2019] AWS Media Services Innovation - Christer Whitehorn...
[AWS Media Symposium 2019] AWS Media Services Innovation - Christer Whitehorn...[AWS Media Symposium 2019] AWS Media Services Innovation - Christer Whitehorn...
[AWS Media Symposium 2019] AWS Media Services Innovation - Christer Whitehorn...
 
AWS powered online classes platform
AWS powered online classes platformAWS powered online classes platform
AWS powered online classes platform
 
Adding Video to Your Documentation
Adding Video to Your DocumentationAdding Video to Your Documentation
Adding Video to Your Documentation
 
Bitmovin LIVE Tech Talks: Data Driven Video Workflows
Bitmovin LIVE Tech Talks: Data Driven Video WorkflowsBitmovin LIVE Tech Talks: Data Driven Video Workflows
Bitmovin LIVE Tech Talks: Data Driven Video Workflows
 
NHK Challenges for Preserving UHD Materials (HIRAKAZU)
NHK Challenges for Preserving UHD Materials (HIRAKAZU)NHK Challenges for Preserving UHD Materials (HIRAKAZU)
NHK Challenges for Preserving UHD Materials (HIRAKAZU)
 
cas_Knowledge_Network
cas_Knowledge_Networkcas_Knowledge_Network
cas_Knowledge_Network
 
ARAI How to Preserve and Provide 4K Contents Online
ARAI How to Preserve and Provide 4K Contents OnlineARAI How to Preserve and Provide 4K Contents Online
ARAI How to Preserve and Provide 4K Contents Online
 
Polycom ® Video Communications H.264 and Pro-Motion ™ : The ...
Polycom ® Video Communications H.264 and Pro-Motion ™ : The ...Polycom ® Video Communications H.264 and Pro-Motion ™ : The ...
Polycom ® Video Communications H.264 and Pro-Motion ™ : The ...
 
Encoding Video for the Web - Webinar from ReelSEO.com
Encoding Video for the Web  - Webinar from ReelSEO.comEncoding Video for the Web  - Webinar from ReelSEO.com
Encoding Video for the Web - Webinar from ReelSEO.com
 
An Overview of High Efficiency Video Codec HEVC (H.265)
An Overview of High Efficiency Video Codec HEVC (H.265)An Overview of High Efficiency Video Codec HEVC (H.265)
An Overview of High Efficiency Video Codec HEVC (H.265)
 
What's New In Cameras/Video?
What's New In Cameras/Video?What's New In Cameras/Video?
What's New In Cameras/Video?
 
Sps Ottawa 2015: Give your company its own streaming video service with #o365...
Sps Ottawa 2015: Give your company its own streaming video service with #o365...Sps Ottawa 2015: Give your company its own streaming video service with #o365...
Sps Ottawa 2015: Give your company its own streaming video service with #o365...
 
IP BASED MEDIA SERVICES
IP BASED  MEDIA SERVICESIP BASED  MEDIA SERVICES
IP BASED MEDIA SERVICES
 
OpenCms Days 2014 - OpenCms 9 - A video tube?
OpenCms Days 2014 - OpenCms 9 - A video tube?OpenCms Days 2014 - OpenCms 9 - A video tube?
OpenCms Days 2014 - OpenCms 9 - A video tube?
 
ACCELERATING OTT DELIVERY AND MODERNIZING MEDIA LOGISTICS WITH CLOUD BASED VI...
ACCELERATING OTT DELIVERY AND MODERNIZING MEDIA LOGISTICS WITH CLOUD BASED VI...ACCELERATING OTT DELIVERY AND MODERNIZING MEDIA LOGISTICS WITH CLOUD BASED VI...
ACCELERATING OTT DELIVERY AND MODERNIZING MEDIA LOGISTICS WITH CLOUD BASED VI...
 
Apan media encoding
Apan media encodingApan media encoding
Apan media encoding
 
Performance Measurements of 360◦ Video Streaming to Head-Mounted Displays Ove...
Performance Measurements of 360◦ Video Streaming to Head-Mounted Displays Ove...Performance Measurements of 360◦ Video Streaming to Head-Mounted Displays Ove...
Performance Measurements of 360◦ Video Streaming to Head-Mounted Displays Ove...
 

Dernier

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
 

Dernier (20)

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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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...
 
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
 
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...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
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
 
"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 ...
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

從音樂走向影音服務 - KKBOX 的影音之路奮鬥史 - 序章

  • 1. KKBOX - Drake ( ) Sr. Principal Engineer Head of Video Content Platform KKBOX by Shuen-Huei Guan, KKBOX. 2015 1
  • 2. Who am I? • administrator, Ptt BBS • technical director / R&D manager, Digimax Inc. • team player, KKBOX Technologies Ltd. • contributor, PyCon Taiwan • phd candidate, GINM, CISE, NTU by Shuen-Huei Guan, KKBOX. 2015 2
  • 3. • VideoPass / (ongoing) AnimePass video services in Japan. • Service up to ~1M users. • KKBOX Video team: ~40 in one year. • Cooperation with Japanese organizations. • To keep growing and heading for the next! by Shuen-Huei Guan, KKBOX. 2015 3
  • 4. by Shuen-Huei Guan, KKBOX. 2015 4
  • 5. What's a Streaming Service? by Shuen-Huei Guan, KKBOX. 2015 5
  • 6. What's a Streaming Service? by Shuen-Huei Guan, KKBOX. 2015 6
  • 7. Much complicated than just a data flow • CMS for content management. • Flexible system (we thought) for evolving business logics. • System optimication for operation expense. • Scalability! (we're in cloud era) by Shuen-Huei Guan, KKBOX. 2015 7
  • 8. We have done that in KKBOX, and it works (really well)! by Shuen-Huei Guan, KKBOX. 2015 8
  • 9. by Shuen-Huei Guan, KKBOX. 2015 9
  • 10. 350 team players to serve 10M users across 6 countries by Shuen-Huei Guan, KKBOX. 2015 10
  • 11. 20M songs by Shuen-Huei Guan, KKBOX. 2015 11
  • 12. O2O Events by Shuen-Huei Guan, KKBOX. 2015 12
  • 13. If we can make music streaming work, how about video streaming? — KKBOX CxO by Shuen-Huei Guan, KKBOX. 2015 13
  • 14. A turning point: KDDI by Shuen-Huei Guan, KKBOX. 2015 14
  • 15. Inside News • VideoPass/AnimePass switched to KKBOX. • KDDI is a big stockholder in KKBOX. • Japan-Taiwan is better than Japan-???. by Shuen-Huei Guan, KKBOX. 2015 15
  • 16. We thought it's a peace of cake! by Shuen-Huei Guan, KKBOX. 2015 16
  • 17. Let's work on a video-on-demand service • Adaptive streaming. • DRM protection. • Video encoding on cloud. • Totally cloud-based system. by Shuen-Huei Guan, KKBOX. 2015 17
  • 19. Adaptive streaming (cont'd) refer: https://www.wikiwand.com/en/Adaptivebitratestreaming by Shuen-Huei Guan, KKBOX. 2015 19
  • 20. Adaptive streaming benefits • An ongoing trend for video streaming. • YouTube, Netflix, Amazon, HbbTV, ... • Multiple standards. • HLS, HDS, MSS, MPEG-DASH, ... • Matured technology. • HTTP, HTML5, H.264, AAC, ... by Shuen-Huei Guan, KKBOX. 2015 20
  • 21. Adaptive streaming benefits (cont'd) • Friendly UX with mobile in-mind. • 3G/4G/Wifi, Android/iOS • Copyright done easily (and right?!). • MS PlayReady, Google Widevine, Apple FairPlay, ... • Scalability with good performance. • CDN, HTTP/2 or QUIC, ... by Shuen-Huei Guan, KKBOX. 2015 21
  • 22. by Shuen-Huei Guan, KKBOX. 2015 22
  • 23. Adaptive streaming is seizable, but DRM would give you lots of nightmares. by Shuen-Huei Guan, KKBOX. 2015 23
  • 25. (Fortunately,) we have Common Encryption (CENC). by Shuen-Huei Guan, KKBOX. 2015 25
  • 26. DRM • Microsoft PlayReady nearly dominates DRM market right now. • Google Widevive has huge potential because of Android/ Chrome. • Apple FairPlay stands for her own. by Shuen-Huei Guan, KKBOX. 2015 26
  • 27. by Shuen-Huei Guan, KKBOX. 2015 27
  • 28. Video Encoding Flow by Shuen-Huei Guan, KKBOX. 2015 28
  • 29. by Shuen-Huei Guan, KKBOX. 2015 29
  • 30. Video Encoding Flow • Source video -> playable adaptive packages. • Leverage all mighty open-source projects. • All processed on cloud with capability of dynamic flow! by Shuen-Huei Guan, KKBOX. 2015 30
  • 31. by Shuen-Huei Guan, KKBOX. 2015 31
  • 32. Job script for a workflow Job {KKBOX Convert Video} -subtasks { Task {Source Inspection} -cmds { Cmd { emilia verify -i s3://bucket/source.mp4 } } Task {Transcode} --parallel -subtasks { Iterate i -from 0 -to 4 -by 1 -template { Task {Transcode Audio} -cmds { Cmd { ffmpeg -i s3://bucket/source.mp4 -o /tmp/converted_$i.mp4 } } } Iterate i -from 0 -to 8 -by 1 -template { Task {Transcode Video} -cmds { Cmd { ffmpeg -i s3://bucket/source.mp4 -o /tmp/converted_$i.mp4 } } } } Task {Adaptive} -subtasks { Task {DASH} -subtasks { } Task {HLS} -subtasks { } Task {MSS} -subtasks { } } } -sequential 1 by Shuen-Huei Guan, KKBOX. 2015 32
  • 33. Orchestrating the execution of workflows for media streaming service and even more PyCon APAC 2015 by Shuen-Huei Guan, KKBOX. 2015 33
  • 34. System Architecture by Shuen-Huei Guan, KKBOX. 2015 34
  • 35. by Shuen-Huei Guan, KKBOX. 2015 35
  • 36. AWS services • EC2 / ELB / S3 • RDS / ElastiCache • SWF (Simple Workflow) • SQS / SNS / SES • Lambda • CloudWatch by Shuen-Huei Guan, KKBOX. 2015 36
  • 37. System architecture • Backend / CMS • Laravel (PHP) • MySQL / Elasticsearch • Video Encoding System • Python by Shuen-Huei Guan, KKBOX. 2015 37
  • 38. AWS expense and status: Confidential but available on stage. by Shuen-Huei Guan, KKBOX. 2015 38
  • 39. Third-party services • Pingdom • Leanplum • Slack • JIRA by Shuen-Huei Guan, KKBOX. 2015 39
  • 40. by Shuen-Huei Guan, KKBOX. 2015 40
  • 41. We love Slack. • Server status / alarm. • Video encoding status. • JIRA ticket updates. • Video quality checking status. • ... by Shuen-Huei Guan, KKBOX. 2015 41
  • 42. But we were wrong. Way more challenges are waiting for us. by Shuen-Huei Guan, KKBOX. 2015 42
  • 43. Technical challenges • Video file size is much larger than music files. • 2hr HD movie = 150 x “5min 192kbps music” • Video file encoding takes much longer. • 100x time consumption than music. • Lots of files. • 2hr HD movie ~= 20,000~30,000 files. by Shuen-Huei Guan, KKBOX. 2015 43
  • 44. Technical challenges (cont'd) • H.264 is not that easy. • Each H.264-claimed devices support differently. • Adaptive players needs effrots. • Smart adaptation, initial lag vs smooth playback, A/V sync, ... • Video streaming protocols are much complicated. • HLS, MSS, DASH with DRM(s)! by Shuen-Huei Guan, KKBOX. 2015 44
  • 45. Business challenges • Asian services tend to be complex than elegant, especially Japanese ones. • Business logics changed weekly, but it's an OEM, right? • OEM is not what KKBOX's good at. • Programming is an art, so is communication! by Shuen-Huei Guan, KKBOX. 2015 45
  • 46. Integration challenges • Communication in English is ok, but Japanes is better. • Hard problems doesn't kill developers, but communication does. • More than 5 vendors to cooperate with. • Docs of vendors' API? Nearly none. by Shuen-Huei Guan, KKBOX. 2015 46