For the past weeks, lots of work was done to make Av1 available in libwebrtc in an easy way. It is very clear from the messages on discuss-webrtc that the compilation process behind chrome, electron and libwebrtc is more often than not too hard to understand, some extra time was spent to make it easier for people to enable it and use it. CoSMo has also prepared a separate GitHub repository with, wait for it, documentation ! Pre-compiled examples, an AV1-ready webrtc SFU, and KITE tests are also provided for people to adopt AV1 faster.
Let’s manage expectations right away:
1. AV1 in standalone webrtc but not in chrome yet.
AV1 real-time encoder and decoder, with support for webrtc streaming have been added to libwebrtc by default, but not to chrome. The feature is protected by a compilation flag which is false by default when used in chrome, and true by default when used in libwebrtc.
Most of the work this week by google, since the weekly Real-Time Group meeting of AOMedia, has been about simplifying the compilation for all, while not impacting e.g. the size of the binary on android. Special thanks to Danil C. who has been re-implementing all the webrtc layer.
The goal was to provide AV1 support to libwebrtc without waiting for the chrome team to figure how to have Av1 for both the video element (youtube) and webrtc, with different settings (real-time for libwebrtc, high quality 2-passes for youtube).
Special Thanks to jerome Jiang for helping integrating the encoding part of libaom in libwebrtc for all the platforms it supports.
2. We are speaking about real-time AV1, but …
This is single layer implementation only for now. The work to implement support for SVC is ongoing, and it will require a few more weeks. It should land before the end of april. We will of course report progress. It is only important to you if you have a corresponding SFU and infrastructure that supports SVC.
In terms of quality, the AV1 codec has everything to match broadcast quality. Even if in terms of compression ratio (coding efficiency) the real-time version will never be able to compete with the 2-pass version used by youtube or Netflix, in terms of resolution, number of colors and chroma sampling, it is state of the art, supporting 8, 10 or 12 bits color depths, and 4:2:0, 4:2:2 and 4:4:4 chroma sampling.
For now, even if the encoder implementation has all of the modes above, the webrtc code only supports AV1 with 8bits frames, 4:2:0 chroma sampling, with no limit in size (if screen sharing). For some time, VP9 mode 2 (up to 10bits HDR, up to 4:4:4) is still the best frame quality you can get with webrtc. Some stadia games are already using this mode.
We are investigating how to bring better quality into webrtc, as it is merely an implementation detail, and not a standard limitation, for remote video editing, color calibration, and all others use cases real-time streaming platforms like millicast.com have been developed for.
3. Good news, you get the webrtc SFU code right away
Part of the project is to provide a reference SFU implementation to check all the media server side logic the AV1 RTP specifications added on top of the AV1 codec capacity. Decoding Targets, layer switching, LLR, all those canoe pretty dry when reading the spec, and become much easier to understand with an implementation.
You can go check on the GitHub umbrella project how to get access to the Medooze-based SFU with supports AV1 SVC, but also VP9 SVC, and end-to-end-encryption, as we presented earlier this week and have provided native solutions for for many years. One will be able to test AV1 against VP9, with or without SVC, with or without E2EME, and benchmark the differences in terms of bandwidth overhead, CPU footprint, ….
4. Actually You get the tests and the benchmark too!
Thanks to google youtube team, Adrian Grange, and Michael Horowitz, you will also get a full KITE test suite, with all kinds of free, open source intro tests, compliance tests, and some benchmarks.
KITE has, at the time of choosing, the unique ability to drive native apps, and mobile apps, which is the focus of AOMedia (as opposed to W3C for example). It is also developed by a team with not only the capacity to give feedback to the spec, but also to contribute to the implementations making it the perfect choice for people who wants to test innovative products.
Not all the tests are going to be available right away, just like all the SFU features will be available today, as both client and server need to be in sync, but again, follow this blog, or the GitHub repository to get the latest code and documentation in the following weeks.
CONCLUSION
It’s been almost two years that cosmo has been helping writing the specification, spear-heading the webrtc implementation, and the release open-source of the AV1 codec. We are happy to have teamed up with google to deliver an implementation that is more integrated in chrome than we could ever have done. In the following days and weeks, we will provide many simple open-source examples for adoption.
Of course, there is much more where this come from and if you want to speak with real Webrtc, and real-time AV1 experts, contact us. If you are a research institution planning to do some research on AV1, and/or an open source project planing to use it, reach out to us, we are open to collaborations, within reason, and the AOM has provision for that in the scope of AV2 development.
Happy hacking.