Improving ABR Video Performance at Pinterest

Pinterest Engineering
7 min readintermediate
--
View Original

Overview

The article discusses enhancements made to Adaptive Bitrate (ABR) video performance at Pinterest, focusing on reducing startup latency and improving user engagement through innovative solutions. It details the implementation of manifest embedding and the use of caching to optimize video playback across iOS and Android platforms.

What You'll Learn

1

How to reduce video startup latency using manifest embedding

2

Why using MemCache can improve API response times

3

How to customize video player loading processes on iOS and Android

Prerequisites & Requirements

  • Understanding of Adaptive Bitrate (ABR) streaming protocols
  • Familiarity with AVPlayer and ExoPlayer(optional)

Key Questions Answered

How does Pinterest improve video performance using ABR?
Pinterest enhances video performance by embedding manifest files directly in API responses, which reduces the round trip latency associated with fetching multiple manifests. This allows video players to access necessary data locally, leading to quicker media downloads and improved startup times.
What impact does reducing manifest loading latency have on user engagement?
By reducing manifest loading latency, Pinterest significantly improves video startup times, which in turn enhances user engagement. Faster loading times lead to a more seamless viewing experience, encouraging users to interact more with video content.
What challenges did Pinterest face in optimizing video playback?
Pinterest faced challenges related to API response overhead due to the need for multiple network calls to retrieve video manifests. They addressed this by implementing a MemCache layer to reduce latency and improve API response times.
How does the use of MemCache affect API performance?
The implementation of MemCache significantly reduces the latency of API responses by caching frequently accessed manifest files. This is particularly effective for popular content, leading to improved performance and user experience.

Key Statistics & Figures

Percentage of video playback sessions on iOS using HLS
70%
This statistic highlights the dominance of HLS in video playback on iOS devices.
Percentage of video sessions on Android using DASH
55%
This indicates the significant use of DASH for video streaming on Android platforms.

Technologies & Tools

Streaming Protocol
Hls
Used for video streaming on iOS platforms.
Streaming Protocol
Dash
Used for video streaming on Android platforms.
Video Player
Avplayer
Utilized for playing HLS streams on iOS.
Video Player
Exoplayer
Used for playing DASH streams on Android.
Caching Tool
Memcache
Implemented to reduce API response latency.

Key Actionable Insights

1
Implement manifest embedding in your video streaming API to reduce latency.
By embedding manifest files directly in the API response, you can streamline the video loading process, which is crucial for enhancing user experience in video applications.
2
Utilize caching strategies like MemCache to optimize API performance.
Incorporating a caching layer can significantly decrease response times, especially for high-demand content, thereby improving overall application performance.
3
Customize video player loading processes to improve playback efficiency.
By tailoring the loading mechanisms in AVPlayer and ExoPlayer, you can enhance the responsiveness of video playback, which is vital for maintaining user engagement.

Common Pitfalls

1
Failing to optimize API response times can lead to increased latency and poor user experience.
This often occurs when multiple network calls are required to fetch data, which can be mitigated by using caching strategies like MemCache.

Related Concepts

Adaptive Bitrate Streaming
Video Performance Optimization
Caching Strategies