Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Exo-Player - Video Streaming Spearhead @Hotstar

Exo-Player - Video Streaming Spearhead @Hotstar

Avatar for Ayushi Gupta

Ayushi Gupta

August 31, 2019
Tweet

More Decks by Ayushi Gupta

Other Decks in Programming

Transcript

  1. Hello ! I am Ayushi Gupta Android Engineer at Hotstar

    You can reach me out at: Twitter : @droidyayu Email : [email protected]
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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!
  7. Ads @Hotstar • Ads = Revenue • AVOD Business demand

    • Seamless transitions • Pre - rolls, mid rolls support • Support for both LIVE and VOD
  8. 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
  9. 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
  10. Ad Stitching • For both live and VOD contents •

    Updating content manifest by inserting tags • Take care of timeline and subtitles • Multi audio packaged content
  11. Content Security • Exo Player supports Widevine DRM for DASH

    content • Support only from API 19 and above • minApiVersion = 15 • Can’t neglect customer base
  12. Instrumentation • Playback performance - Key metric • Movement of

    instrumentation layer • Re - testing on new player • Test against our instrumentation layer • Right metrics - Decision maker
  13. 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
  14. 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
  15. 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
  16. Watch Time • Most important metric • Indicator of player

    health • Uninterrupted watch session • Constant observation, if sudden drop it raises an alert. • Immediate attention needed
  17. PFR - Playback Failure Rate • Highest metric • Failed

    Video vs Started Video • Work on retry policies • Eye on status codes - Recoverable or Non Recoverable
  18. 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 •
  19. Buffering time and Buffering Count • Buffering / unit watch

    time • Buffering indicator /unit watch time • Playback @higher bitrate
  20. 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” •
  21. 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
  22. 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
  23. 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
  24. Uninterruptible Experience • Robust retry mechanism • Resilient player •

    Exo player - DefaultLoadErrorHandlingPolicy • More retries -> Reduced Failure Rate -> Increase Watch Time • During retry -> Increased buffering
  25. Preemptive Watching • Optimised player for cw contents • Playback

    position is determined pre-handedly • Prefetching of chunks • Smooth playback • Reduced buffer time
  26. 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
  27. 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