The recent release of AV1, a new open, royalty-free video format, promises to be an important step forward in compression efficiency. Following our publication of detailed real-world AV1 benchmarking tests, Facebook is now adding trial support for the AV1 format to Facebook video. This allows engineers and the general public to view sample AV1 content today. Browser support for the official AV1 release version is still under development, and encoding speed still lags behind current encoder alternatives, such as x264 and libvpx-vp9. So in order to add AV1 support to Facebook video now, we serve it over MPEG-DASH on Chrome Canary, the experimental version of the Chrome browser. To launch this feature, we are using an earlier version of AV1, but we will switch to the official AV1 release version once major web browsers such as Chrome and Firefox have implemented it.
The Alliance for Open Media (AOMedia) — a consortium founded in 2015 and made up of video-on-demand providers, including Amazon, Facebook, Google, Microsoft, and Netflix, along with web browser developers and semiconductor firms — developed AV1 to deliver optimized, higher-quality video with more efficient compression. In particular, it may help make 4K video content more accessible by decreasing bandwidth and storage requirements. In our tests, AV1 (libaom) delivered 30 percent better compression than libvpx-vp9 and 50 percent better than x264. Because the test replicated conditions that closely match the most common real-world use cases for Facebook video, the results show that people watching AV1 content will experience 30 percent to 50 percent less buffering. The new codec, however, requires longer encoding times versus current alternatives, due to increased complexity. The following graph compares encoding times with those of other formats commonly used today. (This previous blog post offers more detail on our testing.)
Implementation strategy for adding AV1 support
To overcome the slow performance of AV1 encoder, we used a segment-based encoding approach when implementing AV1 support for Facebook video. The video is first split into smaller video segment files along the video’s GOP (group of pictures) boundaries so that output segments are independent and well-formed video files. Then a per-segment encoding task is executed for every segment of a particular video. In the context of distributed video encoding and processing, per-segment tasks are executed in parallel for every video segment of a given input video so that it allows us to speed up the overall AV1 encoding almost linearly with the number of tasks allocated to the encoding cluster. Finally, after all the per-segment encoding tasks for a particular video have completed, follow-up actions are performed, such as stitching and muxing the video together and creating a DASH (Dynamic Adaptive Streaming over HTTP) manifest.
To view an AV1-encoded sample video available now on Facebook video, follow these steps.
- Install Chrome Canary (version 67.0.3393.0 or higher) from https://www.google.com/chrome/browser/canary.html.
- Enable AV1 video decoding in chrome://flags.
- Play the sample AV1-encoded Engineering at Facebook video embedded below. (For other browsers, non-AV1-encoded the video will play normally but will not be in AV1.)
Adding AV1 support at this early stage gives the engineering community and others the opportunity to experience this new video format today, without having to wait for full web browser support. As major web browsers add AV1 support, Facebook video will gradually increase the number of videos served using AV1 while we continue to help speed development and implementation of AV1 across the digital video ecosystem.