Share
Embed
Transcript
42 slides
-
Hello ! I am Ayushi Gupta Android Engineer at Hotstar
You can reach me out at: Twitter : @droidyayu Email : [email protected] -
About Hotstar • #1 OTT platform in India • Over
350M+ downloads • 1 Day,100M users, 2.5X increase in concurrency • Available in >15 languages • Variety of content ◦ Live/On-Demand ◦ Sports/News/TV/Movies ◦ Regional Catalogue -
Let’s talk about scale 2012 8M Felix Baumgartner’s Supersonic Jump
YouTube 2018 3.1M NBC’s Super Bowl NBC Sports App 2018 10.3M IPL 2018 - Finals hotstar May 2019 18.6M IPL 2019 - Finals hotstar July 2019 25.3M World Cup - India vs New Zealand hotstar -
3rd Party Player • No control • Non customisable on
fly • Long mail chains to execute simple change • Non agile • Reduced development speed • SDK size of ~8mb -
Engineering Requirements • Product based player -customizable • Tune to
streaming stack • Optimizable • Extensible -
Exo Player • Open source library • Hardware accelerated decoding
• Software decoding fallbacks • Play both audio and video - locally and over internet • DASH and Smooth Streaming adaptive playbacks • Customizable • Extendable • Can be updated through play store application updates -
Just replace it ? • No compromise to user experience.
• Update huge user base. • One shot update or progressive update • It’s not a backend ◦ Rollback needs time ◦ There is always residual users • Certain product features - A must to have! -
Ads @Hotstar • Ads = Revenue • AVOD Business demand
• Seamless transitions • Pre - rolls, mid rolls support • Support for both LIVE and VOD -
Exo Ads Playback New extension for playing ads, wrapping the
Interactive Media Ads SDK (IMA) using Ads Media Source • Complete control of execution flow • In - house ads playback experience • IMA SDK handles standard VAST response • Display ads on it’s “internal” logic • IMA SDK - not complete open source. • Non customisable -
Hotstar Ads Playback • Fetch Ads marker along with playback
url • Insert markers in existing url - Tags • Custom HLS Parser - Tag Based • On the basis of tags call Ads API Player Switching Approach 1. 2 Players at same time. 2. One for ads 3. One for content Ad Stitching Approach 1. Get Ads marker before video start 2. Combine it in current media source 3. Redirect when ads -
Ad Stitching • For both live and VOD contents •
Updating content manifest by inserting tags • Take care of timeline and subtitles • Multi audio packaged content -
Content Security • Exo Player supports Widevine DRM for DASH
content • Support only from API 19 and above • minApiVersion = 15 • Can’t neglect customer base -
Instrumentation • Playback performance - Key metric • Movement of
instrumentation layer • Re - testing on new player • Test against our instrumentation layer • Right metrics - Decision maker -
Building from scratch - HSPlayer • “Don’t mess with something
which is already Working” • New separate module • An interface - HSPlayer exposed to App Module • Agnostic about app -
HSPlayer - Functionality • Smart layer • Handles player’s lifecycle
callbacks • Even event callbacks, error callbacks,retry callbacks etc. • Handling user inputs • Video settings like subtitle, audio language, video resolution etc -
App Role • Fetch playback url and give it to
player module • Required additional metadata to make certain decisions • Display custom player controls • Handling of error messages. • Handle analytics events based on player’s lifecycle • Event and error callback analytics • Handle player orientation changes -
Watch Time • Most important metric • Indicator of player
health • Uninterrupted watch session • Constant observation, if sudden drop it raises an alert. • Immediate attention needed -
PFR - Playback Failure Rate • Highest metric • Failed
Video vs Started Video • Work on retry policies • Eye on status codes - Recoverable or Non Recoverable -
Start Lag • Time taken by player to render it’s
first frame. • Difference between playback url given to player and first buffering end callback received • Start lag can be high if : 1. Slow network 2. High network latency 3. High initial bitrate • -
Buffering time and Buffering Count • Buffering / unit watch
time • Buffering indicator /unit watch time • Playback @higher bitrate -
Current scenario • High fluctuating data networks • Very less
users on stable WIFI “A balanced equation of available bandwidth, estimated bandwidth, forward buffer and content availability in different resolutions” • -
Rolling Upgrade • A/B testing is the key to rollout
any feature • A/B controlled player • Measure player key metrics • Measure user experience via funnels • Make decisions -
Initial Targeted Users • Delivering seamless content with ads is
always challenging. • Time needed to develop ads + streaming • For premium users it’s an ads free experience • Premium subscribed users were first use case of performance -
Handling different contents differently ! • Downloads and offline content
• DownloadManager of Exo player • Rolling out VOD and Live separately • Optimizing parameters for manifest specifications, content encoding ,live latency based on content • Different player parameters for different specification -
Uninterruptible Experience • Robust retry mechanism • Resilient player •
Exo player - DefaultLoadErrorHandlingPolicy • More retries -> Reduced Failure Rate -> Increase Watch Time • During retry -> Increased buffering -
Preemptive Watching • Optimised player for cw contents • Playback
position is determined pre-handedly • Prefetching of chunks • Smooth playback • Reduced buffer time -
Recycler View + Exo Player • Autoplaying feed • Single
instance player • Listen to scroll movements • Attach and detach player smartly • Caching at player level • Resume at same point when clicked • Resolution capping • Bitrate capping -
Video performance tool • Tool to know the stream specifications
during playback • Can know the widevine security levels whether L1 or L2 • Run time buffer analysis • Network analysis • Rescue to customer care support