SlideShare a Scribd company logo
Building a Robust Video Player
With Open Source Tech @ Hotstar
Basics First
● Media Container Formats
● Encoding Formats
● Some common Terms ---
○ Video Resolution
○ Aspect Ratio
○ Frame Rate
○ Bitrate
Bit more on Bitrate
● The data rate for a video file is the bitrate.
● So a data rate specification for video content that runs at 1 megabyte per
second would be given as a bitrate of 8 megabits per second (8 mbps).
● Internet videos, phone videos, and HD blu-ray videos for tV all vary in bitrate.
Why You told me Basics
● 360x240 resolution =====> 86400 pixels per frame.
● The frame rate is 30 Hz =====> 86400 × 30 = 2592000 pixels per second.
So let's say 1 pixel is 3 Bytes (24 Bits) of data: we have 2592000 × 24 bits per second
video (62208000 Bits), that is 62208 kBits (This is a rough estimate, and there is
something more).
Same same resolution different different
Bitrate
● Video quality has a lot to do with how the video was compressed.
● The more you compress it, the less bits it takes per frame.
● More you compress, the worse the quality is.
● Now, some videos are much easier to compress than others
● Spatial Redundancy and Temporal Redundancy
Adaptive Bitrate Streaming(a.k.a Auto Mode)
Aim: Optimize the streaming experience under a diverse set of network conditions
and across various devices
Approach:
● Produce multiple files from the same source file
● The file is consumed/delivered adaptively
● This occurs transparently to the user, so that the viewer clicks one button.
ABR Technologies
Relevant to us for now: HLS, DASH
HLS --- HTTP Live Streaming (HLS)
DASH --- Dynamic Adaptive Streaming over HTTP
HLS(HTTP Live Streaming)
DASH(Dynamic Adaptive Streaming For HTTP)
HLS vs DASH
● Proprietary
● Codec Agnostic
● No DRM method specified
● HEVC
Content Protection- Digital Rights
Management
DRM technologies use encryption to protect the content prior to or during streaming,
downloading or other transfer.
DRM encoding at source
DRM decryption at Player
Basic Player Architecture
Hls.js architecture
● Main functionalities are split into several subsystems
● All subsystems are instantiated by the Hls instance.
● Each subsystem heavily relies on events for internal/external communications.
● Events are handled using EventEmitter
DASH.js Architecture
Performance Measuring
● Key Metrics @ Hotstar to track Playback Performance
● Analytics Measurement Platform
● Analysing the weekly and monthly reports
● Identifying the key areas of improvements
Performance Improvements
Will list these during the talk
Ensuring Player Robustness
● Using fallback streams during live playback
● Handling tsunami wave of customers with a panic scenario
● Identify and build around some minor bugs in the OSS libraries
Key Takeaways and Learnings
● Video Streaming formats and technologies
● There are hundreds of thousands line of JS, that make use of Web API's to facilitate playback in
one single format
● But one does not have to reinvent the wheel. Hail OSS
● Customise the library to suit one's needs. You will be surprised of how much you can learn by
looking at the code
● Building for performance and robustness requires an approach of measuring and tuning the player

More Related Content

PPTX
(SH)sodium homeostasisSH jo.pptx
PPTX
Лекція №8.pptx
PDF
лаборатор. 8
PDF
كيف تكتب خطة تشغيلية لمنظمة - د. طارق السويدان
PPTX
Лекція Захворювання сечової системи.pptx
PPT
лейкоцитоз, лейкопенія, лейкоз
PPT
Лекція "Анемії" (№2)
PPT
хронічний панкреатит
(SH)sodium homeostasisSH jo.pptx
Лекція №8.pptx
лаборатор. 8
كيف تكتب خطة تشغيلية لمنظمة - د. طارق السويدان
Лекція Захворювання сечової системи.pptx
лейкоцитоз, лейкопенія, лейкоз
Лекція "Анемії" (№2)
хронічний панкреатит

What's hot (8)

DOCX
Увеит.docx
PDF
Tema 2 Enterprise main functions 2019
PDF
лекція 18
PPTX
Organophosphate poisoning
PPTX
презентація до теми 10
PDF
Лекція 11. Засоби, що впливають на еритропоез, лейкопоез та згортання крові. ...
PPTX
Діуретики та серцеві глікозиди
PPT
поверхневі явища
Увеит.docx
Tema 2 Enterprise main functions 2019
лекція 18
Organophosphate poisoning
презентація до теми 10
Лекція 11. Засоби, що впливають на еритропоез, лейкопоез та згортання крові. ...
Діуретики та серцеві глікозиди
поверхневі явища
Ad

Similar to Web player (20)

PPTX
Industrial Technology Multimedia Video Theory Prelim Course
PPT
Vste r2
PPTX
Policy-Driven Dynamic HTTP Adaptive Streaming Player Environment
PDF
Encoding at Scale for Live Video Streaming
PDF
Socionext Media Cloud
PDF
Policy-Driven Dynamic HTTP Adaptive Streaming Player Environment
PDF
[AWS Media Symposium 2019] AWS Media Services Innovation - Christer Whitehorn...
PDF
Bitmovin LIVE Tech Talks: Analytics for Workflow Automation (ft. Touchstream ...
PPT
Slide
PPTX
Brightcove live tech overview
PDF
Multimedia Services: Video
PDF
Encoding Video for the Web - Webinar from ReelSEO.com
PDF
Nimble Streamer Transcoder overview
PDF
CHAPTER – 6 Video
PDF
Bitmovin LIVE Tech Talks: Data Driven Video Workflows
PDF
Build end-to-end video experiences with Azure Media Services
PDF
Building a Real-Time Gaming Analytics Service with Apache Druid
PPTX
Streaming video to html
PPT
Video Streaming - 4.ppt
PPTX
Design in Motion: Video Production Workflow
Industrial Technology Multimedia Video Theory Prelim Course
Vste r2
Policy-Driven Dynamic HTTP Adaptive Streaming Player Environment
Encoding at Scale for Live Video Streaming
Socionext Media Cloud
Policy-Driven Dynamic HTTP Adaptive Streaming Player Environment
[AWS Media Symposium 2019] AWS Media Services Innovation - Christer Whitehorn...
Bitmovin LIVE Tech Talks: Analytics for Workflow Automation (ft. Touchstream ...
Slide
Brightcove live tech overview
Multimedia Services: Video
Encoding Video for the Web - Webinar from ReelSEO.com
Nimble Streamer Transcoder overview
CHAPTER – 6 Video
Bitmovin LIVE Tech Talks: Data Driven Video Workflows
Build end-to-end video experiences with Azure Media Services
Building a Real-Time Gaming Analytics Service with Apache Druid
Streaming video to html
Video Streaming - 4.ppt
Design in Motion: Video Production Workflow
Ad

Recently uploaded (20)

PPTX
Cloud computing and distributed systems.
PDF
Machine learning based COVID-19 study performance prediction
PDF
Encapsulation theory and applications.pdf
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Approach and Philosophy of On baking technology
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
KodekX | Application Modernization Development
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Spectral efficient network and resource selection model in 5G networks
PPT
Teaching material agriculture food technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Cloud computing and distributed systems.
Machine learning based COVID-19 study performance prediction
Encapsulation theory and applications.pdf
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Approach and Philosophy of On baking technology
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
KodekX | Application Modernization Development
MYSQL Presentation for SQL database connectivity
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Dropbox Q2 2025 Financial Results & Investor Presentation
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Empathic Computing: Creating Shared Understanding
Spectral efficient network and resource selection model in 5G networks
Teaching material agriculture food technology
Encapsulation_ Review paper, used for researhc scholars
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Web player

  • 1. Building a Robust Video Player With Open Source Tech @ Hotstar
  • 2. Basics First ● Media Container Formats ● Encoding Formats ● Some common Terms --- ○ Video Resolution ○ Aspect Ratio ○ Frame Rate ○ Bitrate
  • 3. Bit more on Bitrate ● The data rate for a video file is the bitrate. ● So a data rate specification for video content that runs at 1 megabyte per second would be given as a bitrate of 8 megabits per second (8 mbps). ● Internet videos, phone videos, and HD blu-ray videos for tV all vary in bitrate.
  • 4. Why You told me Basics ● 360x240 resolution =====> 86400 pixels per frame. ● The frame rate is 30 Hz =====> 86400 × 30 = 2592000 pixels per second. So let's say 1 pixel is 3 Bytes (24 Bits) of data: we have 2592000 × 24 bits per second video (62208000 Bits), that is 62208 kBits (This is a rough estimate, and there is something more).
  • 5. Same same resolution different different Bitrate ● Video quality has a lot to do with how the video was compressed. ● The more you compress it, the less bits it takes per frame. ● More you compress, the worse the quality is. ● Now, some videos are much easier to compress than others ● Spatial Redundancy and Temporal Redundancy
  • 6. Adaptive Bitrate Streaming(a.k.a Auto Mode) Aim: Optimize the streaming experience under a diverse set of network conditions and across various devices Approach: ● Produce multiple files from the same source file ● The file is consumed/delivered adaptively ● This occurs transparently to the user, so that the viewer clicks one button.
  • 7. ABR Technologies Relevant to us for now: HLS, DASH HLS --- HTTP Live Streaming (HLS) DASH --- Dynamic Adaptive Streaming over HTTP
  • 10. HLS vs DASH ● Proprietary ● Codec Agnostic ● No DRM method specified ● HEVC
  • 11. Content Protection- Digital Rights Management DRM technologies use encryption to protect the content prior to or during streaming, downloading or other transfer.
  • 12. DRM encoding at source
  • 15. Hls.js architecture ● Main functionalities are split into several subsystems ● All subsystems are instantiated by the Hls instance. ● Each subsystem heavily relies on events for internal/external communications. ● Events are handled using EventEmitter
  • 17. Performance Measuring ● Key Metrics @ Hotstar to track Playback Performance ● Analytics Measurement Platform ● Analysing the weekly and monthly reports ● Identifying the key areas of improvements
  • 18. Performance Improvements Will list these during the talk
  • 19. Ensuring Player Robustness ● Using fallback streams during live playback ● Handling tsunami wave of customers with a panic scenario ● Identify and build around some minor bugs in the OSS libraries
  • 20. Key Takeaways and Learnings ● Video Streaming formats and technologies ● There are hundreds of thousands line of JS, that make use of Web API's to facilitate playback in one single format ● But one does not have to reinvent the wheel. Hail OSS ● Customise the library to suit one's needs. You will be surprised of how much you can learn by looking at the code ● Building for performance and robustness requires an approach of measuring and tuning the player